Separate parser provenance from active child construction. Share one
construction session across HTML/XML parsers and runtime adapters, with
completion ownership, normal-EOF checks, and cancellation that does not
publish incomplete styles.
Use ordinary creation for generated document shells and remove obsolete
per-element completion forwarding. Cover parser ownership, adoption,
duplicate completion, missing callbacks, and cancellation in tests.
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.
Document the deferred flag as an undelivered callback notification. Cover
one-shot interruption across text, character references, comments and input
chunks, plus EOF with an incomplete character reference.
* fix(parser): preserve text document MIME and encoding semantics
* fix(document): share literal text parsing across child document paths
* fix(document): construct projection parser with the public API
Return text mutation effects from parser sinks and deliver them through the shared notification pipeline after releasing the structural borrow. This keeps stylesheets and layout current when parser input is merged into existing text nodes, and delivers characterData records without replacing node identity.
Add main-document and iframe regressions for split stylesheet input, hit testing, and MutationObserver delivery. Restore the verified elementsFromPoint iframe WPT to the passed list.
Share parser mutation notifications between the main document and child
frames, with each owner retaining its resource and lifecycle work. Update
stylesheet owners incrementally so parser mutations preserve CSSOM edits.
Keep tokenizer pause reasons separate from DOM handle identity.
Add main/iframe regressions for reaction and observer ordering, form
association, stylesheet visibility, CSSOM edits, and nested frame identity.
Validation: cargo fmt --all; strict workspace clippy; cargo nextest run
--no-fail-fast (18,118 passed, 13 skipped).
Flush parser insertion reactions after the tree builder completes its current
token so connected callbacks run before children without retaining parser
borrows across JavaScript execution.
Keep one DocumentParserSession and expose a restricted insertion handle for
nested writes. Share input, suspension, cancellation, and close state so
blocked writes remain queued and outer feeds stop when nested parsing blocks
or replaces the document. Let the owning session finish deferred close and
dispatch readiness transitions once.
Reuse form-owner mutation detection for child parser insertions and add
regressions for reaction order, form association, nested writes, gated external
scripts, document replacement, and deferred close.
Validation: cargo fmt --all; strict workspace Clippy; cargo nextest run
--no-fail-fast (18,104 passed, 13 existing skips); release build.