Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: Sync changes from mozilla-central, and update euclid #23827

Merged
merged 23 commits into from Jul 24, 2019

Commits on Jul 23, 2019

  1. style: set CSS properties directly on '::cue'.

    According to the spec [1], we have to set those CSS properties on the root node,
    and then this root node would have a child node, background box [2], which would
    contain all other child nodes.
    
    In our case, the background box is `cueDiv` [3].
    
    In theory, all those properties set on the root node should be inherited by the
    background box. However, when the background box is a pseudo element `::cue`,
    they won't be directly inherit from the the background box's parent, inherited
    styles would acutally come from video instead.
    
    Therefore, we have to directly set these properties on the pseudo element and
    mark them as `!important` to avoid being overrided by user style script.
    
    [1] https://www.w3.org/TR/webvtt1/#ref-for-list-of-webvtt-node-objects-9
    [2] https://www.w3.org/TR/webvtt1/#webvtt-cue-background-box
    [3] https://searchfox.org/mozilla-central/rev/11712bd3ce7454923e5931fa92eaf9c01ef35a0a/dom/media/webvtt/vtt.jsm#533-534
    
    Differential Revision: https://phabricator.services.mozilla.com/D35694
    alastor0325 authored and emilio committed Jul 23, 2019
  2. style: Add an 'auto' value for the CSS 'quotes' property, and make it…

    … use language-dependent quote marks.
    
    Differential Revision: https://phabricator.services.mozilla.com/D36429
    jfkthame authored and emilio committed Jul 23, 2019
  3. style: Part 2: Retire the support for 3-valued syntax for position.

    According to this resolved spec issue:
    w3c/csswg-drafts#2140,
    we retire the 3-valued <position> on
    1. `object-position`
    2. `perspective-origin`,
    3. `mask-position`
    4. `circle()` and `ellipse()`
    , but still keep the support for `background-position`.
    
    Besides, I simply run this python script to generate the .ini file:
    ```
    s = sys.argv[1] + ".ini"
    with open(s, "w") as f:
        f.write('[{}]\n'.format(sys.argv[1]))
        f.write('  expected: FAIL\n')
        f.write('  bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1559276\n')
    ```
    
    Differential Revision: https://phabricator.services.mozilla.com/D37126
    BorisChiou authored and emilio committed Jul 23, 2019
  4. style: Ignore pref-controlled properties in cached scrollbar style as…

    …sertions.
    
    Now if you add a new inherited, pref-controlled property, you must
    declare whether it can have an effect on scrollbar styles.  If no,
    then the property will be skipped in the assertions that check
    whether our cached styles are equal to those we would compute.
    
    Differential Revision: https://phabricator.services.mozilla.com/D37507
    heycam authored and emilio committed Jul 23, 2019
  5. style: Don't apply property restrictions to pseudo-elements in UA sty…

    …lesheets.
    
    And remove some of the ::placeholder and ::cue hacks where we need to use
    !important to make the property not apply for content but apply on UA sheets.
    
    The comment about the white-space property was wrong, we don't enforce it with
    !important in the UA stylesheets for <input> (we do for <textarea> though), so
    I've kept the flag since it really applies.
    
    Differential Revision: https://phabricator.services.mozilla.com/D37717
    emilio committed Jul 23, 2019
  6. style: Update spec link for font-variation-settings.

    It had got outdated.
    
    Differential Revision: https://phabricator.services.mozilla.com/D37718
    emilio committed Jul 23, 2019
  7. style: scroll-margin properties shouldn't apply to first-line / first…

    …-letter.
    
    From https://drafts.csswg.org/css-scroll-snap-1/#placement:
    
    > None of the properties in this module apply to the ::first-line and
    > ::first-letter pseudo-elements.
    
    Differential Revision: https://phabricator.services.mozilla.com/D37719
    emilio committed Jul 23, 2019
  8. style: Centralize property restrictions.

    The assertion in properties.mako.rs ensures I got this right.
    
    Differential Revision: https://phabricator.services.mozilla.com/D37720
    emilio committed Jul 23, 2019
  9. style: Add percentage for opacity (i.e. <alpha-value>).

    The following properties accept <alpha-value> [1], which is
    "<number> | <percentage>", so we update the parser, spec links, and
    their web-platform-tests.
    1. opacity
    2. flood-opacity
    3. fill-opacity
    4. stroke-opacity
    5. stop-opacity
    6. -moz-window-opacity
    
    Besides, shape-image-threshold [2] still only accepts <number>, so we need
    to support a different version of `Opacity::parse()`.
    
    [1] https://drafts.csswg.org/css-color/#typedef-alpha-value
    [2] https://drafts.csswg.org/css-shapes/#shape-image-threshold-property
    
    Differential Revision: https://phabricator.services.mozilla.com/D37493
    BorisChiou authored and emilio committed Jul 23, 2019
  10. style: Remove dominant-baseline values that no longer exist.

    Bug: 1353164
    Reviewed-by: heycam
    longsonr authored and emilio committed Jul 23, 2019
  11. style: Modify URLExtraData rust debug to include referrerInfo.

    Thomas Nguyen authored and emilio committed Jul 23, 2019
  12. style: Update animations when a pseudo-element had animations but no …

    …longer has, and has been re-framed in the meantime.
    
    This is the easy fix.
    
    The hard fix (outlined in the comment) would be nice, but I don't think this bug
    alone justifies it.
    
    Differential Revision: https://phabricator.services.mozilla.com/D38184
    emilio committed Jul 23, 2019
  13. style: Remove the ability to build Gecko without the bindgen feature.

    This is not used for anything, as far as I can tell.
    
    Differential Revision: https://phabricator.services.mozilla.com/D38584
    emilio committed Jul 23, 2019
  14. style: Update to euclid 0.20.

    nical authored and emilio committed Jul 23, 2019
  15. style: renamed text-decoration-width to text-decoration-thickness.

    Charlie Marlow authored and emilio committed Jul 23, 2019
  16. style: Change dominant-baseline from reset to inherit.

    Bug: 1353164
    Reviewed-by: heycam
    longsonr authored and emilio committed Jul 23, 2019
  17. Fix Servo build.

    emilio committed Jul 23, 2019
  18. style: Remove unit tests that test non-compliant stuff.

    <position> no longer parses three values.
    emilio committed Jul 23, 2019
  19. style: Appease tidy.

    emilio committed Jul 23, 2019
  20. Update euclid.

    There are a few canvas2d-related dependencies that haven't updated, but they
    only use euclid internally so that's not blocking landing the rest of the
    changes.
    
    Given the size of this patch, I think it's useful to get this landed as-is.
    emilio committed Jul 23, 2019
  21. Update WPT expectations.

    emilio committed Jul 23, 2019
You can’t perform that action at this time.