servo/components/style/values/generics
Emilio Cobos Álvarez ca503b4908 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 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
2019-01-07 17:05:40 +01:00
..
background.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
basic_shape.rs style: Clamp to non-negative value after doing interpolation for circle(), ellipse(), and inset(). 2019-01-07 00:32:49 +01:00
border.rs style: Clamp to non-negative value after doing interpolation for circle(), ellipse(), and inset(). 2019-01-07 00:32:49 +01:00
box.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
color.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
column.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
counters.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
easing.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
effects.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
flex.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
font.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
gecko.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
grid.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
image.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
length.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
mod.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
position.rs style: Clamp to non-negative value after doing interpolation for circle(), ellipse(), and inset(). 2019-01-07 00:32:49 +01:00
rect.rs style: Clamp to non-negative value after doing interpolation for circle(), ellipse(), and inset(). 2019-01-07 00:32:49 +01:00
size.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
svg.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
text.rs style: Simplify computed::LengthOrPercentage and friends. 2019-01-07 17:05:40 +01:00
transform.rs style: Simplify computed::LengthOrPercentage and friends. 2019-01-07 17:05:40 +01:00
ui.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
url.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00