From MozillaWiki
< Quantum(Redirected from Stylo)
Jump to: navigation, search

Stylo (a.k.a. Quantum CSS) will integrate Servo's CSS style system into Gecko, such that the style system code can be shared by Gecko and Servo. Stylo V1 will support Firefox on Windows, macOS, and Linux. Android support may ship in a later release.

Stylo is a core part of Project Quantum.

Getting Involved

If you're interested in contributing to Stylo or Servo, drop by the #servo IRC channel on Mozilla's IRC server.

One front where you can help out is adding new properties to Servo's CSS parsing crate. This requires familiarity with Rust, but is otherwise a good way to dip your toes into Servo's style system. To get started, see Servo's CSS property hacking guide for more information.

If you do not know Rust, you can help implement keyword properties. See the Stylo hacking guide for more details. The Stylo hacking guide also has instructions for building Stylo if you wish to play with it yourself. If you know C++, Firefox bug 1277133 has information about easy Gecko bugs that will assist Stylo's integration with Gecko.

Some Stylo bugs that are good for new Servo contributors are tagged on GitHub as “easy” bugs and “less-easy” bugs.

Release Criteria

Stylo should not cause us to regress any CSS feature unless we explicitly decide that regressing that specific feature is acceptable. The existing test suite will be the primary benchmark of this, with cross-validation from an automated analysis and manual QA of the Alexa Top 500 sites.

  • Stylo should have zero blocking bugs.
  • Stylo should pass all (non-disabled) Gecko reftests and mochitests.
  • Stylo should have no more unimplemented properties on the Alexa Top 500 sites than Gecko.
  • Stylo should pass visual diff testing (bug 1331552) for the Alexa Top 500 (?) sites.
  • Stylo's Talos test performance should be faster than or equal to Gecko's.
  • Stylo's memory usage (both Talos and beta telemetry) should be less than or equal to Gecko's.
  • Stylo's crash rate should be less than or equal to Gecko's.
  • Stylo's user engagement ratio (DAU/MAU) should be greater than or equal to Gecko's.

Work Breakdown Structure

  • Tests
    • reftests: Shing
    • mochitests: TBD
  • Cargo
    • Build Support: Nathan, Ralph
      • Build Stylo: Lars
    • Vendoring Support: Ted, Yehuda
      • Vendor Servo: Lars
  • Glue (Gecko/C++/Rust/Servo): Manish, Simon, Xidorn, Michael
  • CSS Support
    • CSS Properties: Cameron, Xidorn, Simon, Emilio, Bobby, Brian
    • CSSOM: Xidorn, Simon
  • Autoland
    • Servo CI and Autolander: Emily
    • Gecko CI and Autolander: Emily




  • Enable Stylo in Nightly (bug 1330412) (dependencies)
    • Implement parsing of all CSS properties supported by Firefox
    • Fix and enable all tests (without skipping or expecting failure)
    • Fix all crashes and assertion failures
      • Fuzz Stylo
      • Pass [Auto-tools/Projects/BugHunter Bughunter]
    • Manual QA sign-off
      • Smoke test Alexa Top N sites
      • Exploratory testing of browser UI and features


  • Stylo meta bug 1243581 (dependencies)
  • Run experiment comparing Stylo vs Gecko on engagement ratio, performance, crash rate, and memory usage.
  • Let Stylo ride the trains
    • Enable Stylo on all platforms (bug stylo-nightly)
      • Pass QA on all platforms (tests, fuzzing, BugHunter)
  • Ship Stylo to Release


Bugzilla Queries

Priority Definitions:

  • P1: Stuff we're working on or want to be working on now
  • P2: Overflow from P1. Bugs which reduce uncertainty, but which we don't have the resources to staff for now.
  • P3: Bugs we need to fix before shipping, but which do not disproportionately reduce uncertainty.
  • P4: Want before shipping, but could potentially ship without.
  • P5: Not actively prioritized (includes metabugs)



ID Priority Summary Keywords Assigned to
1355348 P1 stylo: Get non-additive SMIL animations to work Brian Birtles (:birtles)
1331578 P1 stylo: Stylo is slower than Gecko on etc/ci/performance TP5 tests Bobby Holley (:bholley) (busy with Stylo)
1348802 P1 stylo: Servo implements selectors-4's :not, Gecko implements selectors-3 Bobby Holley (:bholley) (busy with Stylo)
1358693 P1 stylo: Too many revalidation selectors Bobby Holley (:bholley) (busy with Stylo)
1346052 P1 stylo: Implement servo's computed values version of nsDOMWindowUtils::ComputeAnimationDistance Boris Chiou [:boris]
1357357 P1 stylo: Need to start a transition even if one of the property is non-animatable or unrecognized property Boris Chiou [:boris]
1339629 P1 stylo: ServoStyleSheets don't permit modification Brad Werth [:bradwerth]
1348481 P1 stylo: Stylesheet cloning doesn't seem to work right Brad Werth [:bradwerth]
1355722 P1 Stylo: devtools Inspector Panel should show overlay (border lines, tooltip, etc) when hovering over element in DOM tree Brad Werth [:bradwerth]
1355723 P1 Stylo: devtools Inspector Panel Computed tab should show sizes of selected element Brad Werth [:bradwerth]
1292609 P1 stylo: Incremental restyle for anonymous boxes Boris Zbarsky [:bz] (still a bit busy) (if a patch has no decent message, automatic r-)
1324618 P1 stylo: support ::first-letter Boris Zbarsky [:bz] (still a bit busy) (if a patch has no decent message, automatic r-)
1324619 P1 stylo: support ::first-line Boris Zbarsky [:bz] (still a bit busy) (if a patch has no decent message, automatic r-)
1340404 P1 stylo: dynamic changes to border-spacing on an ancestor of an anonymous table don't work properly Boris Zbarsky [:bz] (still a bit busy) (if a patch has no decent message, automatic r-)
1340405 P1 stylo: dynamic changes to text-indent on an ancestor of an anonymous table-cell don't work properly Boris Zbarsky [:bz] (still a bit busy) (if a patch has no decent message, automatic r-)
1358806 P1 stylo: Stylo triggers a lot more frame construction and reflow than Gecko does Boris Zbarsky [:bz] (still a bit busy) (if a patch has no decent message, automatic r-)
1289868 P1 stylo: Use the result of CalcStyleDifference to cull parallel DOM traversal Cameron McCormack (:heycam)
1334732 P1 stylo: Handle all the ways that style data can be invalidated Cameron McCormack (:heycam)
1346018 P1 stylo: Implement Restyle_SomeDescendants Cameron McCormack (:heycam)
1355762 P1 stylo: enable stylo in non-HTML documents Cameron McCormack (:heycam)
1356103 P1 stylo: Font metrics aren't thread safe Cameron McCormack (:heycam)
1356186 P1 stylo: Implement and verify all incremental restyle optimizations we need to ship Cameron McCormack (:heycam)
1358968 P1 stylo: ensure nsComboxboxDisplayFrames skip parent display-based style fixups when restyled Cameron McCormack (:heycam)
1355724 P1 stylo: Support :hover and :active quirk Nazım Can Altınova [:canaltinova]
1357906 P1 stylo: Fix -moz-transform test failures Nazım Can Altınova [:canaltinova]
1341703 P1 stylo: border-image support with url() seems to be broken C.J. Ku[:cjku](UTC+8)
1331047 P1 stylo: Teach servo how to restyle pseudo-implementing NAC Emilio Cobos Álvarez [:emilio]
1347410 P1 stylo: something is weirdly wrong with viewport units Emilio Cobos Álvarez [:emilio]
1349479 P1 stylo: bindgen busted on llvm4.0 Emilio Cobos Álvarez [:emilio]
1352306 P1 stylo: track the attributes and state that a DependencySet is sensitive to, and use it to cull snapshot creation Emilio Cobos Álvarez [:emilio]
1352487 P1 stylo: handling of pseudos that should not be there is a performance footgun Emilio Cobos Álvarez [:emilio]
1352565 P1 stylo: handle degenerate ::before and ::after in servo Emilio Cobos Álvarez [:emilio]
1352743 P1 stylo: need to handle restyles for non-eagerly pseudo-elements Emilio Cobos Álvarez [:emilio]
1355343 P1 stylo: Snapshots don't look at the changed state of the other elements, which is wrong. Emilio Cobos Álvarez [:emilio]
1355388 P1 stylo: -moz-any doesn't respond to dynamic change Emilio Cobos Álvarez [:emilio]
1355900 P1 stylo: New failing @import + media query tests Emilio Cobos Álvarez [:emilio]
1357461 P1 stylo: Cache media query results and only flush and restyle if they changed. Emilio Cobos Álvarez [:emilio]
1357583 P1 stylo: Avoid triggering restyle when a stylesheet is added that can't affect the document Emilio Cobos Álvarez [:emilio]
1358575 P1 stylo: Animation restyles are completely bogus for pseudo-elements. Emilio Cobos Álvarez [:emilio]
1291355 P1 stylo: Measure the impact of multiple jemalloc arenas and evaluate the performance tradeoff for enabling them Eric Rahm [:erahm]
1355408 P1 stylo: Support @-moz-document rule Fernando Jiménez Moreno [:ferjm]
1288282 P1 land mozilla-central's Servo/Stylo code changes to servo/servo on GitHub Byron Jones ‹:glob›
1351978 P1 stylo: Fully support canvas Hiroyuki Ikezoe (:hiro)
1356941 P1 stylo: Need a way to store/interpolate colors that RGBA component values exceed 255 Hiroyuki Ikezoe (:hiro)
1348173 P1 stylo: Implement the -moz-border-*-colors property Jeremy Chen [:jeremychen] UTC+8
1352669 P1 stylo: route CSS parsing errors to the developer tools console Josh Matthews [:jdm]
1328509 P1 stylo: Support visited-dependent style (:visited pseudo-class) J. Ryan Stinnett [:jryans] (use ni?)
1346493 P1 stylo: Ensure we have equivalents of the various fixups in nsStyleContext::ApplyStyleFixups J. Ryan Stinnett [:jryans] (use ni?)
1354215 P1 stylo: Sort out malloc overhead issues Julian Seward [:jseward]
1355811 P1 stylo: Gecko_GetFontMetrics creates font groups off the main thread Manish Goregaokar [:manishearth]
1355813 P1 stylo: Gecko_GetFontMetrics touches weak pointers on multiple threads Manish Goregaokar [:manishearth]
1355814 P1 stylo: Gecko_GetFontMetrics touches xpconnect off the main thread Manish Goregaokar [:manishearth]
1356267 P1 stylo: heap write hazard reported in nsStyleImage::SetNull() Manish Goregaokar [:manishearth]
1356458 P1 stylo: Drive static analysis hazard threshold to zero Manish Goregaokar [:manishearth]
1358634 P1 stylo: nonexistent font families are treated differently from Gecko Manish Goregaokar [:manishearth]
1358812 P1 stylo: Investigate form control issues that aren't solved by fixing HasAuthorSpecifiedRules Manish Goregaokar [:manishearth]
1356162 P1 stylo: Make clip animatable Mantaroh Yoshinaga[:mantaroh]
1349651 P1 stylo: Need to implement HasAuthorSpecifiedRules, so -moz-appearance will actually work with values other than "none" Matt Brubeck (:mbrubeck)
1341769 P1 stylo: Need unitless length quirk Anthony Ramine [:nox]
1356087 P1 [meta] stylo: Fix failures in test_value_storage.html meta Anthony Ramine [:nox]
1358150 P1 stylo: Invalid radial-gradient values are being parsed without error. Anthony Ramine [:nox]
1331843 P1 stylo: Servo CSS stylesheet parsing is 35% slower than Gecko's on myspace Talos testcase Simon Sapin (:SimonSapin)
1347408 P1 stylo: reduce tokenizer overhead Simon Sapin (:SimonSapin)
1353239 P1 stylo: Use a SmallVec to accumulate properties when parsing declaration blocks Simon Sapin (:SimonSapin)
1354566 P1 stylo: parsing a single property is still somewhat slower than Gecko Simon Sapin (:SimonSapin)
1354970 P1 stylo: Parsing for @counter-style Simon Sapin (:SimonSapin)
1355599 P1 stylo: getting inline style can be a lot slower than Gecko Simon Sapin (:SimonSapin)
1354404 P1 stylo: Yet another reftest-stylo.list update Shing Lyu [:shinglyu]
1355402 P1 stylo: Support prefixed intrinsic size value for {min-,max-,}{width,height,{inline,block}-size} Shing Lyu [:shinglyu]
1356610 P1 stylo: Gecko_GetBaseSize writing to nsFont.size Steve Fink [:sfink] [:s:]
1290276 P1 stylo: XBL <stylesheet> support Ting-Yu Lin [:TYLin] (UTC+8)
1321754 P1 stylo: UA style sheets parsed with author features should be added at the UA level Ting-Yu Lin [:TYLin] (UTC+8)
1321769 P1 stylo: scrollbars don't work Ting-Yu Lin [:TYLin] (UTC+8)
1345702 P1 stylo: Implement (or remove) <style scoped> Ting-Yu Lin [:TYLin] (UTC+8)
1354990 P1 stylo: Check the themed widget appearance in ServoRestyleManager::AttributeChanged Ting-Yu Lin [:TYLin] (UTC+8)
1328319 P1 stylo: Implement @counter-style Xidorn Quan [:xidorn] UTC+10 (less responsive 15/Apr-3/May)
1331291 P1 stylo: URL is incorrectly resolved when it is from a stylesheet loaded via @import Xidorn Quan [:xidorn] UTC+10 (less responsive 15/Apr-3/May)
1355394 P1 stylo: Implement access to CSSSupportsRule Xidorn Quan [:xidorn] UTC+10 (less responsive 15/Apr-3/May)

78 Total; 78 Open (100%); 0 Resolved (0%); 0 Verified (0%);


ID Priority Summary Keywords Assigned to
1310852 P1 Add build-time dependency on libclang 3.9 so we can run Stylo bindgen at build-time
1356991 P1 Build Stylo in Nightly (always #define MOZ_STYLO but keep Stylo pref'd off by default)
1357716 P1 Stylo: Rule objects should have non-null sheet

3 Total; 3 Open (100%); 0 Resolved (0%); 0 Verified (0%);



ID Priority Summary Keywords Assigned to
1355761 P2 stylo: AnimatedProperty::does_animate() needs also check interpolable. Boris Chiou [:boris]
1310885 P2 stylo: keep CSS images alive while their corresponding rule is in the style sheet C.J. Ku[:cjku](UTC+8)
1338764 P2 stylo: support context values for SVG stroke-* and fill-* C.J. Ku[:cjku](UTC+8)
1353966 P2 stylo: implement discrete type animation for all properties Daisuke Akatsuka (:daisuke)
1348489 P2 stylo: need support for :-moz-window-inactive Emilio Cobos Álvarez [:emilio]
1350175 P2 stylo: Support getting line / column number of CSS rules Fernando Jiménez Moreno [:ferjm]
1358524 P2 stylo: User sheets are not loaded in e10s mode for content pages Fernando Jiménez Moreno [:ferjm]
1356104 P2 stylo: Add support for mozmm unit Tommy Kuo [:kuoe0] at UTC+8
1340484 P2 stylo: border-collapse-bevels-1a.html fails due to different rgba() rounding behaviour Manish Goregaokar [:manishearth]
1348165 P2 stylo: Support getting authored property value Matt Brubeck (:mbrubeck)
1352968 P2 stylo: Implement access to CSSImportRule Xidorn Quan [:xidorn] UTC+10 (less responsive 15/Apr-3/May)

11 Total; 11 Open (100%); 0 Resolved (0%); 0 Verified (0%);


ID Priority Summary Keywords Assigned to
1297857 P2 stylo: Assert against generating nsChangeHint_ReconstructFrame for native anonymous content
1323140 P2 run test-stylo just after generating bindings at build time
1323680 P2 stylo: several tests crash under DebugVerifyStyleTree
1323716 P2 stylo: layout/style/crashtests/1230408-1.html fatally asserts with "MOZ_ASSERT_UNREACHABLE: Any line break inside ruby box should have been suppressed"
1324668 P2 Performance test for Stylo
1331552 P2 [Stylo] Stylo vs Gecko diffing on real sites
1336863 P2 stylo: style change via insertRule and deleteRule may not work
1336891 P2 stylo: getComputedStyle returns empty for custom property
1341725 P2 stylo: Figure out why marquee is not sized right
1341815 P2 stylo: figure out why pretty much all the meter and progress reftests fail
1341973 P2 stylo: Figure out why layout/reftests/css-sizing/min-intrinsic-with-max-width-percents-across-form-controls.html leaks
1341997 P2 [Stylo] Crashes while loading real site snapshots meta
1343028 P2 stylo: Intermittent REFTEST TEST-UNEXPECTED-PASS | columns/positioning-transforms-bug1112501.html == file:///home/worker/workspace/build/tests/reftest/tests/layout/reftests/columns/positioning-transforms-bug1112501.html | image comparison intermittent-failure
1344131 P2 stylo: Setting inline style can be a lot slower than Gecko
1344314 P2 stylo: Setup for pref checks is broken for aliases
1344581 P2 stylo: Update CSS animations when @keyframes is changed
1344626 P2 stylo: See if it's necessary to handle sibling restyle hints when an element is unstyled
1345697 P2 stylo: Implement access to CSSKeyframesRule and CSSKeyframeRule
1345709 P2 stylo: implement currentColor
1346049 P2 stylo: Enable reftestts for checking stacking context in layout/reftests/web-animations
1346693 P2 stylo: Handle namespaces during parsing
1347270 P2 stylo: Need to expose restyled element count to nsIDOMWindowUtils
1348490 P2 stylo: need support for :-moz-placeholder
1348492 P2 stylo: need support for ::-moz-color-swatch
1348723 P2 stylo: restyle elements when presentation attributes change
1350739 P2 stylo: Stylo simplifies calc() expressions, Gecko doesn't.
1350857 P2 stylo: Stylo supports calc() in a bunch more places than Gecko.
1351971 P2 stylo: native widget not working causing reftest failures
1351973 P2 stylo: Wrong MathML font and layout in reftest
1352275 P2 stylo: Support minimum font size
1352284 P2 stylo: Fully support SVG
1352291 P2 stylo: List-style related reftest fails
1353177 P2 stylo: preshints (mapped attributes) not handled correctly for elements not in a document
1354565 P2 stylo: loading at least some devmo pages ends up in what look like infinite restyling/reframing loops
1354728 P2 stylo: Support MathML nsStyleFont properties
1354879 P2 stylo: Properly support generated content for display: contents.
1354947 P2 stylo: merge keyframe values at the same offset
1354987 P2 stylo: May need to consider integrating incremental destroyer for style data
1355345 P2 stylo: Support font-display descriptor in @font-face rule
1355364 P2 stylo: Support font-language-override descriptor in @font-face rule
1355366 P2 stylo: Support font-feature-settings descriptor in @font-face rule
1355368 P2 stylo: font-weight descriptor in @font-face rule should preserve keyword values
1355715 P2 stylo: test_namespace_rule.html fails for several cases
1355721 P2 stylo: Implement @font-feature-values rule support
1356072 P2 stylo: Support moz-prefixed cursor values
1356150 P2 stylo: can't compile due to bad bindgen?
1357295 P2 stylo: Allow negative CSS property values in SMIL
1357296 P2 stylo: Factor out text-zoom from font-size values in SMIL
1357705 P2 Stylo: Investigate inIDOMUtils APIs used by DevTools
1357724 P2 Stylo: `styleSheet.cssRules` includes null rules
1357732 P2 Stylo: `getCSSStyleRules` returns rules with null `style`
1358353 P2 stylo: mismatches computed values or specified values in getKeyframes()
1358955 P2 stylo: Detect which animation values are context-sensitive
1358966 P2 stylo: Work out what to do with SMIL animations of shorthand properties
1358993 P2 stylo: ServoStyleSheet::ParseSheet should disconnect child sheets / mRuleList, and re-use child sheets

55 Total; 55 Open (100%); 0 Resolved (0%); 0 Verified (0%);