Quantum/Stylo

From MozillaWiki
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.
  • 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

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

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)

P1 Bugs

Assigned

ID Priority Summary Keywords Assigned to
1353202 P1 stylo: Implement accumulate on Servo AnimationValue Brian Birtles (:birtles)
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)
1359897 P1 stylo: Experiment with rayon parallel iterators instead of scope(). 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)
1339629 P1 stylo: ServoStyleSheets don't handle modification in the presence of cloned inners correctly 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-)
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)
1352306 P1 stylo: track the attributes and state that a DependencySet is sensitive to, and use it to cull snapshot creation Cameron McCormack (:heycam)
1356186 P1 stylo: Implement and verify all incremental restyle optimizations we need to ship Cameron McCormack (:heycam)
1355724 P1 stylo: Support :hover and :active quirk Nazım Can Altınova [:canaltinova]
1364746 P1 stylo: Continue to propagate quirks mode information to Servo Nazım Can Altınova [:canaltinova]
1348490 P1 stylo: need support for ::-moz-placeholder pseudo element C.J. Ku[:cjku](UTC+8)
1347410 P1 stylo: something is weirdly wrong with viewport units 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]
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]
1360772 P1 stylo: Lots of time spend in bzero when doubling vecs Eric Rahm [:erahm]
1365300 P1 stylo: the size of [gecko_bindings::structs::root::nsStyleCoord] cannot be statically determined with rust 1.18.0-beta.2 Ralph Giles (:rillian) | needinfo me
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)
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?)
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]
1365681 P1 stylo: investigate whether rayon is spinning Julian Seward [:jseward]
1356267 P1 stylo: heap write hazard reported in nsStyleImage::SetNull() Manish Goregaokar [:manishearth]
1362599 P1 stylo: Bug 1358634 added a hazard to the build leave-open Manish Goregaokar [:manishearth]
1365937 P1 hazard builds with stylo enabled fail due to write hazards Manish Goregaokar [:manishearth]
1362897 P1 stylo: Make filter property animatable Mantaroh Yoshinaga[:mantaroh]
1310852 P1 Add build-time dependency on libclang 3.9 so we can run Stylo bindgen at build-time Nathan Froyd [:froydnj]
1356991 P1 Build Stylo in Nightly (always #define MOZ_STYLO but keep Stylo pref'd off by default) Nathan Froyd [:froydnj]
1364588 P1 use `mach artifact toolchain' to download clang packages for stylo Nathan Froyd [:froydnj]
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]
1354404 P1 stylo: Yet another reftest-stylo.list update Shing Lyu [:shinglyu]
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:]
1290276 P1 stylo: XBL <stylesheet> support Ting-Yu Lin [:TYLin] (UTC-4)
1321769 P1 stylo: scrollbars don't work Ting-Yu Lin [:TYLin] (UTC-4)
1345702 P1 stylo: Implement (or remove) <style scoped> Ting-Yu Lin [:TYLin] (UTC-4)
1354990 P1 stylo: Check the themed widget appearance in ServoRestyleManager::AttributeChanged Ting-Yu Lin [:TYLin] (UTC-4)
1363640 P1 stylo: Enable stylo for XBL documents Ting-Yu Lin [:TYLin] (UTC-4)
1341802 P1 stylo: implement grid property glue Ravi Shankar [:waffles]
1331291 P1 stylo: URL is incorrectly resolved when it is from a stylesheet loaded via @import Xidorn Quan [:xidorn] UTC+10
1359217 P1 Stylo: Opening DevTools inspector crashes during `inDOMUtils::GetCSSStyleRules` crash Xidorn Quan [:xidorn] UTC+10
1363596 P1 stylo: Support symbols() function and string value for list-style-type Xidorn Quan [:xidorn] UTC+10

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


Unassigned

ID Priority Summary Keywords Assigned to
1361938 P1 stylo: We don't update direction or play-state immediately in test_animations_omta.html
1362908 P1 [meta] stylo: mochitest crashes
1363976 P1 stylo: ASan detected leaks
1365254 P1 Cannot build 32-bit Stylo-enabled binaries on 64-bit Windows
1365993 P1 OS X builds on infra fail with Stylo enabled
1366977 P1 stylo: image has vertical strips of color difference

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


P2 Bugs

Assigned

ID Priority Summary Keywords Assigned to
1365472 P2 stylo: SVG elements with SMIL-animated class attribute are probably not handled right Brian Birtles (:birtles)
1292283 P2 stylo: Enable test_transitions_per_property.html assertion Boris Chiou [:boris]
1340005 P2 stylo: Need a way to convert Animatable::TArrayOfTransformFunction and Animatable::Tfloat to servo's AnimationValue Boris Chiou [:boris]
1355761 P2 stylo: AnimatedProperty::does_animate() needs also check interpolable. Boris Chiou [:boris]
1361663 P2 stylo: The interpolated result of ServoAnimationValue is not equal to that of StyleAnimationValue Boris Chiou [:boris]
1362896 P2 stylo: Implement ComputeDistance for TransformList (and Filter/Shape) Boris Chiou [:boris]
1338764 P2 stylo: support context values for SVG stroke-* and fill-* C.J. Ku[:cjku](UTC+8)
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)
1348489 P2 stylo: need support for :-moz-window-inactive Emilio Cobos Álvarez [:emilio]
1365674 P2 stylo: dom/animation/test/chrome/test_simulate_compute_values_failure.html crash with Assertion failure: mUnit == eCSSUnit_TokenStream (not a token stream value) Fernando Jiménez Moreno [:ferjm]
1365871 P2 stylo: some editor/libeditor/tests/ crashes with MOZ_CRASH(stylo: not implemented) at /Users/ferjm/dev/mozilla/mozilla-central/editor/libeditor/CSSEditUtils.cpp:553 crash Fernando Jiménez Moreno [:ferjm]
1358966 P2 stylo: Work out what to do with SMIL animations of shorthand properties Hiroyuki Ikezoe (:hiro)
1355721 P2 stylo: Implement @font-feature-values rule support Jeremy Chen [:jeremychen] UTC+8
1365900 P2 stylo: Parsing for @font-feature-values Jeremy Chen [:jeremychen] UTC+8
1361618 P2 stylo: Stylo needs some equivalent of the FlushPendingLinkUpdates() in ElementRestyler::Restyle J. Ryan Stinnett [:jryans] (use ni?)
1364242 P2 Stylo: visited support for lazy pseudo-elements J. Ryan Stinnett [:jryans] (use ni?)
1364484 P2 Stylo: CalcStyleDifference support for visited J. Ryan Stinnett [:jryans] (use ni?)
1365692 P2 stylo: Investigate why parallelism win on bloom-basic.html is 3x and not 4x Julian Seward [:jseward]
1365128 P2 Make the sequential stylo talos jobs correctly identify on the Sequential Stylo platform line Kim Moir [:kmoir]
1365752 P2 fix bbconfigs for stylo sequential bugs so they show up correctly in th Kim Moir [:kmoir]
1358993 P2 stylo: ServoStyleSheet::ParseSheet should disconnect child sheets / mRuleList, and re-use child sheets Tommy Kuo [:kuoe0] at UTC+8
1348165 P2 stylo: Support getting authored property value Matt Brubeck (:mbrubeck)
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]
1364260 P2 stylo: Parsing difference for @supports condition between stylo and gecko Simon Sapin (:SimonSapin)
1363805 P2 stylo: Only flush styles on nsComputedDOMStyle::UpdateCurrentStyleSources if we know that the child or one of its ancestors need a restyle. Wei-Cheng Pan [:wcpan] [:wcp] [:legnaleurc]
1352968 P2 stylo: Implement access to CSSImportRule Xidorn Quan [:xidorn] UTC+10

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


Unassigned

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
1336891 P2 stylo: getComputedStyle returns empty for custom property
1341725 P2 stylo: Figure out why marquee is not sized right
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
1344131 P2 stylo: Setting inline style can be a lot slower than Gecko
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
1345218 P2 stylo: shorthand serialization doesn't match Gecko
1345709 P2 stylo: implement interpolation for currentColor
1346693 P2 stylo: Handle namespaces during parsing
1347270 P2 stylo: Need to expose restyled element count to nsIDOMWindowUtils
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 [meta] 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.
1354987 P2 stylo: May need to consider integrating incremental destroyer for style data
1355364 P2 stylo: Support font-language-override 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
1355762 P2 stylo: enable stylo in non-HTML documents
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
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
1360133 P2 stylo: Make {stop, flood}-opacity animatable
1361297 P2 stylo: AccessibleCaret doesn't work
1362292 P2 stylo: Before change style is not correct in test_animations_omta_start.html if we disable e10s
1362333 P2 stylo: @-moz-document 'domain' and 'url-prefix' URL matching functions are parsed differently than in Gecko
1363590 P2 stylo: Support dynamic changes to @counter-style rules
1363639 P2 stylo: Interpolated result of CSSRect is different from gecko.
1363655 P2 stylo: configure should fail when libclang is not actually there
1363778 P2 stylo: Implement the class/id case-insensitive matching quirk
1364162 P2 stylo: Need to support case-insensitive matching for attribute selectors other than equality
1364274 P2 stylo: Need to implement inlinization of ruby kids
1365873 P2 stylo: toolkit/content/tests/chrome/test_bug437844.xul crash with PresShell::Observe("chrome-flush-skin-caches") not implemented for Servo-backed style system crash
1366048 P2 enable Stylo for 32-bit Windows
1366050 P2 enable Stylo for 32-bit Linux by default on automation

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


Links