Pseudo-element identity and computed styles duplicate extraction of a functional pseudo argument. Reuse one CSS utility, retaining literal prefix/parenthesis matching, empty-name rejection and borrowing from the original input.
Share a lazy inert owner across each document's template contents and keep
HTML/XML semantics, interface identity, and template-owner state separate.
Cloning preserves interfaces while creating independent owner state.
Separate portable Document metadata from arena-local relationships. Use
one metadata-copy boundary for Document cloning and main-document
replacement, clearing template-owner and CSS-target handles while keeping
whole-DOM snapshots and copy-on-write storage relationships intact. Metadata
copies also discard base-element href/target caches while retaining about
base URLs and explicit overrides; only DOM node cloning freezes computed
base URLs. Detached Document URL readers use native metadata without JS
URL/documentURI/baseURI shadow state, including selector and bridge readers.
Apply the DOM-specific document cloning rules separately: freeze the source
computed base URL as an override, separately retain the inherited about
base URL, and rebuild base-element caches from the cloned tree. Preserve
main-document replacement metadata semantics.
Establish exact HTML template identity and associated fragment allocation
in one native entry shared by DOM and parser creation. Clone actual native
contents rather than guessing from names, preserving foreign and mixed-case
elements through serialization, deep cloning, import and adoption. Keep HTML
createElement normalization at its binding boundary; namespace-aware creation
and wrapper selection preserve the exact local name, including registry paths.
Plan per-node adoption targets across ordinary children, shadow roots and
template contents. Retarget custom-element registries and callbacks with
the actual destination documents, and clear cross-document shadow sheets
while retaining sheets within a document and its own template owner.
Avoid preparing unused inert style sources.
Cover cross-arena ID collisions, metadata preservation, snapshot isolation,
nested templates, deep adoption, iframe/detached documents, cloned
interfaces, retained sheet arrays, registry associations and URL behavior.
Project the document-wide layer order retained by Stylo into native font resources and connected selection priorities. Preserve public FontFaceSet iteration order, manual priority and loaded declaration identities across layer-only CSSOM edits.
Validate with real narrow/wide font bytes, source and layer order permutations, cross-sheet empty-layer edits, native selection without JS projection, and nested/unlayered/manual precedence.
Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (20699 passed); Release layer-cssom-order-reverse.html (4/4 assertions passed).
Independent CSS FontFace wrappers shared mutable descriptors and a registration slot, while a permanent stylesheet flag made detached faces disappear after manual re-addition. Give each native rule and JS face a distinct registration identity, share only source loading/validated data, and track native CSS and FontFaceSet membership in each Document. Native CSS cleanup revokes only its own relation; descriptor changes affect only their owning face. Explicit native layout can map a newly inserted declaration to cached source bytes without mutating the authoritative registrations or borrowing another declaration's descriptor.
Validation: cargo fmt --all; strict all-feature workspace Clippy;
cargo nextest run --no-fail-fast (20680 tests run: 20680 passed (9 slow), 19 skipped).
Pure CSS `@font-face` declarations containing only `local()` sources were omitted from the native stylesheet resource manifest because projection required finding a URL. Retain local-only declarations with no network URL and let the existing native source loader resolve them. Network admission assigns a URL only when a URL source is selected; image requests still always have one.
Validation: cargo fmt --all; strict all-feature workspace Clippy;
cargo nextest run --no-fail-fast (20628 tests run: 20628 passed (9 slow), 19 skipped).
Move Taffy to 0.15 and Stylo to 0.22 using fixed fork revisions, with the
matching stylo_taffy adapter. Upgrade cssparser and the production HTML/XML
parsers while preserving the vendored XML behavior.
Adapt sizing inputs, baselines, grid positions, overflow and out-of-flow
ownership. Preserve font-stretch CSSOM compatibility and intrinsic sizing
through nested atomic inline probes.
Validation: root cargo fmt --all; strict workspace/all-target/all-feature
Clippy; Nextest 20280 passed, 18 skipped; Release build; five browser
regression rounds; RTL and nested intrinsic Chromium geometry controls.
Full WPT Cross is recorded separately with its Cases refresh.
Original-commit: 281a920d89
Extract shared invalidation from realtime layout commit dfeda25e6d. Retain original source ownership, detached-subtree cleanup, real splice ordering and structural-effect limits. Add selector/cache regressions and a normal-CLI before/after benchmark.
`@font-face` sources declared with the pre-`tech()` variable font hints
(`woff2-variations`, `woff-`, `truetype-`, `opentype-variations`) were
treated as unsupported and never fetched, so the face fell back to a
system font. Chrome still accepts these hints, and Fontsource emits
`woff2-variations` for every face of its variable packages. Both format
filters now map them to the container format they name.
Use computed style facts for content-visibility locks instead of reading
inline declarations. Hidden-until-found and stylesheet-hidden contents
stay out of innerText until revealed or overridden by the CSS cascade.
Remove the obsolete inline-only readers and cover hidden-until-found,
boolean hidden, synchronous reveal, and important stylesheet overrides.
Fixes MOL-113.
Resolve em and ex SVG lengths in disconnected documents using the initial computed font style. Keep live styled elements on their existing resolved-style path. Regressions cover detached HTML and XML documents, child realms, and inherited fonts. Extract the existing context resolver for reuse by the initial-font path; preserve live-element resolution unchanged. Factory-created lengths have no associated element, so their font basis remains initial when the factory is styled or removed.
Handle an ordinary single-node mutation inside the grouping function,
returning a SmallVec group that borrows the original effect slice. Keep
the entry small and inline, and use a batch helper for owned groups and
subtree splitting across documents. Iterate groups by reference.
The invalidation caller consumes one uniform grouping result; a single
node mutation avoids cloning effects and allocating grouping containers.
Record the isolated borrowing A/B conditions, timings, and confidence
intervals beside the single-effect fast path.
Validation of the resulting branch:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (19,490 passed, 16 skipped)
Return SmallVec<[StyleMutationEffect; 1]> from from_dom_mutation_effects.
Handle a pure single character-data update inside the converter before
constructing the deduplication set. Keep the notification call uniform;
batches preserve their existing order and deduplication.
Cover repeated text updates, :empty styles, and MutationObserver old values
in live and windowless documents.
Validation of the resulting branch:
- cargo fmt --all
- cargo clippy --workspace --all-targets --all-features -- -D warnings
- cargo nextest run --no-fail-fast (19,490 passed, 16 skipped)
Performance vs parent b75de5c66f (fixed local WeChat HTML, release,
JS/CSS/subframes disabled, 100 balanced randomized pairs):
Wall median 180.575 -> 165.316 ms (-8.45%). Paired median saving
13.885 ms; bootstrap 95% CI [12.364, 19.486] ms. The code tree matches
the previously validated and measured SmallVec version 84c5a81cca.
Avoid materializing a document style world during font reconciliation when no font state, style state or active author stylesheet exists. Keep document and connected shadow-root adopted sheets observable, and retain reconciliation after any state has been published. Tests cover the lazy path and shadow adopted-sheet sources.
Validation: all branch checks passed. Summary [ 104.769s] 18923 tests run: 18923 passed (9 slow), 16 skipped
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.
Check retained child-list relations when draining structural mutation batches. Fall back to lazy source-scope invalidation when removed nodes or old neighbors have moved, covering both old and new scopes without mixing historical and live sibling links.
Keep safe insertion batches precise, defer disconnected child-list effects consistently, and cover reorder, reinsert, moved-neighbor, relative-selector, and cross-shadow regressions.