Commit Graph
4 Commits
Author SHA1 Message Date
ldm0 e7acb15230 fix(navigation): check child beforeunload before loading 2026-11-02 06:02:25 +08:00
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 80631d8588 fix: ignore document stream replacement during unload
Keep a native counter for each unloading Document so open and implicit
write/writeln stream replacement preserve its nodes, listeners and URL.
Scope guards cover nested callbacks and ancestor teardown without blocking
other documents or manually dispatched unload events. Preserve argument
conversion and existing XML/dynamic-markup exception checks.

Add 34 Browser and main-VM regression scenarios. The 154-case WPT comparison
gains one passing case and six passing subtests with no regressions; update
the passed ledger to 9,099 cases.

Validation: cargo fmt --all; cargo clippy --workspace --all-targets
--all-features -- -D warnings; cargo nextest run --no-fail-fast
(17,909 passed, 13 skipped). Rebuilt CLI matches the tested WPT binary.
2026-11-02 06:01:33 +08:00