Give live main and popup Documents independent candidate queues and completion
flags. Admit parser and DOM API insertions through shared mutation notifications,
then flush on the owning rendering task or before its animation-frame callbacks.
Preserve document.open state, retire replaced Documents, enforce the response
policy, and resolve image-map associations in the owning Document. Clear removed
focus anchors so iframe reinsertion cannot revive a stale autofocus blocker.
Carry the originating Document through preload fetch completions and link
events. Create events in that Document's realm and record Resource Timing in
the request's Window instead of the parent. Keep historical network frame
identity when the Document is replaced, and retain the Window timeline across
document.open() without delivering retired link events.
Cover sibling frames, six preload destinations, cached stylesheet clients, and
gated completions across iframe navigation and document.open().
Validate raw stylesheet response bytes and response eligibility through the
shared SRI verifier. Preserve integrity rejection in fetch terminals so failed
loads dispatch error and release their load delay without installing a sheet
or discovering imports.
Require links with integrity metadata to use the compatible fetch cache instead
of hydrating an unverified parsed source by URL. Add regressions for hashing,
CORS, service-worker filters, local data URLs, redirects, and cached loads.
Process parser-created style sources after their closing tag or EOF, and
prepare later source changes through the stylesheet owner lifecycle.
Keep synchronization and CSSOM reads on prepared sources so CSSOM edits
survive reads and document initialization.
Complete styles in inert XML parsing and build the XML viewer through
ordinary DOM creation. Cover streaming, EOF, child documents, fragments,
and XML stylesheet behavior in regression tests.
Carry raw response header values through fetch, caches, redirects,
renderer delivery, workers, and protocol records. Convert explicitly
at WebIDL and protocol text boundaries while preserving opaque bytes.
Keep legacy CacheStorage and service worker metadata readable, and
advance the HTTP cache format for raw header values.
Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast
Keep physical stylesheet fetches and import graph work shared while installing CSSOM state and terminal events for every link owner. Settle completed clients at admission, retain completed import graphs for late owners, and validate document ownership before asynchronous installation.
This replaces the abandoned turn-exit replay path with an explicit shared-fetch/per-owner lifecycle model and adds coverage for document.write(), data URLs, imports, failures, node mutation, and document replacement.