Commit Graph
3 Commits
Author SHA1 Message Date
ldm0 36d74647f4 fix(navigation): stop recursive child document loads
Reject child navigations whose URL repeats more than one committed ancestor, ignoring fragments while preserving query and host boundaries. Keep about URLs, POST requests, and history traversals exempt.

Cancel rejected load bookkeeping before fetching so recursive frames remain at initial about:blank and ancestor loads can finish. Cover Navigation and Location with a real HTTP regression and URL admission boundary cases.

Give nested lifecycle fixtures distinct query parameters so their intended unload assertions are not suppressed by recursive-frame admission.
2026-11-02 06:02:22 +08:00
ldm0 5426ef121e fix: unload descendant documents during frame navigation
Snapshot retiring frame documents and finish their beforeunload phase before
actual unload delivery. Preserve ancestor unload counters through descendant
callbacks and check exact owners before dispatching further events.

Retain visibility state on the native Document and dispatch trusted, bubbling
visibilitychange events through the host event path. Use native unload
counters to suppress navigation during visibility and ancestor callbacks;
cancel each retiring window's timers after its unload.

Eight Browser integration tests cover 50 scenarios. The 181-case WPT
comparison gains two passing cases and seven passing subtests without
regressions; update the passed ledger to 9,101 cases.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(17,910 passed, 13 skipped). Rebuilt CLI matches the tested WPT binary.
2026-11-02 06:01:33 +08:00
ldm0 0e0e140d85 fix: unload javascript URL documents without beforeunload
A child javascript URL string result must unload the old document without
checking whether unloading is canceled. Reuse the existing teardown that
dispatches pagehide, visibilitychange, and unload, and cancels old timers.
Apply it to the target and its descendants, capturing document identities
before callbacks can remove or replace them.

Add three Browser integration tests covering 12 scenarios, including
nested frames, unrelated frames, non-string completion, ordinary
navigation, and attempts to navigate or schedule timers during unload.
Record the newly passing javascript-url-no-beforeunload WPT.

Validation: cargo fmt --all; workspace all-targets all-features Clippy
with -D warnings; cargo nextest run --no-fail-fast (17,904 passed,
13 skipped). Focused WPT: 110 cases, one new pass / two passing subtest
gains, no regressions.
2026-11-02 06:01:33 +08:00