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.
Apply maxlength to user text insertion, preserve complete surrogate pairs,
and keep selection and replacement offsets in UTF-16 units. Cover CDP
input, execCommand insertText, and setRangeText.
Keep keyboard movement and deletion, including execCommand deletion, on
complete surrogate-pair boundaries while exposing UTF-16 offsets.
Source: 3be5eb5e37
Extract an independently mergeable topic from wpt-misc-fix at
a70a96f9d1.
Register the child text content regression module without including later script test modules.
Include the XML document fixture route used by the CDATA regression so this branch does not depend on the separate XML input-stream changes.
Source commits:
- 7f587e1251
- ae3a3f1096
Validation:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast