Commit Graph
47 Commits
Author SHA1 Message Date
ldm0 6c14fc3562 fix(typed-om): expose computed vertical-align 2026-11-20 22:48:02 +08:00
ldm0 e43d62af43 fix(typed-om): expose native default keywords and computed identifiers
Reify empty native lists as their declared CSS keyword without requiring
their elements to implement Typed OM. Preserve opaque compound values and
correct scalar default keywords and computed single transition identifiers.

Pin the matching native implementation and cover parsing, inline and rule
writes, escaped identifiers, computed values and atomic type validation.
2026-11-20 22:48:02 +08:00
ldm0 9f3bf71265 fix(typed-om): preserve specified step easing keywords
Keep step-start and step-end in the native specified easing AST until
computation, while retaining their expanded CSSOM serialization. Read and
write the declaration-owned AST through Typed OM, including initial inline
and stylesheet parsing, rule wrapper synchronization and append().

Keep functional and mixed easing lists as property-associated opaque values.
Cover parsing, mutation, computation and native rule rebuilding in regression
tests. Update the exact Stylo revision to the matching native implementation.
2026-11-20 22:48:02 +08:00
ldm0 0e7feb3400 fix(typed-om): validate shorthand writes using native typed values 2026-11-20 22:48:02 +08:00
ldm0 3b9429c4ea fix(cssom): retain background declaration ownership through cascade updates
Keep background shorthand winners and pending substitution nodes in the
native declaration owner. Restore surviving pending nodes in the owning
URL context when inline styles and live style rules enter the cascade.
Preserve importance, partial longhand overrides and style metadata cleanup.

Validate attribute, detached, live and nested rule paths against Chromium,
including mixed declarations, URL fallbacks, adoption and important all.
2026-11-20 22:48:02 +08:00
ldm0 ba8bc0835a fix(cssom): share native prefixed mask composite declarations
Preserve extended operators and their input grammar across CSSOM writes,
stylesheet snapshots and deferred substitution. Dispatch each operator to
the paint backend and reject legacy values in the standard grammar.
2026-11-20 22:48:02 +08:00
ldm0 53615e4847 fix(cssom): use public names for native mask position declarations
Project mask position axis names consistently across declaration metadata,
CSSOM enumeration, mutation and serialization. Canonicalize the position
shorthand alias while retaining native pending nodes and Typed OM units.
2026-11-20 22:48:02 +08:00
ldm0 99131a2abf fix(cssom): retain pending declaration nodes in mixed styles
Copy native declaration nodes and importance when serializing native runs
alongside compatibility entries. CSSOM empty pending-substitution values
cannot reconstruct those declarations through a second parse.

Distinguish native empty values from renderer placeholders in serialization
and inline queries. Remove custom properties directly from the owning
native block so unrelated pending declarations survive the mutation.
Compatibility writes retain unrelated native nodes, and rule reads recognize
native pending values while retaining existing ordinary compatibility routes.
2026-11-20 22:48:02 +08:00
ldm0 7b5b926156 fix(cssom): expose parsed container conditions as frozen snapshots
Serialize each condition through Stylo for both live and detached rules.
Return fresh dictionaries in the getter realm without invoking authored
prototype hooks. Return empty legacy name/query values for multiple conditions.

Cover escaped identifiers, nested queries, cross-realm getters, detached
rules and frames, receiver validation, and snapshot independence.
2026-11-20 22:48:02 +08:00
ldm0 7a9fd5e62c fix(css): reject URL syntax components in typed attr values
Pin the isolated Stylo fix that rejects explicit URL syntax components
in attr type(), retaining image values, downstream taint and fallbacks.
Add native coverage for alternatives, lists, escaped and quoted syntax.
2026-11-20 22:48:02 +08:00
ldm0 03eb0869e4 fix(fonts): distinguish generic FontFaceSet family queries
Read authored family names from native Stylo declarations while preserving quoted names, escapes, and family order. Share the existing generic keyword vocabulary so generic queries do not load same-named authored faces or duplicate them in mixed lists.

Cover Window, child Window, classic Worker, and module Worker against a fixed Chromium fixture. Validation: cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast (23211 passed, 17 existing skips, 32 threads, no retries).
2026-11-20 22:47:56 +08:00
ldm0 e4c054bbd7 fix(fonts): preserve native load promises and request ownership
Keep FontFace.loaded lazy without duplicating native load state, preserving
promise identity, realm, and retention through asynchronous CSS or JS loads.
Bind explicit font requests to the exact Window, retain redirect CSP checks,
and distinguish Script request attribution from css ResourceTiming entries.
Preserve main's explicit request policy and shared resource preparation.

Drive local URL completions through real resource tasks in domain tests,
keep the queued FontFaceSet finish-task regression, and retain both CSSOM
and Typed OM font assertions with the parser fallback regression.
2026-11-20 22:47:56 +08:00
ldm0 9ab4731043 fix(fonts): preserve literal family names in native FontFace state
Keep UTF-16 family identity separate from public CSS text using typed WebIDL declarations. Match native names through shared font-query parsing without reading author getters, preserving query order and repeated families. Cover source modes, cross-realm access, escapes and unpaired-surrogate identity.
2026-11-20 22:47:56 +08:00
ldm0 f373fc64f3 refactor(css): adapt native consumers to Stylo 0.22
Use owned parser errors and typed math payloads, keep the 128-level numeric parsing limit and preserve RangeError classification. Pin the native font shorthand port on Stylo 0.22 instead of adding callback exceptions.
2026-11-20 22:47:55 +08:00
ldm0 f0de77d02b feat(canvas): preserve native HDR pixel storage
Retain float16/unorm8, sRGB/Display-P3 and alpha representation through
Canvas, OffscreenCanvas, ImageData and ImageBitmap operations. Composite
in premultiplied coordinates, convert at native format boundaries and
preserve untouched pixel bytes across partial writes and bitmap copies.

Keep parsed drawing colors independent from CSS serialization and use
the shared native receiver bindings for color attributes. Correct the
old trailing-zero serialization expectation against Chromium output.

Validation: fmt, full workspace clippy and nextest (22234 passed,
16 skipped; 32 jobs/threads, zero retries). Original WPT: 914/1116 (+12), all 902 prior passes retained. Sources,
harnesses and assertions are unchanged; browser evidence is retained.
2026-11-20 22:47:52 +08:00
ldm0 322b3d3fb5 fix(canvas): preserve native shadow and text style state 2026-11-20 22:47:52 +08:00
ldm0 e7ea5a4aa4 fix(css): reify generated images and image lists 2026-11-20 22:47:45 +08:00
ldm0 e5bf50a435 fix(css): preserve typed numeric values in native declarations 2026-11-20 22:47:45 +08:00
ldm0 55feaa3d21 fix(css): reify all declarations as native keyword values
Project the native CSSWideKeyword for all into CSSKeywordValue while
preserving property-specific shorthand and unparsed-value behavior.
Cover parse/parseAll, declaration snapshots, realms, native-slot writes,
property-independent keyword reuse and invalid-write atomicity.
2026-11-20 22:47:45 +08:00
ldm0 351d63c388 fix(css): preserve Typed OM numeric serialization semantics 2026-11-20 22:47:44 +08:00
ldm0 d59bd9be48 feat(css): parse native Typed OM style values 2026-11-20 22:47:44 +08:00
ldm0 aed7a4c846 fix(cssom): preserve stylesheet EOF-open var values 2026-11-20 22:47:34 +08:00
ldm0 675db29581 fix(cssom): decode escaped property rule names 2026-11-20 22:47:34 +08:00
ldm0 df885c8d6a fix(canvas): store typed fill and stroke colors
Sync main and use a single Stylo color value for Canvas style serialization and drawing.
2026-11-20 12:36:44 +08:00
user.email 7aafb58a8d fix(canvas): parse absolute CSS colors in 2D style setters 2026-11-20 12:36:44 +08:00
ldm0 8b0208ee8c fix(css): retain AAT font technology support 2026-11-20 12:33:31 +08:00
ldm0 2525e9ac6a fix(css): unify font support queries 2026-11-20 12:33:31 +08:00
ldm0 e033040b7a refactor(css): discover and install imports from native rules 2026-11-20 01:36:29 +08:00
ldm0 a26fcaf80c feat(cssom): expose native container condition snapshots
Extract an independent, cohesive change from wpt-misc-fix.

Source-commit: 1b76ad4033623608f9454f533b49c77d2aecb9cc
2026-11-18 05:37:50 +08:00
ldm0 47b95eb66c fix(cssom): share native page selector parsing for resets
Reuse the same native PageSelectors parser for validation and live CSSPageRule mutation. Preserve CSS-only whitespace/comment resets, non-ASCII identifiers, escaped whitespace and invalid-selector behavior with the source regression coverage.

Source-commit: 6ab9df5e2e
2026-11-11 05:26:15 +08:00
ldm0 55e1f5c657 refactor(css): share functional pseudo argument extraction
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.
2026-11-09 22:10:22 +08:00
ldm0 9263af0f7e refactor(cssom): share stylesheet text end positions
Renderer stylesheet snapshots and CDP stylesheet headers repeat text end-position calculation. Put it in the existing shared CSS utility crate and use it from both paths, preserving the current line, character and empty-input behavior.
2026-11-09 18:56:10 +08:00
ldm0 eda3762c1b fix(css): share parser import graphs with stylesheet owners 2026-11-06 20:26:18 +08:00
ldm0 eac226d361 fix(stylesheets): evaluate parser media in the owning document 2026-11-03 07:53:58 +08:00
ldm0 d7d045a45a refactor(css): share native Stylo media query evaluation 2026-11-03 07:53:58 +08:00
ldm0 5953bd1622 fix(fonts): share Chromium-compatible Unicode family matching
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).
2026-10-24 01:03:35 +08:00
ldm0 6c4cdafc20 fix(fonts): preserve generic families in font-set queries
The shared font shorthand parser flattened quoted names and generic keywords into the same String. FontFaceSet.check/load could therefore match and load a custom face named serif when asked for the generic serif family. Keep Stylo's typed distinction between named and generic families, including decoded escapes, and query authored faces only for named families.

Validation: cargo fmt --all; strict all-feature workspace Clippy;
cargo nextest run --no-fail-fast (20630 tests run: 20630 passed (9 slow), 19 skipped).
2026-10-24 01:03:34 +08:00
ldm0 e24bd4a690 fix(fonts): share full descriptor capabilities with layout selection
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).
2026-10-24 01:03:34 +08:00
ldm0 c7130a3059 fix(fonts): share native FontFace loading across CSS and JS 2026-10-23 04:07:15 +08:00
ldm0 da0b0eeae7 test(css): cover Color 5 zero weights and percentage serialization
Original-commit: 6e9e9a7327
2026-10-21 17:55:02 +08:00
ldm0 e78f5a33b2 feat(layout): update Taffy and Stylo forks with current Blitz adapters
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
2026-10-21 17:55:02 +08:00
ldm0 04f066a9a5 fix(observers): parse margin defaults from CSS tokens
Treat comment-only and CSS-whitespace-only IntersectionObserver margin input as the empty default, and reject unitless zero and Unicode whitespace that is not CSS whitespace. The shared CSS token parser and native observer helper use the same contract. Tests cover malformed/empty comments, valid dimensions and invalid token classes.
2026-10-08 21:34:21 +08:00
ldm0 a05bb9287c fix(fonts): validate font set queries with Stylo 2026-10-02 02:23:18 +08:00
ldm0 f06370a4b7 feat(cssom): expose native font palette value rules
Expose CSSFontPaletteValuesRule with native parsing and read-only name, fontFamily, basePalette, and overrideColors descriptors. Attached rules read Stylo state; removed rules retain their descriptors through the existing native snapshot parser.

Regression coverage checks valid/invalid insertion, serialization, rule removal, native receiver brands, cross-realm access, and intrinsic constructor lookup.

Validation: fmt, strict workspace clippy, full nextest. Summary [ 104.120s] 18906 tests run: 18906 passed (9 slow), 16 skipped
2026-09-29 07:25:05 +08:00
ldm0 3330e01843 fix(cssom): parse comments in unicode ranges 2026-09-08 14:41:42 +08:00
ldm0 9cef93dc59 fix(css): honor document color schemes 2026-08-27 19:57:05 +08:00
ldm0 27b5135cb6 Public preview 2026-08-11 00:10:12 +08:00