Commit Graph
4226 Commits
Author SHA1 Message Date
ldm0 a2dab3111b 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-24 14:29:42 +08:00
ldm0 4bbf76d555 fix(document): reset child input-stream readiness 2026-11-24 14:29:42 +08:00
ldm0 629be4188e test(document): cover child parser error readiness 2026-11-24 14:29:42 +08:00
ldm0 d73431845a fix(scripts): restore child parser insertion point on fetch errors 2026-11-24 14:29:42 +08:00
ldm0 eb7194c3b9 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-24 14:29:42 +08:00
ldm0 a6cc27bc66 fix(trusted-types): align WebIDL interfaces and global accessors 2026-11-24 14:29:42 +08:00
ldm0 f1696bdc2d fix(csp): validate Trusted Types directive name tokens
Discard non-ASCII directives independently before duplicate lookup and retain exact ASCII whitespace boundaries. Match literal Trusted Types allowlist entries only when they satisfy tt-policy-name, while preserving arbitrary policy names without CSP or under a wildcard.

Add exhaustive ASCII token tests, directive parsing regressions, and enforce/report-only delivery coverage. Validated with fmt, full-workspace Clippy and all 17,735 nextest tests. The 219-case Trusted Types suite gains one passing case and five passing subtests in both CLI and CDP, with all other semantic results unchanged.
2026-11-24 14:29:42 +08:00
ldm0 a009506b83 fix(trusted-types): use node document policies for attribute sinks
Select attribute sink requirements, default policies, and report owners from the element's current node document while preserving the operation's exception realm. Avoid retrying native Attr mutations after conversion throws, and preserve native Attr namespace metadata and canonical cache identity.

Validated with cargo fmt, full-workspace Clippy, and all 17,730 nextest tests. The 219-case Trusted Types suite gains three passing cases and 36 passing subtests in both CLI and CDP, with no other semantic changes; all 13 DOM attribute/adoption regression cases remain passing.
2026-11-24 14:29:42 +08:00
ldm0 e951da428f fix(trusted-types): report every violated CSP policy
Report each enforced and report-only Trusted Types policy independently, preserving per-policy endpoints and source locations. Queue worker TT and WebSocket CSP reports without synchronous reentry or overtaking earlier reports.

Honor report-only Trusted Types requirements for worker importScripts and string timers. Cover duplicate policies, default-policy conversion, trusted values, asynchronous delivery, and cross-directive ordering.

Validation: cargo fmt --all; workspace clippy with all targets/features and -D warnings; full nextest (17726 passed, 13 skipped). All 219 Trusted Types WPT cases compared in CLI and CDP: 191 to 195 passed, 9 additional passing subtests, no regressions. Promote the four verified cases in the baseline lists.
2026-11-24 14:29:42 +08:00
ldm0 59bd8c4b26 fix(workers): preserve imported script origins and no-cors boundaries
Keep worker settings URLs stable while imported classic scripts retain their own dynamic-import base, request URL and muted-error metadata. Allow classic no-cors imports without relaxing module CORS or response security policies.

Preserve CSP source locations and pre-redirect URLs through worker callbacks and report serialization. Add regression coverage for redirects, CSP/CORP/COEP, opaque errors, rejection reporting and nested imports.

Validation: cargo fmt --all; full workspace clippy with warnings denied; nextest 17699 passed, 13 skipped. Before/after CLI and CDP comparisons cover 707 cases without losing an originally passing case. Promote only the worker importScripts base-URL WPT. Both smoke baselines are 42/43, with Puppeteer blocked by the same missing local puppeteer-core dependency.
2026-11-24 14:29:42 +08:00
ldm0 760242dc2b 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-24 14:29:42 +08:00
ldm0 bb2a026b8d 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-24 14:29:42 +08:00
ldm0 13dab2f718 fix(webapi): reconcile replayed FileList binding and regressions
Use the shared FileList interface identity in the replayed input setter.
Remove the duplicate XHR URL and credentials regression while retaining
one complete copy, and format the newly replayed WebRTC import.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(17971 passed, 13 skipped).
2026-11-24 14:29:42 +08:00
ldm0 35d9bbf34f fix(modules): preserve source locations through exception reporting
Carry inline document URLs and parser offsets into V8, and report retained exception locations without reading author properties. Keep import.meta tied to the preparation-time resolution base and pass the actual document URL to child parsers.

Add seven regressions and mark evaluation-error-5.html passing after fixed-binary CLI/CDP comparisons. Full fmt, workspace Clippy, and nextest checks pass.
2026-11-24 14:29:42 +08:00
ldm0 f3fefd5811 fix(modules): report child script exceptions in their owning Window
Route child parse, link, and evaluation failures to the exact current Window while retaining the original exception value, including deferred top-level await rejection. Keep fetch failures on script.error, restrict load events to external modules, and avoid a second load on deferred rejection.

Reuse body-only error dispatch and preserve selected-task checkpoints, parser order, and stale-owner guards. Add six end-to-end regressions and update two old syntax-error fixtures to require Window.error followed by external script load.

Validation: cargo fmt --all; full workspace all-targets all-features Clippy with warnings denied; full nextest 17659 passed, 13 skipped. Fixed-binary CLI and CDP each run the same 166 WPT cases: 139 to 140 passed, with no other case regressions and two additional crossorigin subtests passing. Move only module/errorhandling.html into the passed list. CDP smoke: 42/43 groups; Puppeteer cannot start because node is absent.
2026-11-24 14:29:42 +08:00
ldm0 bf12a2d7ab fix(modules): preserve original exceptions through error reporting 2026-11-24 14:29:42 +08:00
ldm0 dddfa8ea66 fix(modules): retain parse and static request exception identity
Carry realm-owned exception tokens through the module tree, preserve V8 compile exceptions, and cache static dependency validation failures without caching direct import resolution or network errors. Keep values GC-traced and isolated across WindowProxy reuse.

Add identity, shared-dependency, realm, GC, and pending-sibling regressions. Validated with fmt, full workspace Clippy, 17647 nextest passes, and a matched 148-case CLI/CDP WPT slice. The target now passes 11/11 subtests; smoke is 42/43 with the baseline missing-node Puppeteer failure.
2026-11-24 14:29:42 +08:00
ldm0 bcc4658b4b fix(url): align hierarchical and opaque path encoding
Encode carets in hierarchical paths and encode only the final opaque-path space before query or fragment delimiters. Preserve the encoded path across suffix mutations and remove the obsolete parser trimming and V8 query-removal workaround.

Add five shared-parser and three VM regressions covering constructors, setters, URLSearchParams, DOM links, and cross-realm behavior. Synchronize 11 stale vendored WPT expected records with pinned current WPT data; inputs, the WPT driver, and the remaining expected-failure entry are unchanged.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (17632 passed, 13 skipped). Vendored all-features unit tests, WPT driver, and 67 doctests pass.

On the same 50 URL/Location WPT cases, CLI and CDP both improve from 42 to 48 passing cases and from 7036 to 7085 passing subtests (+49), with no new failures. The two remaining failures are the existing webkitURL alias and srcdoc scrolling cases. Move the verified non-file anchor case to passed.

CDP smoke: 42/43 groups pass. Puppeteer cannot run because node is absent, reproduced with the before binary.

Artifacts: target/wpt-url-encoding-20260908-AP6CI1. WPT revision: db95fafd1fcef8428805e41eb5705d444e8c67ce. Release SHA256: f132f0afe7f49d627ed9b5d397b1d5b71d80432180b08b1d076aa67637efdd65.
2026-11-24 14:29:42 +08:00
ldm0 07c3949e62 fix(url): keep hierarchical paths distinct from authorities
Apply scheme-specific slash handling to relative URL resolution: consume all special authority slashes, but retain non-special backslashes as path data.

Share serialization-only path prefix adjustment across parsing and path mutation, preserve logical paths when adding or removing authorities, and keep host metadata and query/fragment offsets consistent. Distinguish empty authorities from missing hosts in pathname setters and remove the redundant Web API workaround.

Add seven parser/mutation regressions and two cross-realm URL/DOM regressions. Remove only the seven upstream expected failures proven fixed; retain the original WPT data.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (17,624 passed, 13 skipped); upstream all-features unit/WPT/doctests.

Focused CLI/CDP WPT agree across 50 cases: 48 additional passing subtests, no new failures. CDP smoke passes 42/43 groups; Puppeteer cannot start because node is missing, unchanged from baseline.
2026-11-24 14:29:42 +08:00
ldm0 aeb6077638 fix(url): preserve file URL hosts and path segments
Vendor the existing url 2.5.8 release and align file parsing with WHATWG host inheritance, drive-letter handling, and empty path segments. Keep the dependency version and resource access policy unchanged.

Retain upstream test data and licenses, remove 39 fixed expected failures, and add parser, DOM/URL, and URL-policy regressions. Document the patch and pinned upstream revision in MOLI-PATCHES.md.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (17,615 passed, 13 skipped); upstream all-features unit/WPT/doctests.

CLI and CDP WPT agree across 50 cases: 132 additional passing subtests, no new failures, and the file anchor case now passes 138/138. CDP smoke passes 42/43 groups; Puppeteer cannot start because node is missing, unchanged from baseline.
2026-11-24 14:29:42 +08:00
ldm0 478080b95f 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-24 14:29:42 +08:00
ldm0 b154a30079 fix(xhr): resolve open URLs with credentials 2026-11-24 14:29:42 +08:00
ldm0 011861d0c5 fix(fetch): honor sandboxed opaque request origins 2026-11-24 14:29:42 +08:00
ldm0 381d8d8315 fix(script): mute cross-origin classic script errors 2026-11-24 14:29:42 +08:00
ldm0 241a611c3f fix(window): reject indexed writes and definitions 2026-11-24 14:29:42 +08:00
ldm0 17b3fa22d2 test(wpt): mark live window index deletion passing 2026-11-24 14:29:42 +08:00
ldm0 c123d29e08 fix(window): reject deleting live indexed children 2026-11-24 14:29:42 +08:00
ldm0 bd67437742 test(wpt): mark child meta refresh referrer passing 2026-11-24 14:29:42 +08:00
ldm0 bd27dd1c8f fix(refresh): use child document as navigation referrer 2026-11-24 14:29:42 +08:00
ldm0 18ddfdd7ba fix(location): use executing document as navigation referrer 2026-11-24 14:29:00 +08:00
ldm0 2668a07c00 fix(history): enforce document URL rewrite rules 2026-11-24 14:28:15 +08:00
ldm0 18978195b3 fix(history): count child pushes in joint session history 2026-11-24 14:28:15 +08:00
ldm0 dafcd59c79 fix(history): preserve joint length for initial child documents 2026-11-24 14:28:15 +08:00
ldm0 61fe27e110 fix(iframe): reuse initial document for about blank variants 2026-11-24 14:28:15 +08:00
ldm0 05ba8fb85a fix(location): track ancestor origins per document 2026-11-24 14:28:15 +08:00
ldm0 decbb37027 fix(window): defer lightweight popup teardown 2026-11-24 14:28:15 +08:00
ldm0 41302e913b fix(window): preserve browsing context opener semantics 2026-11-24 14:28:15 +08:00
ldm0 a62f724721 fix(window): keep retired iframe relations discarded 2026-11-24 14:28:15 +08:00
ldm0 cabbd97992 fix(document): throw stream errors in the relevant realm 2026-11-24 14:28:15 +08:00
ldm0 3a4adabc66 fix(window): resolve live cross-origin child proxies 2026-11-24 14:28:15 +08:00
ldm0 15b762ed36 fix(iframe): discard child window relations synchronously 2026-11-24 14:28:15 +08:00
ldm0 b1527bca38 test(wpt): mark browsing context case passing 2026-11-24 14:28:15 +08:00
ldm0 7c8936b406 fix(dom): initialize empty browsing contexts correctly 2026-11-24 14:28:15 +08:00
ldm0 fccad203a0 fix(dom): inherit origin for constructed documents 2026-11-24 14:28:15 +08:00
ldm0 773467f3ed fix(events): reflect child frameset handlers on window 2026-11-24 14:28:15 +08:00
ldm0 66d9605312 test(wpt): refresh cross-engine case lists 2026-11-24 14:28:15 +08:00
ldm0 577e4170aa test(wpt): refresh cross-engine case lists 2026-11-24 14:28:15 +08:00
ldm0 74ed84a47b fix(modules): preserve graph error constructors 2026-11-24 14:28:15 +08:00
ldm0 c90cf0b97d fix(html): reflect iframe CSP attribute 2026-11-24 14:28:15 +08:00
ldm0 ed74f37dc5 fix(forms): avoid quadratic selectedcontent synchronization 2026-11-24 14:28:15 +08:00