chore(stylo): drop fork, upgrade to stylo 0.16 from crates.io#692
chore(stylo): drop fork, upgrade to stylo 0.16 from crates.io#692softmarshmallow merged 1 commit intohtmlcssfrom
Conversation
servo/stylo#273 has shipped, so we can drop the `gridaco/stylo` fork pin that existed solely to get that fix ahead of release. API adaptations required by the 0.9 → 0.16 bump: - `selectors` fork replaced with crates.io `selectors 0.37`. - `TElement` now requires `AttributeProvider`; implemented for both the real adapter and the standalone reference example. - `ensure_data`/`borrow_data`/`mutate_data` return the new `ElementDataRef/Mut` types; per-element storage migrated from `AtomicRefCell<Option<ElementData>>` to `OnceLock<ElementDataWrapper>`. `clear_data` is a no-op (matches Gecko's reuse-allocation semantics). - `Stylist::flush` dropped its root/snapshot arguments. - Module moves: `style::servo::media_queries::{Device,FontMetricsProvider}` → `style::device::{Device, servo::FontMetricsProvider}`; `QueryFontMetricsFlags` moved from `specified::font` to `computed::font`. - `BorderSideWidth` is now a newtype over `Au`; unwrap via `.0.to_f32_px()` and gate by border-style so `none/hidden` still zero the used width (the fork did this implicitly). - `OverflowClipMargin` became a struct; access via `.offset`. - `GenericShapeRadius::Length` keeps its `NonNegative` wrapper. - `outline_has_nonzero_width()` removed; replaced by explicit outline-style + width checks. - Grid pref plumbing moved from `stylo_config` to `stylo_static_prefs::set_pref!`, which is what stylo 0.16 reads. Verified: - `cargo check` / `cargo test` pass across cg, csscascade, grida-dev, grida-canvas-wasm (771 unit tests on cg). - WASM debug build + Node smoke test pass. - Refbrowser L0.exact: 65/65 at 100.00%. L0.coverage: avg 99.70%, no new regressions (sub-100 fixtures are all in the already-documented divergence surfaces: gradients, dotted borders, blur shadows, outline AA).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
servo/stylo#273 has shipped, so the
gridaco/stylofork pin can go. This swaps to crates.iostylo 0.16(and sibling crates) and adapts the callsites to the new API surface.API changes handled
selectors 0.33→ crates.ioselectors 0.37.TElementnow requiresAttributeProvider; implemented for both the production adapter and the standalone reference example.AtomicRefCell<Option<ElementData>>→OnceLock<ElementDataWrapper>.ensure_data/borrow_data/mutate_datareturn the newElementDataRef/Mutwrappers.clear_datais a no-op (matches Gecko's reuse-allocation semantics).Stylist::flush— dropped its root/snapshot-map arguments.style::servo::media_queries::{Device, FontMetricsProvider}→style::device::{Device, servo::FontMetricsProvider};QueryFontMetricsFlagsmoved fromspecified::fonttocomputed::font.BorderSideWidthis now a newtype overAu. Unwrap via.0.to_f32_px()and gate byborder-stylesonone/hiddenstill zero the used width (the fork did this implicitly).OverflowClipMarginbecame a struct; access via.offset.GenericShapeRadius::Lengthkeeps itsNonNegativewrapper.outline_has_nonzero_width()is gone; replaced by explicit outline-style + width checks.stylo_configtostylo_static_prefs::set_pref!, which is whatstylo 0.16actually reads.Test plan
cargo check -p cg -p grida-canvas-wasm -p grida-dev -p csscascadecargo test -p cg --lib— 771 passedcargo testacross cg, csscascade, grida-dev, grida-canvas-wasm — all greenjust _build_wasm32_unknown_emscripten_debug)environment-node-smoke.test.ts) — passes