Commit Graph
202 Commits
Author SHA1 Message Date
ldm0 d74af66af4 fix(forms): preserve submission-time navigation history 2026-11-22 02:01:49 +08:00
ldm0 78ba91b71a fix(navigation): replace Location entries until document loading completes
Track complete loading separately from readyState for main and child documents, retaining the state through document.open(). Apply before-load replacement to Location assignments with the transient user activation exception, and settle inherited main load completion after a load-callback rewrite.

Keep Window.open on the generic navigation path so its history behavior remains independent of the Location API.

Cover real child history length and entry indices across parser, DOMContentLoaded, load, pageshow, and post-load document.open(), plus main navigation event classification and activation. Update the measured Location WPT results.
2026-11-22 02:01:49 +08:00
ldm0 a76040ab6a fix(html): retain child parser EOF during script execution 2026-11-22 02:01:49 +08:00
ldm0 c51c3398d8 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-11-22 02:01:49 +08:00
ldm0 31551f4eeb fix(html): queue child load delivery through the DOM source
Queue iframe load delivery alongside other DOM tasks and include current
child lifecycle owners in the existing lifecycle scheduling preference.
This keeps initial load ahead of module timers that replace the document.

Cover inline, imported, external, and top-level-await modules using parent
and child timers. Check adopted-image events against the shared DOM FIFO.
Update the WPT ledgers for the three repaired delayed module-write cases.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17,875 passed, 13 skipped
- 270 WPT cases: 254 to 257 passes, no case or subtest regressions
2026-11-22 02:01:49 +08:00
ldm0 2884262598 fix(html): queue document lifecycle transitions on the DOM source
Admit DOMContentLoaded and main Window load after their parser/defer and load
prerequisites so earlier DOM tasks keep their FIFO positions. Keep interactive
readiness at parser stop, preserve child realm prerequisites, and return a load
boundary to its driver if an earlier DOM callback adds a new load delay.

Queue parser-owned external import-map errors during preparation, including
child and document.write parsers, so later dynamic errors cannot overtake them.
Cover ordering, replacement and load-delay behavior in main and child documents.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17,871 passed, 13 skipped
- 270 WPT cases: 254 pass, 10 fail, 5 timeout, 1 error; one new pass and
  no case-status or passing-subtest-count regressions
2026-11-22 02:01:49 +08:00
ldm0 759ec2767c fix(parser): checkpoint microtasks before preparing parser scripts
Yield live HTML script preparation to the document owner after releasing
parser borrows. Prepare from the current DOM after the guarded microtask
checkpoint, and abandon stale handoffs when that checkpoint replaces the
document. Apply the boundary to main documents, child documents, and
document.write; preserve eager parsing when no runtime owner is installed.

Admit parser async classic scripts after preparation and keep nested
script cleanup from draining microtasks while an outer script is running.
Add main/child integration coverage and update the two repaired WPT cases.

Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast: 17,846 passed, 13 skipped
- 245 related WPT cases: all 231 previously passing cases remain passing
- Final CLI build: both repaired WPT cases pass on the validated sources
2026-11-22 02:01:49 +08:00
ldm0 908d6fc4bc fix(script): checkpoint microtasks during event callback cleanup
Perform HTML script cleanup between event callbacks when the execution-context stack becomes empty, retaining currentTarget, passive state, and window.event through the checkpoint. Preserve script execution scopes during exception reporting, use the same callback boundary for Worker.onerror, and guard the complete microtask checkpoint against reentrancy.

Remove deferred window.event restoration. Update callback-order assertions and asynchronous fixtures to wait for the final event they inspect, while retaining scheduler, document-owner, and follow-up checks. Add Window, child Window, and Worker coverage for nested dispatch, listener removal in microtasks, and script versus callback exceptions.

Callback exception ordering follows Web IDL cleanup before rethrow; the local Chromium probe reports the error before that checkpoint.

WPT: 3 additional passes in the script-element microtask tests; the other 492 cases retain identical statuses and subtest results. Update the corresponding passed/failed case lists.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (17,843 passed, 13 skipped). Fresh CLI build SHA-256 matches the binary used for the 495-case WPT comparison.
2026-11-22 02:01:49 +08:00
ldm0 f1bf320c43 fix(script): retain child parser state during script cleanup
Run classic script microtasks before restoring currentScript or releasing child parser nesting. Defer nested checkpoints to the outer script and wait for exception reporting before running reactions.

Cover inline and external scripts, syntax and runtime errors, document.open/write insertion points, and nested execution. Record the repaired synchronous-script bailout WPT.
2026-11-22 02:01:49 +08:00
ldm0 9c89ea3514 fix(document): ignore destructive writes during module execution
Track nested ignore-destructive-writes counters per Document across module evaluation and its cleanup checkpoint. Preserve explicit input streams, cross-realm Document identity, and writes from later tasks or pending top-level await continuations.

Validate root and child module behavior with five regression tests. The 149-case dynamic-markup WPT run gains four passes with unchanged remaining outcomes; update their recorded case status. cargo fmt, workspace all-feature clippy, and all 17835 nextest tests pass.
2026-11-22 02:01:49 +08:00
ldm0 e5d5fa5c63 fix(document): reset child input-stream readiness 2026-11-22 02:01:49 +08:00
ldm0 4ede2ba643 test(document): cover child parser error readiness 2026-11-22 02:01:49 +08:00
ldm0 f7be2feec5 fix(scripts): restore child parser insertion point on fetch errors 2026-11-22 02:01:49 +08:00
ldm0 4d05acb4ff fix(scripts): queue parser preparation error events
Distinguish empty or invalid external script URLs from internal parser preparation failures. Queue trusted element errors on the shared DOM-manipulation source for root, document.write, and child parser paths without reporting spurious Window exceptions.

Retain exact Document ownership, listener checkpoints, and already-started state. Cover stale tasks and reused PageVm-local ids, and record the two WPT cases verified in CLI and CDP modes.
2026-11-22 02:01:49 +08:00
ldm0 984a7afbff fix(modules): bind synthetic text sources to their owning records
Resolve JSON and CSS evaluation data by exact module identity in the compiling realm, with weak context entries owned by compiled records. Remove the main-Document source lookup that broke child imports.

Cover static and deferred dynamic child imports, realm-local caches, parse errors, identity collisions and record disposal. Mark both JSON/CSS cross-origin WPT cases passing after CLI/CDP verification.
2026-11-22 02:01:48 +08:00
ldm0 d124fbf6ee fix(scripts): enforce client-origin CORS before script execution
Bind script loads and cache entries to the document client origin, authorize redirects before following them, and preserve redirect origin taint across Window and Worker Fetch/XHR validation and response filtering.

Check dynamic script CSP before transport, cover real HTTP and lifecycle regressions, and refresh the one newly passing WPT case after fixed-binary CLI/CDP comparisons.
2026-11-22 02:01:48 +08:00
ldm0 93a748899c fix(modules): preserve original exceptions through error reporting 2026-11-22 02:01:48 +08:00
ldm0 e3635231be fix(navigation): defer child Location commits and honor window.stop
Prepare pending child history seeds without mutating the active Location, history state, or NavigationHistoryEntry. Preserve initiator URLs and reserved service worker clients when queuing the deferred commit.

Cancel pending child navigation tasks and invalidate in-flight response ownership without clearing another window navigation. Preserve cross-document history traversals and reject incompatible Window.stop receivers.

Add regression coverage for five navigation entry points, retained document/history identity, sibling and parent isolation, late responses, resumed navigation, and traversal. Align integration assertions with committed URLs and test meta refresh through a real network load.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (17581 passed, 13 skipped). The 22 overlapping-navigation WPT cases improve from 12 to 16 passes with no lost passes; seven focused cases pass again. Move the four reproducibly fixed cases from failed to passed.

An earlier full nextest run hit one empty-output assertion in cli_meta_refresh_shutdown_exits_without_renderer_abort; retained its log. Independent old/new binary probes did not reproduce it, and the complete rerun passed without changing or skipping that test. Artifacts: target/wpt-window-stop-20260908-XbyH6Q.

Additional paired release validation: all 385 previously passing Navigation API cases remain passing out of 432. Two existing incomplete cases exchange timeout/harness-stalled classification; all other statuses, subtest counts and failure names are unchanged. Release SHA256: 11d9e1bf1faa64b07538c5f7ed93e7d04a6761d10d4d591433480a614df8a293.
2026-11-22 02:01:48 +08:00
ldm0 680b922cde fix(import-maps): merge maps after module loading 2026-11-22 02:01:46 +08:00
ldm0 cf2ae85a21 fix(renderer): complete tabular element reflection 2026-11-22 02:01:45 +08:00
ldm0 278a33657e fix(media): queue windowless media events in the owning Window
Extracted from wpt-misc-fix commit b15edec28e.
2026-11-21 21:29:32 +08:00
ldm0 e81c2b2940 refactor(events): share Window event dispatch state 2026-11-21 20:47:16 +08:00
ldm0 e3db521b72 fix(events): clear child Window event dispatch state after delivery
Extracted from wpt-misc-fix commit ec06beb134.
2026-11-21 20:12:33 +08:00
ldm0 d6ac8d313b fix(document): initialize child navigation documents in the loading state
Extracted from wpt-misc-fix commit d01523e4a8.
2026-11-21 18:52:20 +08:00
ldm0 0abfa1b92d fix(indexeddb): validate schema key paths and exception ordering
Extracted from wpt-misc-fix commit ed78778f5d.
2026-11-20 19:15:13 +08:00
ldm0 cbaf7dc3a4 test: consolidate browser API regression fixtures
Combine the fixture changes from #3271, #3272, #3274, #3275, #3276, #3277.
2026-11-20 11:33:20 +08:00
ldm0 c80d14e45c test: consolidate web platform regression coverage
Consolidates #3242, #3243, #3244, #3245, #3247, #3248, #3249, #3250, #3251, #3252, #3253, #3254, #3255, #3256, #3258.
2026-11-20 02:50:53 +08:00
ldm0 7c7c130d19 refactor(diagnostics): publish only completed error reports 2026-11-20 01:52:30 +08:00
ldm0 f0f9e6b450 fix(diagnostics): connect restored service workers to the browser 2026-11-20 01:52:30 +08:00
ldm0 936886a80d refactor(diagnostics): initialize one subscription per browser 2026-11-20 01:52:30 +08:00
ldm0 ba95f94aa3 perf(runtime): reduce diagnostics and module error overhead 2026-11-20 01:52:30 +08:00
ldm0 140666eb86 refactor(worker): share error reports with diagnostics 2026-11-20 01:52:30 +08:00
ldm0 ef1af830c1 fix(worker): interrupt error reporting for retired owner windows 2026-11-20 01:52:30 +08:00
ldm0 242bcffeca feat(runtime): publish completed exception reports 2026-11-20 01:52:30 +08:00
ldm0 0e587040c2 fix(runtime): report iframe exceptions and script load failures 2026-11-20 01:52:30 +08:00
ldm0 c36b90fad4 refactor(runtime): use one unbounded diagnostics subscription 2026-11-20 01:52:30 +08:00
Noz Wu 31ec48b69d feat(runtime): expose uncanceled runtime failures 2026-11-20 01:52:30 +08:00
ldm0 a679836d3c fix(runtime): preserve diagnostic origin and script request identity 2026-11-20 01:52:30 +08:00
Noz Wu c687399bac feat(runtime): publish exception and script load diagnostics 2026-11-20 01:52:30 +08:00
ldm0 bc6ebc26c5 test(fonts): wait for initial readiness before a second load
Extracted from wpt-misc-fix commit a03c31a4cd.
2026-11-19 14:42:36 +08:00
ldm0 a7ba47ae14 test(core): allow diagnostics in lifecycle panic isolation
Extracted from wpt-misc-fix commit bbb3941ec6.
2026-11-19 13:48:13 +08:00
ldm0 02d8f96d48 test(modules): isolate malformed child parser JSON from valid imports
Extracted from wpt-misc-fix commit d313c717fba5f77b21a09930e4fc8dfc104298d6.
2026-11-18 22:04:42 +08:00
ldm0 2e37a7a8d9 fix(preload): derive load events from Fetch results
Extracted from wpt-misc-fix commit 3e7aac0bf96a1ed5291e5991d40e51ec64127a8e.
2026-11-18 21:47:02 +08:00
ldm0 f8c2212fb8 test(fetch): cover UTF-8 BOM decoding in Request streams
Extracted from wpt-misc-fix commit af8353408876f1cb8a2fac98ebadf24359b7f5f1.
2026-11-18 19:47:21 +08:00
ldm0 be4a1c2fe8 test(indexeddb): extend key-range coverage to binary bounds and bulk operations
Extracted from wpt-misc-fix commit 7164c7cb090dfd4ab0f92fc31c3a5026c39f3868.
2026-11-18 19:47:07 +08:00
ldm0 3ecc957f1a test(indexeddb): cover binary queued query snapshots
Extracted from wpt-misc-fix commit 548b0c08ca312eb68dba83d1ebd999699dec37f6.
2026-11-18 19:11:54 +08:00
ldm0 f67d772e45 test(indexeddb): cover version payloads on delete success
Extracted from wpt-misc-fix commit 35edf0848c256969f6c0e40bdbe84e50a0effa47.
2026-11-18 19:11:26 +08:00
ldm0 faf4ab968f fix(iframe): reload unchanged src during load callbacks
Extracted from 9ab13e46f8 on wpt-misc-fix.
2026-11-18 16:42:25 +08:00
ldm0 68d6d03838 fix(network): preserve form Origin and apply post-formdata policy 2026-11-18 00:10:43 +08:00
ldm0 951880d512 fix(referrer): snapshot the creator policy for initial child Documents
Extract an independent, cohesive change from wpt-misc-fix.

Source-commit: 7bf4ce062b
2026-11-17 05:33:17 +08:00