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).
FontFaceResource converted validated FontFaceData back to Vec bytes, then layout decoded and validated that payload again. Add a registration path that retains FontFaceData directly and shares its Blob through renderer registration and Fontique. Preserve descriptor validation and the existing raw-byte validation path.
Validation: cargo fmt --all; strict all-feature workspace Clippy;
cargo nextest run --no-fail-fast (20676 tests run: 20676 passed (9 slow), 19 skipped).
FontFaceSet queries compared family names with ASCII-only case folding, while native web-font layout used Unicode lowercasing. The same face could be missed by check/load or selected differently during layout. Share a CSS family matching key between both consumers using Unicode simple folding of UTF-16 code units, matching [Blink's font-family cache hash](https://chromium.googlesource.com/chromium/src/+/a03603fe9af6230a12f1b2fb2c18a7d003a0d937/third_party/blink/renderer/platform/wtf/text/case_folding_hash.h#50). Keep original descriptor spelling and platform/local full-name lookup intact. Register each web font only under its private source family, so Fontique cannot bypass CSS matching through a second public alias. Keep Blob identity and incremental-registration assertions by resolving the CSS alias through the document registry in those tests.
Validation: cargo fmt --all; strict all-feature workspace Clippy;
cargo nextest run --no-fail-fast (20633 tests run: 20633 passed (9 slow), 19 skipped).
Retain shared Blob payloads and register new fonts in the live collection,
invalidating selection caches while rebuilding for replacements and removals.
Preserve owner-specific order across complete descriptor capability ranges,
including priority-index shifts after unloaded members are removed.
Compare incremental and fresh registrations for scalar and ranged arrivals;
retain the opt-in release microbenchmark.
Move computed capability parsing and matching into moli-css-parse and
retain complete ranges in native font registrations. Select all equally
matched ranges in document order before applying unicode ranges.
Use the shared representation for CSS and JS registrations and query
matching. Add real DOM geometry regressions for numeric, reversed and
calc descriptors, mutations and overlapping range priority.
Validation: cargo fmt --all; strict workspace Clippy;
cargo nextest run --no-fail-fast (20592 tests run: 20592 passed (9 slow), 18 skipped).
Select width, style and weight capabilities before filtering FontFaceSet
queries by text and unicodeRange. Share the matching path for check/load,
including CSS calculations and descriptor ranges, so unrelated unloaded
or broken sources do not affect a query.
Publish each Document's CSS/manual FontFaceSet order independently from
stable resource slots. Preserve manual overrides, re-addition priority
and different orders for shared faces across Documents.
Cover the matching and actual DOM geometry regressions with generated
narrow/wide fonts and a shared Chromium/Moli CDP oracle.
Aggregate physical descendants once instead of treating Taffy's logical
scroll origin as a physical top-left corner. Share reachable scroll bounds
between scrollbar admission and final projection, including vertical writing
modes and reversed flex flows.
Preserve grid track areas, per-axis clipping, transformed borders, normal-flow
margins and end padding. Anchor vertical RTL block flow at the physical bottom
while keeping relative insets physical.
Add five native browser guards and a live Chromium differential covering
140 fixtures, two scrollbar modes and three fresh-document rounds.
Validation: root fmt, strict workspace/all-target/all-feature Clippy, and
Nextest (20380 passed, 18 skipped); Release; 840 Chromium comparisons;
960 flex geometry controls; MOL-463-468 probes; full 13631-case WPT Cross.
Three old/new control rounds found no new stable case, assertion or harness
regression. Cases are refreshed in the following commit.
Original-commit: d433653f0d
Subtract horizontal margins for explicit inline-block fit-content widths and carry float min/max-content constraints across the IFC boundary. Cover six font-backed role/keyword combinations, including an inline break that exercises the float path.
Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (20284 passed, 18 skipped). The combined working tree passed these checks before this logical split. Frozen Release and focused browser/WPT validation also passed; final full WPT is running.
Original-commit: 00cfb54b45
Map native controls to compressible replaced leaves without the image-only replaced flag. Cover checkbox, radio and range normal alignment at 50 by 50 pixels.
Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (20283 passed, 18 skipped). Release v3 and five browser regression rounds. Full WPT recorded separately.
Original-commit: 143e72ec4d
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
Reserve at most four existing boxes on the first store and grow with actual cache demand. Avoid the full-tree candidate scan and cover sparse stores in both flattened and ordinary block trees.
Replace the dense box-to-cache index vector with a one-based Option<NonZeroU32> slot in existing LayoutBox padding. Keep compact cache storage and preserve cache ownership through box compaction, growth, and invalidation.
Backport the shared paint and coordinate hit-test correction with its
layout regression. Keep the Realtime input integration test on its
feature branch.
The regression fails on main and passes after this fix. Validated with
cargo fmt --all, full all-feature Clippy, and 20,078 passing nextest tests
(17 existing skips).
(cherry picked from commit 3b35518f76)
Use the snapshot writing axes and absolute zoom for CSS content and border box sizes, independently of rounded CSSOM metrics. Keep non-replaced inline fragments out of CSS sizing-box observations.
Preserve Mock approximations, OnDemand sampling, and the existing observer delivery route. Extracted from realtime-layout 28cbee209e without realtime lifecycle or measurement/reporting refactors.
Store resolved grid tracks and collapsed-border records only for actual owners in the pass-local world. Freeze the same canonical grid results and consume the same table geometry during paint.
Completes the shared scratch extraction from 96cc04d1e8, after sparse numeric cache allocation.
Keep Taffy caches in pass-owned compact storage instead of every LayoutBox. Allocate entries on actual stores, preserve viewport and per-box invalidation, and skip stores that Taffy ignores for hidden layout.
Extracted from 96cc04d1e8 and 6ca12dfc2a without retained working sets, new layout policies, or renderer lifecycle changes.