Commit Graph
4364 Commits
Author SHA1 Message Date
ldm0 5f8dafebfa fix(history): preserve traversal settlement and owner-scoped cancellation 2026-11-22 02:01:54 +08:00
ldm0 6a0cb4a177 fix(runtime): adapt WPT document lifecycle callbacks to main 2026-11-22 02:01:54 +08:00
ldm0 ea7b12a5ed fix(iframe): recreate child contexts on ordinary reinsertion 2026-11-22 02:01:54 +08:00
ldm0 bf4cfa021a fix(window): honor scroll receiver and WebIDL argument semantics
Capture and authorize the Window receiver before converting scroll arguments,
then apply the operation only to that Window's surviving execution context.
Keep popup offsets on their canonical Window instead of the creator global.

Use derived ScrollToOptions and unrestricted-double converters, including
overload selection, conversion order, exception propagation and non-finite
normalization. Return successful Promises in the receiver realm and use the
shared Promise binding adapter for receiver and conversion rejections.

Cover borrowed methods, native/forged/proxy receivers, argument reentrancy and
receiver removal. The upstream window-scroll-arguments WPT improves from 6/12
to 12/12; the 104-case comparison has no lost passing cases or subtests.
2026-11-22 02:01:54 +08:00
ldm0 570eed48f4 fix(window): enforce origin checks on canonical popup windows
Popup projections could disagree on identity and allow cross-origin access
to document, name, and arbitrary properties. Reuse each native popup Window
across opener and child projections and authorize property access against
the current caller origin.

Preserve initial Document navigation semantics and inherited domain state.
Carry popup ownership and origin through Promise continuations so old jobs
retain their origin after navigation and callers do not inherit popup access.
2026-11-22 02:01:54 +08:00
ldm0 a7f8e7a6a2 fix(window): include root windows in named target lookup
Search receiver subtrees, page roots and familiar related contexts for named window.open, link and form targets using native names. Preserve native opener updates, including cached cross-origin accessors.

Inherit initial child origins from their popup owner so cross-origin popup frames do not become same-origin candidates. Cover duplicate names, sandbox entry authority, links/forms and cross-origin familiarity.
2026-11-22 02:01:54 +08:00
ldm0 694dad1edd fix(window): check nested frame access from the current realm
Route child Window and contentDocument exposure through the existing realm access check. Cover initial nested frame access, cross-origin and opaque sandbox restrictions, and borrowed getters after document.domain changes.
2026-11-22 02:01:54 +08:00
ldm0 fe1bbd4752 fix(window): resolve special open targets from the receiver
Use native parent/top relationships without consulting replaceable Window properties. Keep URL resolution and navigation authority tied to the entry Window, and preserve cross-origin WindowProxy projections.
2026-11-22 02:01:54 +08:00
ldm0 b09b21e0f1 fix(parser): register window handlers from merged body attributes 2026-11-22 02:01:54 +08:00
ldm0 1a117fb738 fix(storage): deliver localStorage events across pages 2026-11-22 02:01:54 +08:00
ldm0 b284ee54bb fix(window): resolve named iframe targets from the receiver 2026-11-22 02:01:54 +08:00
ldm0 0953030bc1 fix(navigation): prefer source frame in named target lookup 2026-11-22 02:01:54 +08:00
ldm0 46d310f7ea fix(forms): preserve queued submissions before javascript URLs 2026-11-22 02:01:54 +08:00
ldm0 bd2dc2aab9 fix(forms): honor Get action URL submission rules 2026-11-22 02:01:54 +08:00
ldm0 a95de915c8 fix(navigation): enforce child javascript URL origin checks 2026-11-22 02:01:54 +08:00
ldm0 961ce6e1c1 fix(location): authorize popup access by native window origins
Bind Location access checks and borrowed methods to the owning LocalWindow origin, including domain changes and retained popup objects. Refresh Location on every popup document commit and keep native URL synchronization independent of checked public getters.

Cover nested origin layouts, child-owned popups, and navigation lifetimes. Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (20,091 passed, 16 skipped). Navigation and Location WPT comparisons show no regressions across 192 cases.
2026-11-22 02:01:54 +08:00
ldm0 fdd1cfe433 fix(window): preserve popup roots for nested frames 2026-11-22 02:01:54 +08:00
ldm0 05292bca7f fix(navigation): validate child ancestor navigation permissions 2026-11-22 02:01:54 +08:00
ldm0 37648c6aa8 fix(navigation): complete popup document unload lifecycle 2026-11-22 02:01:54 +08:00
ldm0 0240a70280 fix(iframe): reject ancestor URLs during attribute navigation 2026-11-22 02:01:54 +08:00
ldm0 b4ddf12705 fix(navigation): check child beforeunload before loading 2026-11-22 02:01:54 +08:00
ldm0 096439ff17 fix(location): preserve entry settings during proxy forwarding 2026-11-22 02:01:54 +08:00
ldm0 0ee2f5d9af fix(window): derive popup referrers from the entry document 2026-11-22 02:01:54 +08:00
ldm0 c68a31ac56 fix(parser): adapt suspension paths to current ownership model
Reuse the claimed stylesheet pause in deferred preparation and use the shared source suspension cause for popup streams. Exercise document.write resume ownership with a body stylesheet boundary so nested inline execution cannot bypass the intended suspension.
2026-11-22 02:01:54 +08:00
ldm0 a0b255727e test(workers): cover URL-like module specifier resolution 2026-11-22 02:01:54 +08:00
ldm0 c4a21de01e fix(workers): reject dynamic imports in service workers 2026-11-22 02:01:54 +08:00
ldm0 28d7ba0e94 fix(events): adapt retained receivers to shared dispatch
Update IndexedDB dispatch to the shared event preparation signature after
rebasing the upstream callback-lifetime changes. Keep destroyed-context
detection local to MessageChannel construction so retained constructors
still produce detached ports without allocating communication endpoints.

Exercise live parent listeners and retired child listeners on retained
EventTarget, MessagePort, FileReader and AbortSignal objects. Preserve
validation of event brands, dispatch state and exception realms.
2026-11-22 02:01:54 +08:00
ldm0 dbf31f46c1 fix(dom): preserve document domains until document replacement
Keep the committed iframe Document's mutable origin while navigation
attributes are refreshed, including cancelled navigation and unload
callbacks. Reopening its input stream clears script state without resetting
document.domain; replacing the Document still resets it.

Cover explicit and implicit open, stop(), unload callbacks and microtasks,
and domain reset or inheritance at commit with a shared browser fixture.
The fixture passes all 81 checks in Chromium and the production Moli binary;
the previous Moli binary failed 30. Related WPT improves from 144 to 145
passing files out of 150, with three newly passing subtests and no regressions.

Validation: cargo fmt --all; workspace all-target/all-feature clippy with
-D warnings; full nextest 20,041 passed, 16 skipped; 190 focused tests passed.
2026-11-22 02:01:54 +08:00
ldm0 a8ed50e807 fix(dom): enforce original origins when opening document streams
Check the entry Document's original origin before document.open changes any
state, and apply the same check when write or writeln implicitly opens a stream.
Preserve inherited and retained origins, including DOMParser results and popup
Documents whose concrete realm belongs to the opener.

Cover relaxed domains, borrowed methods, exception realms, conversion order,
opaque origins, existing insertion points, and retained iframe/popup Documents.
2026-11-22 02:01:54 +08:00
ldm0 40952985c5 fix(parser): preserve insertion points in popup navigations 2026-11-22 02:01:54 +08:00
ldm0 2957fb507b fix(history): throttle excessive History API requests
Share a browsing-context budget across pushState, replaceState, go, back and
forward. Preserve argument conversion and mutation serialization/URL errors
before admission; refused calls do not cancel navigation or dispatch events.

Bound synchronous history update reentrancy across Windows and release the
admission guard on return. Retain child budgets across document navigation and
drop them when the browsing context is removed or closed. Cover recovery,
receiver ownership, conversion order, and recursive navigation callbacks.
2026-11-22 02:01:54 +08:00
ldm0 f5c8ec6a86 fix(navigation): reset focus within the navigating document
Rescan the owning Document for autofocus after intercepted navigation, with
focus-without-user-activation policy and native trusted initiation preserved
through transient activation expiry. Track focus changes per Document so a
parent focus change does not cancel a child navigation reset.

Keep viewport focus ownership explicit and retain the sequential Tab starting
point across manual focus resets and blur. Add regression coverage for policy,
autofocus selection, trusted input, Tab order, and nested viewport transitions.
2026-11-22 02:01:54 +08:00
ldm0 7f7691fcca fix(navigation): respect initiator origins across windows
Gate cross-document navigate events on the initiator and current target origin-domain while preserving cross-origin fragment events. Route named-frame window.open and GET form fragments through native Location navigation to preserve cancellation, interception, and document/history identity.
2026-11-22 02:01:54 +08:00
ldm0 8578ab23d1 fix(navigation): retain Navigation across initial Window reuse 2026-11-22 02:01:54 +08:00
ldm0 19baede9b7 fix(navigation): preserve hyperlink navigate events
Route existing hyperlink targets through native Window identity and the shared
navigation path. Preserve click involvement and sourceElement, suppress
cross-origin source exposure, and honor cancellation and interception in child
frames and named popups.

Retain popup referrer policy and synchronous fragment activation after the
navigate event accepts it. Add regression coverage for trusted and synthetic
clicks, ancestor targets, canceled navigation, interception, and popup policy.
2026-11-22 02:01:54 +08:00
ldm0 ca9bdb7f93 fix(navigation): respect document origins during history traversal
Preserve each history entry's document origin across renderer seeds, including
inherited about: origins. Only dispatch traverse events for same-origin target
documents, using their origin before fetching or redirecting the destination.

Keep event eligibility separate from the contiguous Navigation entry list.
Hide destination identity and state outside that list and avoid creating
pending event state for suppressed cross-origin classic-history traversals.

Add HTTP regressions for child frames, popups, cross-origin gaps and srcdoc
inside cross-origin parents.
2026-11-22 02:01:54 +08:00
ldm0 aa58490420 fix(forms): schedule cancellable planned navigations
Keep submit and formdata events synchronous while navigation runs as a
DOM-manipulation task. Capture the request, submitter, target and history
handling; coalesce replaced submissions without extra task turns.

Preserve popup POST requests, cross-origin and sandbox boundaries, and
javascript URL replacement ordering. Follow form navigation that starts
during document creation and cover reentrant, adopted and same-URL forms.

Validation: cargo fmt --all; workspace all-target/all-feature clippy with
warnings denied; cargo nextest run --no-fail-fast (20,002 passed, 16 skipped).
Two additional official WPT cases pass with no passing-case regressions
across the form and Navigation API suites.
2026-11-22 02:01:54 +08:00
ldm0 2c002cff92 fix(navigation): serialize reentrant history traversals 2026-11-22 02:01:53 +08:00
ldm0 d98c1fd31e fix(navigation): expose native NavigationDestination bindings 2026-11-22 02:01:53 +08:00
ldm0 abecad0fdd fix(navigation): create transitions in their Navigation realm
Joint history traversal can create a sibling window transition while executing in the initiating realm. Enter the owning Navigation context before allocating the transition and its committed and finished promises.

Extend the shared browser regression to verify realm and entry/destination identity across successful, rejected, and stopped traversals.
2026-11-22 02:01:53 +08:00
ldm0 697763caab fix(history): order joint traversal callbacks before popstate
Finish currententrychange and all interception handlers before script cleanup, then dispatch popstate in its owning realm. Preserve committed history events when stop() cancels Navigation settlement.

Cover first-frame, last-frame, and top-level initiators with successful, rejected, and stopped interception in a browser-shared regression fixture.
2026-11-22 02:01:53 +08:00
ldm0 3b7f109a3a fix(history): integrate joint traversal plans with document lifecycles 2026-11-22 02:01:53 +08:00
ldm0 8c24457b69 fix(fonts): validate FontFace descriptors with shared CSS parsing 2026-11-22 02:01:53 +08:00
ldm0 b14fedea41 fix(fonts): align FontFaceSet with native WebIDL bindings 2026-11-22 02:01:53 +08:00
ldm0 23a1aa867e fix(history): preserve queued and nested traversals with shared history
Keep JointSessionHistory as the history authority while retaining nested Document snapshots and exact traversal task owners. Coordinate all affected frames, preserve committed positions for queued deltas, and release traversal barriers on commit, cancellation, removal, or ignored responses. Republish browser history positions before a later renderer replacement.
2026-11-22 02:01:53 +08:00
ldm0 10fd38c4fa refactor(input): reuse shared editing primitives after rebase
Route clipboard and execCommand edits through the shared text-control input types and event construction. Verify native click preparation refreshes changed DOM/style geometry and reuses an unchanged snapshot.
2026-11-22 02:01:53 +08:00
ldm0 69e29d7276 fix(fetch): adapt request validation to typed errors
Carry typed WebIDL failures through body validation and handle network request preparation errors at the binding boundary. Align the cross-realm invalid-URL regression with Chromium and the upstream conversion path.
2026-11-22 02:01:53 +08:00
ldm0 24777a49e4 feat(fonts): support FontFace loading in workers 2026-11-22 02:01:53 +08:00
ldm0 1342e259ef fix(fonts): validate font set queries with Stylo 2026-11-22 02:01:53 +08:00
ldm0 7831a27a4c fix(fonts): validate binary FontFace sources
Decode and validate binary font data before marking a FontFace loaded, and
check SFNT table extents for every face in a collection. Reuse the stronger
validation for URL fonts so truncated unused tables cannot escape detection.

Reject shared and resizable sources during argument conversion, then copy
ordinary BufferSource bytes after descriptor conversion. Retain validated
bytes independently of later caller mutations and transfers.

Cover real TTF, WOFF and WOFF2 inputs, offset views, malformed and truncated
fonts, shared/resizable/detached buffers, descriptor side effects, collections,
URL font validation and cross-realm promises and errors.
2026-11-22 02:01:53 +08:00