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. #22645

Merged
merged 6 commits into from Jan 8, 2019
Merged

Commits on Jan 7, 2019

  1. style: Simplify computed::LengthOrPercentage and friends.

    This is a first step to share LengthOrPercentage representation between Rust and
    Gecko.
    
    We need to preserve whether the value came from a calc() expression, for now at
    least, since we do different things depending on whether we're calc or not right
    now. See w3c/csswg-drafts#3482 and dependent bugs for
    example.
    
    That means that the gecko conversion code needs to handle calc() in a bit of an
    awkward way until I change it to not be needed (patches for that incoming in the
    next few weeks I hope).
    
    I need to add a hack to exclude other things from the PartialEq implementation
    because the new conversion code is less lossy than the old one, and we relied on
    the lousiness in AnimationValue comparison (in order to start transitions and
    such, in [1] for example).
    
    I expect to remove that manual PartialEq implementation as soon as I'm done with
    the conversion.
    
    The less lossy conversion does fix a few serialization bugs for animation values
    though, like not loosing 0% values in calc() when interpolating lengths and
    percentages, see the two modified tests:
    
     * property-types.js
     * test_animation_properties.html
    
    Differential Revision: https://phabricator.services.mozilla.com/D15793
    emilio committed Jan 7, 2019

Commits on Jan 8, 2019

  1. style: Fix servo build.

    This also fixes a bunch of calc handling issues and such.
    
    Also remove tests that no longer compile and are covered by WPT.
    emilio committed Jan 8, 2019
  2. style: Rename LengthOrPercentage to LengthPercentage.

    It does not represent `<length> | <percentage>`, but `<length-percentage>`, so
    `LengthOrPercentage` is not the right name.
    
    This patch is totally autogenerated using:
    
    rg 'LengthOrPercentage' servo | cut -d : -f 1 | sort | uniq > files
    for file in $(cat files); do sed -i "s#LengthOrPercentage#LengthPercentage#g" $file; done
    
    Differential Revision: https://phabricator.services.mozilla.com/D15812
    emilio committed Jan 8, 2019
  3. style: Manually rename some variables.

    lop is not an acceptable variable name for LengthPercentage.
    
    Differential Revision: https://phabricator.services.mozilla.com/D15813
    emilio committed Jan 8, 2019
  4. style: Fix servo build.

    emilio committed Jan 8, 2019
  5. Rustfmt recent changes.

    emilio committed Jan 8, 2019
You can’t perform that action at this time.