Quantum/Stylo

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.

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.

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

Milestones

stylo-central

stylo-nightly

  • 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-release

  • 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

Bugs

Dogfood Bugs

bug stylo-site-issues blockers:

ID Priority Summary Keywords Assigned to
1383307 -- stylo: site issue: visited links on BMO are not purple if you collapse and expand "Tracking" nightly-community Emilio Cobos Álvarez [:emilio]
1383406 -- stylo: Issues with :hover on wykop.pl
1379553 P1 stylo: some Google Drive context menu items are missing Brad Werth [:bradwerth] (PTO until 7/31)
1379617 P1 stylo: Crash in nsIFrame::SetNextSibling crash Cameron McCormack (:heycam)
1381071 P1 stylo: Huge hang on Facebook, spending most of my time in Stylo style recalculations Emilio Cobos Álvarez [:emilio]
1383001 P1 stylo: Crash in mozalloc_abort | abort | style::context::ElementCascadeInputs::new_from_element_data crash Emilio Cobos Álvarez [:emilio]
1379203 P1 stylo: Google Inbox messages overlap each other after marking a message as done Hiroyuki Ikezoe (:hiro)
1381420 P1 stylo: panic "Restyle damage should be empty if the element was not restyled" on FastMail crash Hiroyuki Ikezoe (:hiro)
1382568 P1 stylo: crash in Servo_ResolveStyle loading Twitter crash
1381386 P2 stylo: Crash in mozalloc_abort | abort | style::properties::{{impl}}::to_css<T> crash Boris Chiou [:boris]
1380258 P2 stylo: site issue: FastMail refresh animation continues running after it shouldn't Hiroyuki Ikezoe (:hiro)
1381235 P2 stylo: issue with popup menu and visited (?) styles Jeremy Chen [:jeremychen] UTC+8
1380561 P2 stylo: Slack chat messages were greyed out
1380957 P2 stylo: Twitter ad not styled correctly
1381753 P2 stylo: Google login box progress bar is flickering
1381851 P2 Stylo: Flash click to play doesn't display on video elements when Stylo is enabled
1380368 P2 stylo: site issue: visual bug with google docs star not visible until mouse over Shing Lyu [:shinglyu]
1380638 P3 stylo: Github dates on comments intermittently have the wrong font applied
1380684 P3 stylo: Intermittent overlapping text in Facebook comments
1381821 P3 stylo: hover state style doesn't refresh correctly

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


P1 Bugs

that aren't also stylo-site-issue bugs

ID Priority Summary Keywords Assigned to
1331578 P1 stylo: Stylo is slower than Gecko on etc/ci/performance TP5 tests Bobby Holley (:bholley) (busy with Stylo)
1346988 P1 stylo: Consider parallelizing CSS parsing Bobby Holley (:bholley) (busy with Stylo)
1360878 P1 stylo: sequential cascade performance 3x worse than Gecko on Obama testcase Bobby Holley (:bholley) (busy with Stylo)
1360881 P1 stylo: We allocate too much during the cascade Bobby Holley (:bholley) (busy with Stylo)
1362538 P1 stylo: Parallelize stylist::update Bobby Holley (:bholley) (busy with Stylo)
1363789 P1 stylo: stylist update spends a bunch of time in malloc perf Bobby Holley (:bholley) (busy with Stylo)
1365678 P1 stylo: Parallel performance issues Bobby Holley (:bholley) (busy with Stylo)
1365682 P1 stylo: Investigate context-switching overhead Bobby Holley (:bholley) (busy with Stylo)
1365686 P1 stylo: Turn off parallelism for non-root traversals Bobby Holley (:bholley) (busy with Stylo)
1371496 P1 stylo: Too much time spent styling on Speedometer Inferno benchmark Bobby Holley (:bholley) (busy with Stylo)
1292283 P1 stylo: Enable test_transitions_per_property.html assertion Boris Chiou [:boris]
1374233 P1 stylo: Clamp negative interpolated values for non-negative properties while using negative timing functions Boris Chiou [:boris]
1374881 P1 stylo: Implement nsDOMWindowUtils::GetUnanimatedComputedStyle Brad Werth [:bradwerth] (PTO until 7/31)
1292609 P1 stylo: Incremental restyle for anonymous boxes Boris Zbarsky [:bz]
1324619 P1 stylo: support ::first-line Boris Zbarsky [:bz]
1340404 P1 stylo: dynamic changes to border-spacing on an ancestor of an anonymous table don't work properly Boris Zbarsky [:bz]
1340405 P1 stylo: dynamic changes to text-indent on an ancestor of an anonymous table-cell don't work properly Boris Zbarsky [:bz]
1368290 P1 stylo: Implement ComputedValues sharing for text and anonymous boxes Boris Zbarsky [:bz]
1368291 P1 stylo: Enable ComputedValues sharing for lazy pseudos Boris Zbarsky [:bz]
1369611 P1 stylo: improve the setup for deciding whether a selector with an id in it is a revalidation selector Boris Zbarsky [:bz]
1369902 P1 stylo: Not much ComputedValues sharing going on on github diff page Boris Zbarsky [:bz]
1334732 P1 stylo: Handle all the ways that style data can be invalidated Cameron McCormack (:heycam)
1356186 P1 stylo: Implement and verify all incremental restyle optimizations we need to ship Cameron McCormack (:heycam)
1375292 P1 stylo: Ensure that about:license includes licenses for third-party rust crates vendored for Servo Chris Peterson [:cpeterson]
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]
1358575 P1 stylo: Animation restyles are completely bogus for pseudo-elements. Emilio Cobos Álvarez [:emilio]
1380890 P1 Stylo: GetRuleColumn needs to report a 1-based value, but instead reports 0-based Fernando Jiménez Moreno [:ferjm]
1368163 P1 stylo build-script-build hung on mac Ralph Giles (:rillian) | away until July 24
1288282 P1 land mozilla-central's Servo/Stylo code changes to servo/servo on GitHub Byron Jones ‹:glob›
1358812 P1 stylo: Investigate form control issues that aren't solved by fixing HasAuthorSpecifiedRules Hiroyuki Ikezoe (:hiro)
1365164 P1 stylo: Enable a few crash tests that no longer fail Hiroyuki Ikezoe (:hiro)
1365230 P1 stylo: match_and_cascade -> match_pseudos: short lived and under-used allocations Julian Seward [:jseward]
1365251 P1 stylo: Potential process-lifetime leak in recalc_style_at -> preprocess_children -> ensure_element_data Julian Seward [:jseward]
1377158 P1 stylo: Enable stylo for SVG-as-an-image. Tommy Kuo [:kuoe0] at UTC+8
1380590 P1 stylo: the fill color should be transparent when `svg.context-properties.content.enabled` and no fallback color given Tommy Kuo [:kuoe0] at UTC+8
1356267 P1 stylo: heap write hazard reported in nsStyleImage::SetNull() Manish Goregaokar [:manishearth]
1356991 P1 Build Stylo in Nightly (always #define MOZ_STYLO but keep Stylo pref'd off by default) Nathan Froyd [:froydnj] (out until 24 July)
1292285 P1 Stylo Assertion failure: sheet->IsGecko() (GatherRuleProcessor must only be called for nsXBLPrototypeResources objects with Gecko-flavored style backends), at dom/xbl/nsXBLPrototypeResources.cpp:154 assertion
1362908 P1 [meta] stylo: mochitest crashes
1363976 P1 stylo: ASan detected leaks
1366163 P1 stylo: rendering of <video controls> and <audio controls> is wrong
1367862 P1 stylo: Not much ComputedValues sharing going on on the Obama wikipedia page
1370153 P1 stylo: Re-enable dom/xul/crashtests/461917-1.xhtml
1380805 P1 stylo: Crash in alloc::oom::default_oom_handler | style::stylist::Stylist::rebuild<T> crash
1383589 P1 stylo: hang up animation on documentElement
1356087 P1 [meta] stylo: Fix failures in test_value_storage.html meta 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)
1355599 P1 stylo: getting inline style can be a lot slower than Gecko Simon Sapin (:SimonSapin)
1356458 P1 stylo: Drive static analysis hazard threshold to zero Steve Fink [:sfink] [:s:]
1356610 P1 stylo: Gecko_GetBaseSize writing to nsFont.size Steve Fink [:sfink] [:s:]
1354990 P1 stylo: Check the themed widget appearance in ServoRestyleManager::AttributeChanged Ting-Yu Lin [:TYLin] (UTC+8)
1338764 P1 stylo: support context values for SVG stroke-* and fill-* Xidorn Quan [:xidorn] UTC+10

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


P2 Bugs

that aren't also stylo-site-issue bugs

ID Priority Summary Keywords Assigned to
1371493 P2 stylo: Servo_GetComputedKeyframeValues does not respect property ordering Brian Birtles (:birtles)
1355761 P2 stylo: AnimatedProperty::does_animate() needs also check interpolable. Boris Chiou [:boris]
1362896 P2 stylo: Implement ComputeDistance for TransformList (and Filter/Shape) Boris Chiou [:boris]
1371395 P2 Stylo: media emulation has no effect Brad Werth [:bradwerth] (PTO until 7/31)
1375338 P2 stylo: Unexpected frame reconstruction when changing color property Boris Zbarsky [:bz]
1365900 P2 stylo: Parsing for @font-feature-values Nazım Can Altınova [:canaltinova]
1357060 P2 stylo: border-image-width-large.html hits MOZ_ASSERT(value >= 0) assertion C.J. Ku[:cjku](UTC+8)
1353966 P2 stylo: implement discrete type animation for all properties Daisuke Akatsuka (:daisuke)
1372439 P2 stylo: Switch from Arc<Stylesheet> to Arc<Locked<Stylesheet>> Emilio Cobos Álvarez [:emilio]
1355721 P2 stylo: Implement @font-feature-values rule support Jeremy Chen [:jeremychen] UTC+8
1367118 P2 stylo: investigate the disabled SVG related tests Jeremy Chen [:jeremychen] UTC+8
1364484 P2 Stylo: CalcStyleDifference support for visited J. Ryan Stinnett [:jryans] (use ni?)
1380053 P2 stylo: Enable Stylo tests on all desktop platforms: Linux32, Linux64, Win32, Win64, Mac J. Ryan Stinnett [:jryans] (use ni?)
1367228 P2 stylo: Gecko profiler gives seemingly inconsistent results with context-switch stress test Julian Seward [:jseward]
1368302 P2 stylo: possible stack overflow when processing very deep DOM Julian Seward [:jseward]
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
1369614 P2 stylo: Support animating between stroke-widths that have units and those that don't Mantaroh Yoshinaga[:mantaroh]
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
1324668 P2 Performance test for Stylo
1344314 P2 stylo: Setup for pref checks is broken for aliases
1344626 P2 stylo: See if it's necessary to handle sibling restyle hints when an element is unstyled
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.
1351973 P2 stylo: Wrong MathML font and layout in reftest
1352275 P2 stylo: Support minimum font size
1352284 P2 [meta] stylo: Fully support SVG
1353177 P2 stylo: preshints (mapped attributes) not handled correctly for elements not in a document
1354728 P2 stylo: Support MathML nsStyleFont properties
1354987 P2 stylo: May need to consider integrating incremental destroyer for style data
1355762 P2 stylo: enable stylo in non-HTML documents
1357296 P2 stylo: Factor out text-zoom from font-size values in SMIL
1357724 P2 Stylo: `styleSheet.cssRules` includes null rules
1358955 P2 stylo: Detect which animation values are context-sensitive
1359303 P2 stylo: should not skip parent display-based style fixups for NAC that is not a NAC root
1362292 P2 stylo: Before change style is not correct in test_animations_omta_start.html if we disable e10s
1366536 P2 stylo: Decide whether we should check important rule changes for all properties or not
1367975 P2 stylo: checking important rule change seems to be broken
1368922 P2 stylo: Figure out a way to set the dirty bit for DeclarationBlock thread-safety during parallel traversal
1369329 P2 stylo: Handle attr() namespaces in CSSOM
1370508 P2 stylo: generic XML documents do not use stylo
1370604 P2 stylo: Consider preloading the style sharing cache with styled siblings during incremental restyle
1370779 P2 stylo: percentages serialized with some float "rounding errors"
1371107 P2 stylo: Clear mElementsToRestyle at the end of PreTraverse()
1371150 P2 stylo: Support negative opacity for SMIL
1371174 P2 stylo: interpolating from stroke-dasharray "none" to "20" should fail (or fallback to 50% switch)
1371388 P2 Stylo: animation removal mutation not fired on class change
1371478 P2 Stylo: browser_animation_animated_properties_displayed.js reports several properties missing from animation panel
1371722 P2 stylo: Some writing-mode tests started failing after bug 1369954 landed.
1373362 P2 stylo: 50% of wikipedia styling spent in match_revalidation_selectors
1374247 P2 stylo: We don't implement the hack to allow child combinators to match across XBL <children> elements (could we remove it?).
1375524 P2 stylo: Need a better way to check specified transitions
1375774 P2 Build Stylo for Mac by default (in automation and local developer builds)
1376248 P2 stylo: Records by animation observer seem to be split into several entries
1381270 P2 stylo: Parse performance regression from CSS error reporting on apple.com
1363971 P2 stylo: Different handling of place-{content,items,self} shorthand Anthony Ramine [:nox]
1331552 P2 [Stylo] Stylo vs Gecko diffing on real sites Shing Lyu [:shinglyu]
1366050 P2 Build Stylo for 32-bit Linux on automation Shing Lyu [:shinglyu]
1344131 P2 stylo: Setting inline style can be a lot slower than Gecko leave-open Simon Sapin (:SimonSapin)

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


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)

Links