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.

To help test Stylo, download Firefox Nightly and set the about:config pref layout.css.servo.enabled to true. To confirm that Stylo is enabled, check about:support for "Stylo: true (enabled by default)".

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.

Committing stylo changes

The process for committing a Stylo change that involves both Gecko and Servo changes is as follows:

  1. Create a Github PR against https://github.com/servo/servo with the Servo changes in question.
  2. Get that reviewed and checked into Servo's github repository.
  3. Wait for servo-vcs-sync to land the Servo changes on Gecko's autoland.
  4. Land the Gecko changes on autoland.

A more exhaustive / overwhelming description of the workflow is also available.

Try Syntax

For most Stylo changes, it should be sufficient to build on all platforms and test on Linux 64bit only, which helps save resources in automation. To do this, you can use:

./mach try -b do -p all -u all[x64]

To build and test all Stylo platforms running in automation, you can use:

./mach try -b do -p linux64,linux64-haz,macosx64,win32,win64 -u all

To build all possible platforms to ensure code compiles everywhere, but only test with Stylo enabled, you can use:

./mach try -b do -p all -u all[linux64-stylo,linux64-stylo-sequential,macosx64-stylo,windows7-32-stylo,windows10-64-stylo]

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. DONE!
  • Stylo should pass visual diff testing (bug 1331552) for the Alexa Top 500 (?) sites.
  • Stylo sequential mode's Talos performance should be at least as fast as Gecko.
  • Stylo parallel mode's Talos performance should be faster than Gecko. Ideally we should scale linearly with the number of cores.
  • 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 metrics (TBD: number of domains, number of tabs?) 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


Dogfood Bugs

bug stylo-site-issues blockers:

ID Priority Summary Keywords Assigned to
1379203 P1 stylo: Google Inbox messages overlap each other after marking a message as done Hiroyuki Ikezoe (:hiro)
1391444 P1 stylo: Crash in core::option::expect_failed | geckoservo::glue::Servo_ResolveStyle on Battle.net websites crash, regression, topcrash

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

P1 Bugs

that aren't also stylo-site-issue bugs

ID Priority Summary Keywords Assigned to
1371496 P1 stylo: Too much time spent styling on Speedometer Inferno benchmark Bobby Holley (:bholley) (busy with Stylo)
1367854 P1 stylo: Memory usage seems to be higher than Gecko meta Cameron McCormack (:heycam)
1386045 P1 stylo: Lots of time spent refreshing the stylist on facebook.com Emilio Cobos Álvarez [:emilio]
1381270 P1 stylo: Parse performance regression from CSS error reporting on apple.com Josh Matthews [:jdm]
1389009 P1 stylo: Add fallibility support for large allocations Julian Seward [:jseward]

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

P2 Bugs

that aren't also stylo-site-issue bugs

ID Priority Summary Keywords Assigned to
1383332 P2 stylo: Maintain a restyle root and use it to cull the traversal Bobby Holley (:bholley) (busy with Stylo)
1387990 P2 stylo: Many interpolations of transform are failed in test_transitions_per_property.html Boris Chiou [:boris]
1387913 P2 stylo: Rules are not cloned properly before mutation on shared stylesheet Brad Werth [:bradwerth]
1387933 P2 stylo: Import stylesheets are not preserved after reparsing Brad Werth [:bradwerth]
1355721 P2 stylo: Implement @font-feature-values rule support Nazım Can Altınova [:canaltinova]
1376884 P2 stylo: Check stack depth in invalidation machinery Emilio Cobos Álvarez [:emilio]
1378972 P2 stylo: generate more accurate restyle damage for fallback cases in compute_style_difference Emilio Cobos Álvarez [:emilio]
1386773 P2 stylo: panicked at 'assertion failed: rule_node != *self.rule_tree.root()' assertion, testcase Emilio Cobos Álvarez [:emilio]
1382369 P2 stylo: Decide how to store and serialize specified value of repeat function in grid Fernando Jiménez Moreno [:ferjm]
1375332 P2 stylo: font-size doesn't always respond to language-specific minimum size when using charset-derived language Jeremy Chen [:jeremychen] UTC+8
1384216 P2 stylo: Error messages for invalid selectors are really bad Josh Matthews [:jdm]
1366050 P2 Build Stylo for 32-bit Linux on automation J. Ryan Stinnett [:jryans] (use ni?) (on PTO until Aug. 21)
1387445 P2 Stylo: Audit skipped DevTools tests leave-open J. Ryan Stinnett [:jryans] (use ni?) (on PTO until Aug. 21)
1376883 P2 stylo: Drop thread pool stack size to 100k Julian Seward [:jseward]
1345218 P2 stylo: shorthand serialization doesn't match Gecko Tommy Kuo [:kuoe0] at UTC+8
1387986 P2 stylo: Some distance calculation and interpolated results are not correct for stroke-dasharray in test_transitions_per_property.html Mantaroh Yoshinaga[:mantaroh]
1390352 P2 stylo: Various SMIL mochitests fail due to animation of 'clip' property Mantaroh Yoshinaga[:mantaroh]
1390760 P2 stylo: Measure missing ComputedValues Nicholas Nethercote [:njn]
1359303 P2 stylo: should not skip parent display-based style fixups for NAC that is not a NAC root
1370604 P2 stylo: Consider preloading the style sharing cache with styled siblings during incremental restyle
1374135 P2 stylo: set NodeHasRelevantHoverRules or figure out how to avoid doing so
1383985 P2 stylo: Mutation observer is not invoked when anonymous child is added via changing display value
1384232 P2 stylo: Assertion failure: oldStyleContext->ComputedData() != newContext->ComputedData() assertion, testcase
1384701 P2 Stylo: Linux64 debug parallel reftest / mochitest runs crash on shutdown
1384945 P2 stylo: With ABP installed and Stylo enabled, on HTML Spec page, nightly uses 900MB RAM with 500MB in Heap-unclassified
1386398 P2 stylo: 8.68 - 13% Strings Stylo Servo_DeclarationBlock_SetPropertyById_Bench / Stylo Servo_DeclarationBlock_SetPropertyById_WithInitialSpace_Bench (osx-10-10) regression on push 2c6f632e13263b78cae4e6822acf4e48e6a054c2 (Mon Jul 31 2017) perf, regression
1386733 P2 Stylo: Audit and file bugs for skipped / failing reftests / crashtests
1386862 P2 Stylo: DevTools test triggers "Assertion failure: !data->mSheet->IsModified() (should not get marked modified during parsing)" assertion
1386901 P2 stylo: CSS property with leading period is not reported as an error
1387490 P2 stylo: Assertion `hash_table->live_entries == 0' failed assertion, testcase
1388165 P2 Stylo: DevTools test using XBL triggers crashes in ServoStyleSet::StyleRuleMap
1388301 P2 Stylo: Crash in alloc::oom::oom crash
1389187 P2 stylo: Stylo web-platform-test regressions compared to Gecko
1390389 P2 stylo: Assertion failure: parent->FirstContinuation() == aParent || (parent->StyleContext()->IsInheritingAnonBox() && parent->GetContent() == aParent->GetContent()) assertion, testcase
1390409 P2 stylo: need to notify accessibility service when visibility property flips during restyle
1391120 P2 stylo: Calc with negative values on the right side serializes with "+"
1392161 P2 stylo: Length values should not be rounded to Au for computed transform
1331843 P2 stylo: Servo CSS stylesheet parsing is 35% slower than Gecko's on myspace Talos testcase Simon Sapin (:SimonSapin)
1355599 P2 stylo: getting inline style can be a lot slower than Gecko Simon Sapin (:SimonSapin)
1370779 P2 stylo: percentages serialized with some float "rounding errors" Xidorn Quan [:xidorn] UTC+10

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

Bugzilla Queries

Priority Definitions:

  • P1: Blocks shipping, more urgent. We should be working on these now/ASAP.
  • P2: Blocks shipping, less urgent. We can wait a few weeks to start working on these.
  • P3: Might block shipping. Needs re-evaluation, potentially closer to the deadline.
  • P4: Doesn't block shipping, but nice to have.
  • P5: Don't need to track.