Extract the WOFF1 table-length validation from print font preparation in 95012a2d4d (#1753) to the shared web font decoder. Reject inconsistent stored and reconstructed lengths with the usual decode error.
Extract the pass-local storage part of f44a31ff42 from #1753. Allocate an inline formatting context only when a box owns one.
The native release benchmark matched geometry across 135 pairs. CPU time fell in 14 of 15 scenarios, including 8.14% for 4,096 text-free block elements.
Collect cell placement, spans and visual section order once for
collapsed borders, fixed sizing and numerical layout. Keep styles and
measured geometry local to each caller.
Collect contiguous runs under each anonymous table wrapper and attach
them once. Normalize the contents of an anonymous cell together so
consecutive inline content shares its formatting context.
Keep the CSS box hierarchy and route table parts to the numerical
owner during layout graph construction. Preserve the adapter's
ordering and run fixed and collapsed preparation only when needed.
Drive animation frames, resize and intersection observers, environment changes, scroll events, and font completion through the page owner. Expose the realtime policy in fetch and serve. Dispatch wheel input through the existing action window and keep transient output separate from screen publication.
Use the shared one-shot layout pass when geometry, a used CSS value, or coordinate input needs a current screen sample. Track the source and document identity of the published geometry and give screen passes explicit iframe coverage.
Extracted from the Realtime series at 6acae0b9b5.
Overflow clip geometry retained fractional layout offsets while its box
background used snapped paint geometry. Atomic flow grouping changed which
background and text commands shared a clip layer, exposing different edge
blending in three grid scrollbar reftests (240 pixels, max difference 17).
Snap owned overflow clips in the same pre-transform paint space as box
backgrounds. Preserve CSSOM geometry, property transforms and clip-chain
reuse. Cover block and grid containers with fractional offsets and sizes.
An in-flow atomic inline painted its background in the block background
phase, before the backgrounds of the inline boxes that wrap it. A wrapping
span's background covered the box, and because hit testing shares the paint
order, points inside the box resolved to the span.
Paint the atomic background inside its formatting context, after the inline
box backgrounds and before the line's text. The owner's text becomes its own
paint event so it can follow them.
Fixes#385
Table construction and invariant validation maintain duplicate role enums, display mappings and diagnostic names. Use one internal role type and classification while keeping construction-only parent requirements, world validation and invalid-box errors at their existing sites.
Paint culling repeats the rectangle expansion already owned by overflow geometry. Reuse that existing helper, preserving f32 evaluation order, edge subtraction and zero-clamping of the resulting dimensions.
Chromium sets the opsz axis to the font size in CSS pixels for variable fonts
when font-optical-sizing is auto. moli left opsz at the font default, so
system-ui on macOS (SFNS.ttf, default opsz 28) was shaped with the Display
design and measured 372.41 px instead of 420.95 px for a 16 px sentence.
The family choice and the trak tracking were already right.
An explicit opsz in font-variation-settings still wins. Fonts without an opsz
axis ignore the value.
Discover font demand from computed styles without triggering layout.
Honor the FONT policy, recheck fallback demand before readiness, and
invalidate child-document scans for ancestor style and viewport changes.
Share rendered control labels, marker counters and text normalization,
including generated items, inline boundaries, leaf boxes and suppressed
contents. Cover Unicode subsets, readiness and zero layout passes.
Use explicit miter joins and a shared miter limit of 4 for CPU and PDF
text strokes. Use the same conservative expansion for layout outsets
and native PDF clipping, including synthetic bold stroke widening.
Add deterministic triangle glyphs to cover pointed joins, bevel fallback,
and miter-only ink entering a PDF clip.
A wrapped line whose trailing spaces hang past the content box made
scrollWidth exceed clientWidth, unlike Chromium. Keep the full line rect
for CSSOM line geometry and use a scrollable rect without the hanging
advance when aggregating inline scrollable overflow.
Font selection stored priority as `(bool, usize)`, so callers had to infer the CSS/manual group and repeat fallback and tie-breaking rules.
Replace the tuple with `WebFontPriority { group, position }` and explicit `Stylesheet`/`Manual` groups. Use a shared order type, centralize registration fallback priorities, and reuse one candidate comparison key. Manual faces still outrank CSS-connected faces, later positions still win, and equal priorities retain the same slot tie-breaker.
Validation: cargo fmt --all; strict all-feature workspace Clippy;
cargo nextest run --no-fail-fast (20683 tests run: 20683 passed (9 slow), 19 skipped).
Clear and CSS manifest replacement rebuilt the physical font collection once per removed face; changing matching order also re-registered every font. Retire each Document membership change in one batch, rebuild at most once for actual removals, and update candidate priorities/caches in place for order or membership-only changes. Byte/descriptor replacements still rebuild to preserve other sources with identical Fontique attributes.
Validation: cargo fmt --all; strict all-feature workspace Clippy;
cargo nextest run --no-fail-fast (20683 tests run: 20683 passed (9 slow), 19 skipped).
FontFaceSet.check/load reconstructed matching data from five JS string slots for every face on every query. Read the same immutable native descriptor that constructors and successful setters publish to layout, cache its Chromium-compatible family key, and share computed capability ranges and Unicode coverage.
Validation: cargo fmt --all; strict all-feature workspace Clippy;
cargo nextest run --no-fail-fast (20680 tests run: 20680 passed (9 slow), 19 skipped).
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).