Commit Graph
117 Commits
Author SHA1 Message Date
ldm0 8597efb12f fix(stylesheets): bind parser imports before releasing scripts 2026-11-03 07:53:58 +08:00
ldm0 86ede9afdb fix(stylesheets): reject child integrity failures before CSSOM
Reject integrity-failed parser stylesheet responses in child Documents before preparing or installing an owner CSSStyleSheet. Complete the failed load and release its blocker through the existing terminal path.

Add eight end-to-end URL iframe/srcdoc cases covering initial and cached integrity rejection, matching hashes, CSSOM and computed style, dependent import suppression, and parser/DCL/iframe-load progress.

The regression reproduced the empty-sheet bug at the previous PR head. Validation at 32 build jobs, test threads and Tokio workers: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
Summary [ 146.212s] 22163 tests run: 22163 passed (9 slow), 20 skipped
2026-11-03 07:16:23 +08:00
ldm0 d9290e87ad feat(modules): support native text module imports
Support type: text through the shared module map, Window, child Documents and workers. Export UTF-8 decoded strings without executing their contents, preserve typed-module identity, and carry text request metadata through network, preload and Service Worker loaders. Regressions cover static/dynamic import sharing, BOM and invalid UTF-8, CORS, integrity, worker environments and unsupported-type rejection.

Extracted from development commit a6de018613.
Base: main (62e527cd34).

Validation (32 build jobs and test threads): cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
     Summary [ 146.817s] 22203 tests run: 22203 passed (9 slow), 20 skipped
2026-11-03 06:30:06 +08:00
ldm0andneosun100 08e83bffc0 fix(cdp): randomize browser endpoints and page target identities
Generate a fresh browser WebSocket UUID per server and random 128-bit page
and tab target IDs for network CDP owners. Keep discovery URLs and protocol
target IDs consistent, and make clients discover endpoints instead of
relying on fixed paths.

Cover endpoint rotation, guessed and foreign ID rejection, and target
lifecycle behavior.

Co-authored-by: neosun100 <neosun100@users.noreply.github.com>
2026-11-03 05:53:28 +08:00
ldm0 cba18451c8 test(scripts): gate parser stylesheet after runtime load mutation
Release the parser-owned blocking stylesheet only after the runtime stylesheet load handler has applied its DOM marker. Use the existing fixture event gate and a dedicated signal route to establish the renderer/parser snapshot ordering explicitly, preserving the marker and event-order assertions without relying on two relative network delays.

Extracted from development commit f51d7c2c5e141b0926e262a35c3d21ff6cb79450.
Base: main (b30f39c580).

Validation (32 build jobs and test threads): cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
     Summary [ 147.438s] 22169 tests run: 22169 passed (9 slow), 20 skipped
2026-11-02 22:28:59 +08:00
ldm0 460096594e test(core): prove fetch deadlines interrupt an entered navigation grace
Warm the renderer before starting the short deadline and assert the lifecycle decider actually enters its successor-navigation grace path. Preserve the original 100 ms request timeout, 10-second grace and owner-recovery bounds.

Extracted from development commit 739748a5d14a9cfd0c5aff913146a238d97030c9.
Base: main (b30f39c580).

Validation (32 build jobs and test threads): cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
     Summary [ 147.288s] 22169 tests run: 22169 passed (9 slow), 20 skipped
2026-11-02 22:28:44 +08:00
ldm0 b092492b97 test(navigation): await traversal and background target load
Wait for the destination traversal state and the background session load notification before inspecting document contents. A best-effort stability result or navigation acknowledgement does not establish either completion boundary.
2026-11-01 03:55:30 +08:00
ldm0 5a9837461c test(indexeddb): split live cursor coverage into bounded probes
Run independent source and direction matrices in separate Runtime commands while preserving all 660 checks per realm and the existing 30-second command limit. Report the failing realm and matrix in timeout errors.
2026-11-01 03:55:30 +08:00
ldm0 59b0aa9754 fix(worker): send typed Fetch Metadata for worker main scripts
Set SameOrigin mode and native Worker/SharedWorker destinations on dedicated, nested and shared worker main-script requests. Retain CORS mode for module imports and honor nested worker script-kind credentials.

Validation (32 build jobs / test threads, zero retries):

- `cargo fmt --all`
- `cargo clippy --workspace --all-targets --all-features -- -D warnings`
- `cargo nextest run --no-fail-fast`: Summary [ 133.978s] 22032 tests run: 22032 passed (9 slow), 19 skipped
2026-10-31 21:23:14 +08:00
ldm0 2dd72ca458 fix(performance): distinguish cached and validated resource transfers
The existing from_cache flag collapses fresh local responses and revalidated 304 responses into the same state, producing incorrect Resource Timing transferSize.

Carry explicit cache state through buffered and streamed fetches, navigation, subresource snapshots and response interception. Resource Timing reports zero transfer for local hits, validation overhead for merged 304 responses, and body bytes plus header overhead for network responses. Cover disk and memory cache state in the HTTP timing fixture and native response tests.
2026-10-31 20:06:00 +08:00
ldm0 3c826bd1e8 fix(referrer): use delivered Document policies for Fetch and XHR
Read effective policies from native Document delivery state and preserve them in Fetch and both XHR transport paths. Remove obsolete subtree rescanning and response-only owner lookups.

Validation (32 build jobs / test threads, zero retries):

- `cargo fmt --all`
- `cargo clippy --workspace --all-targets --all-features -- -D warnings`
- `cargo nextest run --no-fail-fast`: Summary [ 141.923s] 21998 tests run: 21998 passed (9 slow), 19 skipped
2026-10-31 18:55:48 +08:00
ldm0 77c7f1fdc2 fix(indexeddb): preserve native request attributes and factory result state
Expose IDBRequest attributes through branded readonly prototype getters backed by native lifecycle state and traced values. Pending result/error throw InvalidStateError; cursor reuse and upgrade completion update internal state without writing author properties. Preserve the SQLite factory and owner-completion paths and their versionchange/delete event metadata. Cover pending, success, error, abort, shadowed properties and borrowed cross-realm getters.
2026-10-30 20:58:07 +08:00
ldm0 416e0607aa fix(indexeddb): reserve open results before upgrade completion callbacks
After a successful SQLite COMMIT receipt, reserve the upgrade open-result task before transaction complete listeners can enqueue regular request results. Retain openRequest.transaction through complete dispatch and clear it after dispatch; result delivery still checks for a closed connection. Correct IDBDatabase.transaction.length to 1. Retain the Window, iframe and Worker conversion, upgrade-boundary, ordering, close and reopen regressions.
2026-10-30 20:58:07 +08:00
ldm0 cf802a0acd fix(indexeddb): expose native readonly schema attributes
Expose IDBObjectStore and IDBIndex readonly attributes through generated branded prototype getters. Keep immutable flags, cached keyPath values and parent references in V8-traced private slots on ordinary and failed schema handles; indexNames reads the current SQLite metadata mirror. Remove obsolete public-property rewrites so author shadows and cached arrays survive schema edits and rollback. Preserve collectible wrappers and native Proxy/cross-realm behavior. Use the shared lossless SQLite schema-name model, independently of mutable rename; mutable name behavior remains a separate topic. Retain all readonly/identity/rollback assertions from the original fixture and save its full rename integration matrix for the SQLite rename work.
2026-10-30 17:50:36 +08:00
ldm0 b52ca510ea fix(indexeddb): preserve UTF-16 schema names through SQLite
Carry store and index names as IndexedDbName code units through WebIDL DOMString16 conversion, transaction scopes/admission, metadata, queued operations, cursors and DOMStringList. Store labels as ordered UTF-16BE BLOBs in SQLite schema v3; migrate known v1/v2 tables transactionally while preserving stable ids, records, indexes, generators and logical usage. Reuse the database-name codec and existing SQL command FIFO. Add exact surrogate/replacement/NUL/astral name operations in Window, iframe and Worker, plus native disk restart and malformed-label migration rollback/retry tests. This prerequisite supplies the lossless name model needed by the separate index/store rename setters.
2026-10-30 17:50:36 +08:00
ldm0 8564d0a23f fix(indexeddb): preserve UTF-16 database name identity
Preserve database DOMString names as IndexedDbName code units across derived WebIDL conversion, native connection FIFO, SQL service identity, IDBDatabase.name and databases() results. Store database names as UTF-16BE BLOBs in SQLite schema v2. Migrate v1 TEXT metadata inside one SQL transaction after owner/name/generation validation, keeping records, stable ids, generators and logical quota accounting. Extend the existing generation-path hash with canonical WTF-8 so legacy Unicode directory paths remain unchanged. Retain the complete original Window/iframe/Worker conversion, independent-record/version, abort, deletion and cross-agent matrix. Add real disk-profile restart plus legacy migration/failure, exact queue identity, path compatibility and quota-rollback regressions. This database-name topic is independent of object-store/index rename and readonly schema attributes.
2026-10-30 17:50:36 +08:00
ldm0 e97641f7a9 test(indexeddb): retain live cursor mutation coverage on SQLite
Carry the complete live cursor mutation matrix from superseded #1341 onto SQLite, without its snapshot rescanning implementation. Cover writes during iteration, pending cursor values, forward/reverse and unique directions in Window, iframe and Worker contexts.
2026-10-30 11:09:24 +08:00
ldm0 e3911cf75b feat(indexeddb): extend native geometry snapshots with shared codecs 2026-10-30 04:17:00 +08:00
ldm0 dcae77e5aa feat(indexeddb): store native DOMRect snapshots with shared codecs 2026-10-29 17:43:13 +08:00
ldm0 835d08b590 refactor(page): own command waits and finite completion
Run Page composite commands in the existing supervised command workflow.
Prepare preload, stop, crash and close ownership at admission; keep native
waits outside state access and complete finite commands synchronously.

Share owned navigation commit, streaming response and retirement logic with
Fetch. Preserve current, nested and background navigation reply ownership,
including accepted terminals during later waits, cancellation and ready loss.
Keep stop cleanup scoped to its original request and retain crashed Pages
before awaiting shutdown.

Remove the child-navigation Owned/Inline split, redundant world phases and
old exclusive Page completion/activation wrappers. Carry typed native errors
and use finite state operations for output, attachment and listener updates.

Keep original Native child facts routable through the unbound Document
handoff without granting business access. Preserve their exact Document tree
through adoption and use the captured owner for events and response bodies
when foreground selection changes.

Validate controlled renderer-held peer progress and recovery, successor
navigation ownership, stale world attachments, full workspace checks, source
CLI compatibility, Playwright, Puppeteer and parallel targeted stress. Replace an old stylesheet fixture clock check with
a script-released CSS gate while preserving the parser/DOM ordering checks.
2026-10-29 17:39:23 +08:00
ldm0 c64aa5d8ad fix(indexeddb): abort invalid unique index builds in request order 2026-10-29 08:49:01 +08:00
ldm0 99a9040445 fix(indexeddb): preserve explicit committing transaction state 2026-10-29 08:49:01 +08:00
ldm0 100f526622 fix(indexeddb): preserve native transaction attributes and abort reasons 2026-10-29 08:49:01 +08:00
ldm0 51e572786b fix(indexeddb): preserve native database connection attributes 2026-10-29 08:49:01 +08:00
ldm0 fbf8023323 fix(indexeddb): deduplicate multiEntry index keys per record 2026-10-28 23:38:05 +08:00
ldm0 c613eb53bc fix(indexeddb): validate pending cursor iteration 2026-10-28 19:46:53 +08:00
ldm0 1a09036349 fix(indexeddb): protect cursor state and collect native snapshots 2026-10-28 19:46:52 +08:00
ldm0 5fe37bb935 feat(indexeddb): support native records and bulk query options 2026-10-28 19:46:52 +08:00
ldm0 94cee60020 fix(indexeddb): wait for upgrade requests before completing open 2026-10-28 19:46:52 +08:00
ldm0 9b0f537e9a fix(indexeddb): connect transaction admission across realms and workers 2026-10-28 18:00:27 +08:00
ldm0 08b20e9e09 fix(indexeddb): synchronize upgrade handles across realm tables 2026-10-28 05:19:54 +08:00
ldm0 6a769357c8 fix(indexeddb): validate assembled compound keys before write admission 2026-10-28 05:19:54 +08:00
ldm0 e5f8a8e05f fix(indexeddb): bound compound key depth across conversion and storage 2026-10-28 05:19:54 +08:00
ldm0 e1668ed2d3 fix(indexeddb): preserve native key types and conversion errors 2026-10-28 05:19:54 +08:00
ldm0 b2fc3dd65c fix(html): preserve child meta refresh with shared scheduling
Process parser and script-created refresh declarations in order and retain them
on their owning Document across load callbacks and adoption. Share candidate
priority and deadline state between main and child documents, and arm child
timers after owner load completes.

Consume queued work by exact Document identity and revision, classify navigation
when it fires, and keep the registered target URL. Reprocess same-value meta
attributes using the matched Attr identity so XML case, namespaces, observer
records, and refresh deadlines remain correct.

Cover competing declarations, stale tasks, independent frames, load/adoption
boundaries, sandbox/shadow handling, saved targets, and fragment navigation.
2026-10-26 03:17:22 +08:00
ldm0 da166435c8 refactor(indexeddb): derive transaction scope and mode conversion 2026-10-25 16:42:13 +08:00
ldm0 cd401ec4ce feat(webcodecs): implement native encoded video chunk values 2026-10-24 22:42:26 +08:00
ldm0 ff15becb62 fix(fonts): defer set events and preserve ranges and promises 2026-10-23 04:07:15 +08:00
ldm0 c7130a3059 fix(fonts): share native FontFace loading across CSS and JS 2026-10-23 04:07:15 +08:00
ldm0 a86afb442e test(document): cover child input-stream readiness 2026-10-21 06:11:29 +08:00
ldm0 59cca282f9 fix(script): keep parser async work runnable after EOF
Async scripts still fetching at parser EOF previously entered a queue
behind DOMContentLoaded, allowing a slow defer script to block a ready
async script or its error event. Transfer remaining async work to the
exact Document runtime producer and publish each task when its source
completes, retaining its load-delay lease.

Preserve observed async completion order across parser handoff. Add gated
success, failure, and out-of-order completion tests, and update the WPT
ledger for execution-timing/085.html.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17,879 passed, 13 skipped
- 270 WPT cases: 257 to 258 passes, no case or subtest regressions
2026-10-18 01:54:47 +08:00
ldm0 67283068e3 refactor(window): dispatch cross-origin access through native tables
Replace WeakMap-backed Window surfaces with native access-check dispatch.
Keep per-Window Location identity and resolve dynamic children from the
current frame tree. Reuse the ordinary Window accessor value helpers.

Apply cross-origin descriptor and fallback rules, preserve borrowed receiver
behavior, and cover navigation, named collisions, removal, and realm teardown.
2026-10-17 03:31:45 +08:00
ldm0 bfb22b2cd5 test(scripts): synchronize async chunk fixture on execution 2026-10-15 18:15:30 +08:00
ldm0 46389039a0 fix(html): retain child parser EOF during script execution 2026-10-14 16:04:23 +08:00
ldm0 60c0a7ffcb fix(cssom): validate keyframe receivers and preserve mutation errors
Extracted from wpt-misc-fix.

Source-commit: f57431be78
Source-commit: 8b8655fd27
2026-10-12 01:03:35 +08:00
ldm0 c884fe059b fix(fonts): validate binary FontFace payloads after descriptor conversion 2026-10-08 23:38:02 +08:00
ldm0 225c7d36ed fix(performance): validate observer options and retain observe mode
Convert PerformanceObserver.observe options as a WebIDL dictionary, reject invalid option combinations and restricted durationThreshold values, and retain the chosen single/multiple observe mode across empty or unsupported subscriptions and disconnect. disconnect clears active subscription data without resetting the selected mode. Window regressions cover member evaluation order, exception identity, cross-realm receiver checks, unsupported types and re-subscription.
2026-10-08 21:39:21 +08:00
ldm0 3121758fc4 fix(indexeddb): protect native key range bounds and receivers
Move IDBKeyRange bounds and open flags into protected native state with readonly prototype accessors. Author shadowing and mutation cannot change range queries; getters and includes validate native receivers, preserve cached bound object identity and compare against the original bounds. Tests cover descriptors, forged/Proxy receivers, mutation and the Window/child/Worker surfaces. Validation uses main-supported scalar/array keys and read APIs; bulk record queries, Date/binary keys and direct range deletion are separate features. Protected bounds remain checked across pending/started transactions, indexes, retained mutable arrays, native-brand errors and cross-realm getters.
2026-10-08 21:32:15 +08:00
ldm0 c31404d801 refactor: use stable atomic updates and fixed-size slice chunks 2026-10-08 19:56:33 +08:00
ldm0 ce08ab6c54 test(stylesheet): gate alternate stylesheet on parser script observation 2026-10-07 18:23:32 +08:00