Commit Graph
4943 Commits
Author SHA1 Message Date
ldm0 fbe28455f4 fix(errors): separate exception data from native failure stacks
Build script-created DOMException subclasses and deserialized exception data without attaching a new stack. Native failure factories keep V8 stack capture, including the WebTransport session-failure path that previously reused its clone builder.

Preserve inherited stack accessors, native clone fields, realm and reference identity, getter avoidance, and ordinary JS Error stacks. Reuse a fixed Chromium fixture in Window, child Window, classic Worker, and module Worker.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (23213 passed, 17 existing skips, 32 threads, no retries).
2026-11-20 22:47:56 +08:00
ldm0 03eb0869e4 fix(fonts): distinguish generic FontFaceSet family queries
Read authored family names from native Stylo declarations while preserving quoted names, escapes, and family order. Share the existing generic keyword vocabulary so generic queries do not load same-named authored faces or duplicate them in mixed lists.

Cover Window, child Window, classic Worker, and module Worker against a fixed Chromium fixture. Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (23211 passed, 17 existing skips, 32 threads, no retries).
2026-11-20 22:47:56 +08:00
ldm0 e4c054bbd7 fix(fonts): preserve native load promises and request ownership
Keep FontFace.loaded lazy without duplicating native load state, preserving
promise identity, realm, and retention through asynchronous CSS or JS loads.
Bind explicit font requests to the exact Window, retain redirect CSP checks,
and distinguish Script request attribution from css ResourceTiming entries.
Preserve main's explicit request policy and shared resource preparation.

Drive local URL completions through real resource tasks in domain tests,
keep the queued FontFaceSet finish-task regression, and retain both CSSOM
and Typed OM font assertions with the parser fallback regression.
2026-11-20 22:47:56 +08:00
ldm0 2c1b6f34ee feat(urlpattern): add native Window and worker bindings
Use derived dictionaries and snapshots with native receiver brands. Reuse
URLPattern component parsing and bounded V8 regular expressions, including
scoped protocol inference and Unicode-set matching.

Keep native V8 constructor allocation. Cover cross-realm receivers, input
snapshots, isolated regex captures and native matching resource limits.

Validation: fmt and workspace clippy passed; nextest 23152 passed with 17
existing skips. Original stable URLPattern WPT: 2214 PASS in each of debug,
release and Chromium 152 across Window and dedicated Worker cases.
2026-11-20 22:47:56 +08:00
ldm0 5e07fda543 revert(webidl): retain native V8 constructor allocation
Withdraw the deferred-prototype entry introduced by cf7650f744 and migrate
all 22 public constructor kinds back to their native FunctionTemplate.
Remove hidden NewTarget state and the vendored callback argument override.

Accept Chromium's prototype lookup timing and primitive prototype fallback
instead of paying for per-construction Proxies, hidden functions and state.
Keep native brands, dictionary conversion and the separate HTMLConstructor
path. Preserve the collection Reflect.set intrinsic in its own module.

Cover native function identity, subclassing, explicit and cross-realm
prototypes, exception order, and mutation during argument conversion.
2026-11-20 22:47:56 +08:00
ldm0 3de84bb18b fix(window): preserve active documents during popup close 2026-11-20 22:47:56 +08:00
ldm0 362288d21a fix(location): read Document locations from their Window
Resolve active Documents through their native Window association instead of a per-wrapper Location copy. Remove the duplicate cache and its bootstrap/navigation synchronization. Cover real popup parser/load phases, borrowed getters, and retired/windowless Documents.
2026-11-20 22:47:56 +08:00
ldm0 686b9e4283 fix(performance): report observer drops in callback realm 2026-11-20 22:47:56 +08:00
ldm0 70356ddc84 fix(console): convert labels before native counting and timing 2026-11-20 22:47:56 +08:00
ldm0 f581c8ce3b fix(console): expose consistent namespace objects across realms 2026-11-20 22:47:56 +08:00
ldm0 9ab4731043 fix(fonts): preserve literal family names in native FontFace state
Keep UTF-16 family identity separate from public CSS text using typed WebIDL declarations. Match native names through shared font-query parsing without reading author getters, preserving query order and repeated families. Cover source modes, cross-realm access, escapes and unpaired-surrogate identity.
2026-11-20 22:47:56 +08:00
ldm0 c6e48cf458 fix(fonts): validate data URL payloads during font loading
Keep syntactically valid string sources unloaded until load() and let the native source loader validate bytes and try later candidates. Preserve malformed CSS and binary payload errors, and cover data URL failure and fallback through actual asynchronous font tasks.
2026-11-20 22:47:56 +08:00
ldm0 12340c1da7 fix(dom): preserve transient mutation observer registrations
Keep removed-subtree registrations until each observer's notification turn,
including removals whose childList record is suppressed or not requested.
Preserve original registration sources through nested removals, clear only
the updated source on observe(), and aggregate oldValue across matching
registrations. Freeze notification membership but take each queue only at
its own turn so earlier callbacks can mutate, drain or disconnect it.

Add 378 lifecycle checks across main/child realms and live, windowless HTML,
DOMParser and XML documents, including Range, adoptNode and normalize.
Validation: cargo fmt --all; strict workspace/all-targets/all-features clippy;
full nextest (23116 passed, 17 existing skipped, combined final source tree).
2026-11-20 22:47:56 +08:00
ldm0 b1ae143eea feat(dom): preserve ordered subtree-removal observer effects
Preserve the old ancestor handles and mutation order for subtree removals,
independently of web-visible childList records. Suppression, clearing and
coalescing retain removal steps while keeping the existing records() view.
Capture this information only for MutationObserver interest; DevTools-only
recording keeps its existing payload and behavior.

Cover batch merging/coalescing/suppression and old ancestry across moves.
Validation: cargo fmt --all; strict workspace/all-targets/all-features clippy;
full nextest (23116 passed, 17 existing skipped, combined final source tree).
2026-11-20 22:47:56 +08:00
ldm0 bd9955a91c fix(forms): share bounded native pattern validity across documents 2026-11-20 22:47:56 +08:00
ldm0 6c0aee6ec9 fix(dom): preserve form state during bulk child removal
Capture option selectedness before removing any children and apply runtime removal effects once. Route markup and DOM replace-all through the same owner, queue one replacement record, and retain earlier independent observer records.
2026-11-20 22:47:56 +08:00
ldm0 37bdc19304 fix(dom): parse XML markup fragments with native namespace contexts
Share a strict XML fragment parser across Range.createContextualFragment,
innerHTML, outerHTML and insertAdjacentHTML. Carry native in-scope namespace
bindings without inherited DTD entities, preserve XML node kinds and UTF-16
TrustedHTML inputs, and keep parsed scripts inert after adoption.

Validate the complete fragment before replacing existing children and expose
syntax failures as DOMExceptions in the callee realm. Keep setHTMLUnsafe on
its HTML parser path. Cover native Proxies, ShadowRoot and template contexts,
cross-realm calls, mutation atomicity and malformed namespace declarations.
2026-11-20 22:47:56 +08:00
ldm0 2d61faa2f5 fix(dom): select fragment parser contexts from native Range state
Read the stored start boundary and native node document instead of public
Node properties. Use parent elements for Text, CDATA and Comment contexts
and create an HTML body for the specified fallback cases.

Remove the script-visible detached DOM fallback and preserve the Range
receiver realm when wrapping the fragment. Cover property overrides,
windowless and parsed documents, cross-realm calls, conversion ordering,
and registered native Range proxies.
2026-11-20 22:47:56 +08:00
ldm0 13267ef958 fix(scripting): prepare DOM scripts using their actual document
Use the shared runtime script loader for native JS tree mutations regardless
of compatibility wrapper state. Test connectivity against the script's DOM
document, keeping parser-owned insertion on its separate deferred path.

Preserve early preparation bailouts, consume disabled and legacy-mismatched
scripts, and prepare completed windowless document.write scripts without
executing them. Resolve currentScript from the document execution stack even
when a live document has acquired compatibility metadata.

Cover nine tree operations across Window, iframe and popup owners, adoption,
DOMParser nodes, inert documents, fragments, templates and native Proxy aliases.
2026-11-20 22:47:56 +08:00
ldm0 27893cb2b2 fix(dom): share native Node tree mutation bindings across documents
Use owner-aware native Node references and derived Web IDL arguments for
appendChild, insertBefore, replaceChild and removeChild. Windowless nodes
inherit the canonical owner-realm methods instead of legacy forwarders.

Preserve live delegate script preparation, original argument identities and
author properties during native adoption and subsequent tree access. Remove
unused private bridge routes and avoid rebinding public properties for native views.

Cover cross-realm errors, registered native proxies, atomic rejection,
mutation records, XPath invalidation and deep native subtree identity.
Update two owned snapshot-era tests against independent Chromium evidence.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(23093 passed, 17 existing skipped; 32-way execution, no automatic retries).
2026-11-20 22:47:56 +08:00
ldm0 aae91f56df fix(fullscreen): align native attributes and promise receiver bindings
Expose Document.fullscreen and Document/ShadowRoot.fullscreenElement through
the existing native receiver bindings, including LegacyLenientSetter behavior.
Use the shared returns_promise adapter for requestFullscreen and exitFullscreen
so receiver and argument errors reject callee-realm Promises. Convert options
with WebIdlArgs before acquiring native runtime references.

Cover 1361 Chromium-verified binding cases and registered native aliases while
retaining the existing unsupported-platform and fullscreenerror event behavior.
2026-11-20 22:47:56 +08:00
ldm0 739e83007e fix(dom): allocate windowless nodes with owner realm interface prototypes
Create Text, Comment, CDATASection, ProcessingInstruction and DocumentFragment
objects directly on their owner realm's intrinsic interface prototype. Remove
their compatibility prototype layer and instance Symbol.toStringTag property.
Keep conversion in the binding realm and allocate native state in the owner's
context, including borrowed cross-realm Document methods.

Add an 880-case Chromium-verified matrix covering prototypes, constructor
replacement, cloning, tree operations and UTF-16 CharacterData.

Retain exact bootstrap/template boundary assertions at the reduced eager set
and verify first native wrapper creation materializes only owner-realm
CharacterData intrinsics. Preserve managed identities after public constructor
replacement in the node matrix as well.
2026-11-20 22:47:55 +08:00
ldm0 b5f25da4c1 fix(dom): validate XPathResult receivers and preserve native alias state
Use generated WebIDL receiver checks for all result members and expose the
required snapshotItem length. Convert its index before checking the result
kind, preserving throwing and reentrant numeric conversions.

Resolve private result slots through the registered native backing for reads
and writes so aliases share scalar values, iterator cursors and mutation
invalidation. Keep author and revoked proxies outside native brands.

Cover all result kinds in live/windowless HTML/XML documents across realms,
including native aliases and unchanged snapshots after document mutations.
2026-11-20 22:47:55 +08:00
ldm0 4ac658a599 fix(dom): validate extended Element methods through native WebIDL inputs
Use generated Element receivers and typed Attr/Element arguments before DOM
algorithm early returns. Preserve UTF-16 text and the original argument
identity in adjacent insertion.

Call Attr mutation helpers directly instead of forwarding through global
bridge methods. Share private Attr caches and ownership across registered
native proxies while rejecting author proxies through existing brands.

Cover two realms and live/windowless HTML/XML documents, conversion order,
replacement/removal, native proxy identity and lone surrogates.
2026-11-20 22:47:55 +08:00
ldm0 aa7c59c122 fix(deps): retain shared pinned IDNA with the vendored URL implementation
Keep main's pinned rust-url IDNA patch while retaining the local URL fork's
file-host and path-segment fixes. Resolve URL, cookie and renderer consumers
to one shared IDNA package.
2026-11-20 22:47:55 +08:00
ldm0 e22fac47c4 fix(dom): validate ShadowRoot members with native receivers
Use generated receiver checks for ShadowRoot members and Text.assignedSlot,
and expose enumerable ShadowRoot and slot operations. Share stylesheet
caches through the native backing identity and private slots so registered
native proxies remain usable without invoking author traps.

Cover borrowed bindings, callee-realm TypeErrors, forged/revoked/author
proxies, conversion ordering and genuine roots across live, windowless and
XML documents. Exercise registered native proxies in both realms.
2026-11-20 22:47:55 +08:00
ldm0 187130dec4 refactor(csp): share parsed policies across inherited request snapshots
Adapt document projections, popup activation, worker policy iteration and
navigation snapshots to the shared ContentSecurityPolicy type. Retain meta
policy provenance and reporting rules, and keep mutable creator lifecycle
state in the renderer. Place iframe source-list subsumption beside the
shared checks and preserve its existing regression coverage.
2026-11-20 22:47:55 +08:00
ldm0 d7ef962f02 fix(fetch): retain native curl extensions with main header parsing
Port the upstream browser-response-headers feature, build adapter and C shim into the bundled libcurl. Keep the existing TLS EOF behavior and native connection timing while exposing the framing and header semantics required by main.
2026-11-20 22:47:55 +08:00
ldm0 f373fc64f3 refactor(css): adapt native consumers to Stylo 0.22
Use owned parser errors and typed math payloads, keep the 128-level numeric parsing limit and preserve RangeError classification. Pin the native font shorthand port on Stylo 0.22 instead of adding callback exceptions.
2026-11-20 22:47:55 +08:00
ldm0 fde47a68f1 fix(dom): bind ParentNode members to their owning interfaces
Use native receiver guards for Element and DocumentFragment mixin members,
including DocumentFragment.getElementById. Let detached wrappers and
ShadowRoot inherit canonical methods instead of reinstalling unguarded
forwarders with different metadata and identities.

Resolve registered Node proxies through their native backing object while
preserving pre-branding factory reads. Keep detached mutation synchronization
and create querySelectorAll results in the receiver realm without changing
the realm of selector exceptions. Mirror adoption delegates on native Proxy
backings while retaining canonical detached-tree identities.

Cover owner interfaces, cross-realm borrowing, conversion ordering, native
proxies, forged receivers, static/live collections and ShadowRoot inheritance.
2026-11-20 22:47:55 +08:00
ldm0 7bf1b354ca fix(build): reconcile definitions after main integration
Keep one copy of the image and Trusted Types regressions, native Document
charset setter and MessagePort test registration. Retain the stronger
policy regression and reuse the shared setter when initializing parsed
Document metadata. Avoid setting the child Document charset twice.
2026-11-20 22:47:55 +08:00
ldm0 e6aa4d1549 test(dom): require UTF-8 for srcdoc native documents
A srcdoc response supplies Unicode markup and is parsed as UTF-8 even
when the parent Document has a legacy charset. Match Chromium 152 and
keep the existing GBK mutation, cloning and per-Document isolation checks.
2026-11-20 22:47:55 +08:00
ldm0 c57dc1a6f9 fix(events): derive CustomEvent initialization and prototype detail
Expose detail through the native CustomEvent prototype declaration and
validate receivers with the shared interface brand. Keep arbitrary payload
values in the private event backing without projecting or copying them.

Convert inherited EventInit and raw CustomEventInit members through the
shared dictionary derive before initializing state. Preserve exceptions,
getter order, empty dictionary defaults and legacy initialization semantics.

Cover cross-realm descriptors, abrupt conversions, author and registered
native Proxies, windowless Documents and author-modified prototypes.
2026-11-20 22:47:55 +08:00
ldm0 774a22ebd2 fix(dom): expose immutable MutationRecord prototype attributes
Keep record values in private slots and expose the nine readonly attributes
through branded prototype getters. Preserve snapshot identity across realms,
shadow properties, registered native Proxies, and retained records.

Create delivery arguments in the callback function's relevant realm so
MutationRecord wrappers and arrays use the correct prototypes.
2026-11-20 22:47:55 +08:00
ldm0 7b3cd95375 fix(webidl): wrap native Promise arguments in fresh capabilities
Create a new callee-intrinsic Promise capability for every Web IDL Promise
conversion, including native Promise inputs. Resolve it with the input so
then lookup, asynchronous then calls and rejections follow V8's algorithm.

Cover realm and object identity, author-replaced public Promise constructors,
throwing then getters, revoked Proxies, scalar inputs, required arguments
and per-entry record conversion order. Require all 378 existing Payment
checks to pass instead of expecting the 16 native-Promise wrapping gaps.
2026-11-20 22:47:55 +08:00
ldm0 ea07e89d00 fix(webmcp): separate submission and response lifetimes
Cancel same-stack form removal after requestSubmit for every respondWith
input, while retaining responses captured during submit dispatch or already
handed to asynchronous response processing. Track submission phases through
a native microtask continuation instead of inspecting Promise state.

Cover scalar, fulfilled and pending native Promise, and thenable responses,
manual and automatic submission, and late resolution after cancellation.
Keep the existing form unmount and original WebMCP WPT assertions intact.
2026-11-20 22:47:55 +08:00
ldm0 5a6b872e91 refactor(media): derive metadata dictionary sequences 2026-11-20 22:47:55 +08:00
ldm0 5f34319d4b refactor(cache): use derived request argument conversion 2026-11-20 22:47:55 +08:00
ldm0 a8c8a4f6d7 refactor(payment): use typed dictionary snapshots 2026-11-20 22:47:55 +08:00
ldm0 f567c827c0 fix(runtime): retain popup replacement lifecycle during owner startup
Keep a lifecycle resident already bootstrapped for a foreign document.open
operation's exact target Document. Its later close action resumes that driver
instead of retiring it or clearing the target Document's queued work.

Cover open-before-owner-bootstrap followed by a separate close, including
exact admission ownership and reactivation of the parked resident.
2026-11-20 22:47:55 +08:00
ldm0 593fd166a4 fix(forms): preserve sandbox admission for planned navigations
Resolve existing ancestor targets through the native navigation model before
formdata can replace the source Document, retaining main's sandbox admission
checks alongside queued and cancellable form submission.

Run the inherited sandbox matrices through the Page task executor. Preserve
all cases and permission assertions, and cover same-origin POST interception
as supported by the Navigation API and verified in Chromium 152.
2026-11-20 22:47:55 +08:00
ldm0 2653b342b1 fix(runtime): complete document replacements across Page owners
Retain the exact open/close action made by another Page and wake its lifecycle owner. Coalesce consecutive replacements without letting an unrelated action consume an older admission.

Resolve event callbacks through their own Context runtime binding so lifecycle listeners from other Page hosts are invoked and report exceptions in the correct Window.

Cover real HTTP popup replacement from root, iframe, popup and self, later close and repeated open/close, plus stale admission and coalescing authority.

Validation: cargo fmt --all; full workspace all-targets/all-features clippy -D warnings; cargo nextest run --no-fail-fast (22,989 passed, 17 existing skips, 32 threads, zero retries).
2026-11-20 22:47:55 +08:00
ldm0 cdbecb7f13 fix(dom): resolve document.open entry Documents across Page hosts
Retain the native entry Document instead of a host-local node handle, then
read its URL through native ownership after removal callbacks. Reuse the
canonical wrapper in its realm without reading author URL properties.

Apply the same entry reference to root, child and lightweight popup streams,
retaining strict origin checks and fragment handling for the same Document.
2026-11-20 22:47:55 +08:00
ldm0 875d7b946e fix(csp): restore local document policies from history
Retain creation-time policy snapshots by Document identity for local history
restoration, independently of about:blank origin and Window authority.
Initialize each new Document with the resolved policy before inherited meta
CSP delivery; preserve fresh navigation and later creator/target meta behavior.
2026-11-20 22:47:55 +08:00
ldm0 1c17d30113 fix(navigation): preserve activation source Document provenance
Carry source lifecycle through shared history seeds, native requests, and
private activation state. Project from using the committed Document origin
so initial, inherited, cross-origin, and opaque sources stay distinct.

Record child Document origins at commit and retain the traversal visibility
boundary. Cover 19 real HTTP scenarios and the current upstream initial
about:blank WPT on both HTTP and HTTPS.
2026-11-20 22:47:55 +08:00
ldm0 2799af7af3 fix(navigation): retain activation across native history snapshots
Capture the associated private state when synchronizing child history, so
readonly attributes and author shadows cannot erase or replace activation.
Restore its entry by identity even after same-document history changes.

Cover normal, shadowed and frozen objects and recreate their structured
state after source-isolate teardown using real HTTP child Documents.
2026-11-20 22:47:55 +08:00
ldm0 305739b9c8 fix(navigation): expose readonly activation and transition state 2026-11-20 22:47:55 +08:00
ldm0 19a546ecb2 fix(navigator): preserve native plugin collection semantics 2026-11-20 22:47:55 +08:00
ldm0 d6ce3925f5 fix(navigator): expose UAData attributes with native snapshots 2026-11-20 22:47:55 +08:00
ldm0 b296f1959e fix(csp): carry initiator policies through local document navigation 2026-11-20 22:47:55 +08:00