gecko-dev/servo
Emilio Cobos Álvarez 83fed3d31d Bug 1517511 - Simplify computed::LengthOrPercentage and friends. r=heycam
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 https://github.com/w3c/csswg-drafts/issues/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

--HG--
extra : moz-landing-system : lando
2019-01-07 11:00:27 +00:00
..
components Bug 1517511 - Simplify computed::LengthOrPercentage and friends. r=heycam 2019-01-07 11:00:27 +00:00
ports/geckolib Bug 1517511 - Simplify computed::LengthOrPercentage and friends. r=heycam 2019-01-07 11:00:27 +00:00
tests/unit Bug 1511811 - Use https for the MPL license URL. 2018-12-03 08:43:48 -05:00
moz.build Bug 1511811 - Use https for the MPL license URL. 2018-12-03 08:43:48 -05:00
rustfmt.toml Bug 1505618 - Add Servo's rustfmt.toml to the servo/ directory. r=heycam 2018-11-08 00:50:17 +01:00