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. To confirm that Stylo is enabled, check about:support for "Stylo: true (enabled by default)". If it's not, then set the about:config pref layout.css.servo.enabled to true.
For a deep dive into Stylo internals, check out Lin Clark's Mozilla Hacks blog post "Inside a super fast CSS engine: Quantum CSS (aka Stylo)".
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.
Committing stylo changes
The process for committing a Stylo change that involves both Gecko and Servo changes is as follows:
- Create a Github PR against https://github.com/servo/servo with the Servo changes in question.
- Get that reviewed and checked into Servo's github repository.
- Wait for servo-vcs-sync to land the Servo changes on Gecko's autoland.
- Land the Gecko changes on autoland.
A more exhaustive / overwhelming description of the workflow is also available.
For most Stylo changes, it should be sufficient to build on all platforms and test on Linux 64-bit 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 linux,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[linux32,linux64,linux64-stylo-sequential,macosx64,windows7-32,windows10-64]
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 be enabled by default on all desktop platforms.
- Stylo should have zero P1 and P2 bugs.
- Stylo should pass all (non-disabled) Gecko reftests and mochitests.
- Stylo should support at least as many CSS properties as than Gecko. Firefox = 375. Stylo = 375. Chrome = 276. DONE!
- Stylo should pass visual diff testing for the Alexa top sites. (bug 1331552) DONE!
- Stylo's sequential mode performance on Talos tp5 and tp6 should be at least as fast as Gecko's.
- Stylo's parallel mode performance on Talos tp5 and tp6 should be faster than Gecko's. Ideally, Stylo should scale linearly with the number of cores.
- Stylo's performance on Speedometer should be at least as fast as Gecko's.
- Stylo's memory usage (as measured by AWSY and user telemetry) should not exceed to Gecko's by more than X% (TBD).
- Stylo's crash rate should be less than or equal to Gecko's.
- Stylo's user engagement metrics should be greater than or equal to Gecko's.
|Build||bug 1366050||bug 1374824||bug 1375774||bug 1384258||bug 1384258|
|Speedometer||not tested||linux64 Perfherder||macOS Perfherder||win7-32 Perfherder||win10-64 Perfherder|
|tp6a||not tested||not tested||macOS||win7-32||win10-64|
|tp6f||not tested||not tested||macOS||win7-32||win10-64|
|tp6g||not tested||not tested||macOS||win7-32||win10-64|
|tp6y||not tested||not tested||macOS||win7-32||win10-64|
- Run linux64-stylo tests in mozilla-central (bug 1330414) (dependencies)
- 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)
- Enable Stylo on all platforms (bug stylo-nightly)
- Ship Stylo to Release
|1405411||P1||stylo: Loading YouTube's material design Subscriptions panel causes excessive CPU usage||regression||Cameron McCormack (:heycam) (away 24 Oct – 12 Nov)|
|1409093||P1||stylo: Stylo enabled results in long stalls in Google Inbox|
2 Total; 2 Open (100%); 0 Resolved (0%); 0 Verified (0%);
|1403690||P2||stylo: Stop whitelisting LookAndFeel::GetColor in the heap write hazard analysis||Brad Werth [:bradwerth]|
|1402157||P2||stylo: Assertion failure: aFrame->HasImageRequest() (why call me?) in [@ mozilla::css::ImageLoader::DisassociateRequestFromFrame]||assertion, testcase||C.J. Ku[:cjku](UTC+8)|
|1405796||P2||stylo: Assertion failure: !child->IsRelocated() (Child should be in its ordinal position) in [@ mozilla::a11y::DocAccessible::DoARIAOwnsRelocation]||assertion, testcase||Eitan Isaacson [:eeejay]|
|1405880||P2||stylo: Assertion failure: !HasAnyOfFlags(kAllServoDescendantBits | NODE_NEEDS_FRAME) in [@ mozilla::dom::Element::UnbindFromTree]||assertion, testcase||Emilio Cobos Álvarez [:emilio]|
|1407911||P2||[meta] stylo-blocklist: update stylo-blocklist preference using a system addon||meta||Jeremy Chen [:jeremychen] UTC+8 (away 24 Oct – 12 Nov)|
5 Total; 5 Open (100%); 0 Resolved (0%); 0 Verified (0%);
46 Total; 46 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Other stylo-nightly bugs:
|1381147||P5||[Shield] Pref Flip Study: Quantum CSS (Stylo)||Chris Peterson [:cpeterson]|
|1320841||P5||[meta] Pass all mochitests for Stylo||meta|
|1324348||P5||[meta] stylo: Reftest failures||meta|
|1340224||P5||stylo: Test whether Stylo improves terrible restyle performance on cleopatra|
|1370466||P5||stylo: Pass WPT||meta|
|1356458||--||drive static analysis hazard threshold to zero||Steve Fink [:sfink] [:s:]|
|1321197||P5||[meta] stylo: Have stylo pass all style system mochitests||meta||Xidorn Quan [:xidorn] UTC+10 (less responsive Nov 5 ~ Dec 16)|
7 Total; 7 Open (100%); 0 Resolved (0%); 0 Verified (0%);
Other stylo-release bugs:
|1288278||P5||Stylo: Implement incremental restyle||Emilio Cobos Álvarez [:emilio]|
|1328497||P5||stylo: Optimize codesize||Matt Brubeck (:mbrubeck)|
|1289864||P5||Tracking bug for Stylo performance issues|
|1293767||P5||stylo: Memory usage tracking bug|
|1294570||P4||stylo: Style chrome documents with Servo|
|1324620||P5||stylo: fix tests marked as fails-if(stylo) and asserts-if(stylo,...)||meta|
|1337166||P5||stylo: Make sure we don't unintentionally ship new CSS features when we ship stylo||dev-doc-needed|
|1353472||P5||stylo: Poor parallelism in rebuilding rust crates|
|1365771||P5||stylo: Tracking bug for behavior changes in stylo||dev-doc-needed|
|1375906||P5||stylo: Metabug for issues affecting real websites||meta|
11 Total; 11 Open (100%); 0 Resolved (0%); 0 Verified (0%);
- P1 stylo: bugs
- P2 stylo: bugs
- P3 stylo: bugs
- Unprioritized "stylo:" bugs to be triaged
- Stylo experiment client count
- Stylo milestone bug trees:
- Unprioritized "stylo" whiteboard bugs to be triaged (Chris's list)
- All P4 bugs
- All P5 bugs
- Bugs by developer
- Crash queries:
- Skipped or asserting tests: (these do not necessarily indicate Stylo bugs!)
- 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.