servo/components/style
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
..
counter_style Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
gecko style: Simplify computed::LengthOrPercentage and friends. 2019-01-07 17:05:40 +01:00
gecko_bindings style: Simplify computed::LengthOrPercentage and friends. 2019-01-07 17:05:40 +01:00
gecko_string_cache Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
invalidation style: Rustfmt recent changes. 2019-01-07 00:32:54 +01:00
media_queries Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
properties style: Simplify computed::LengthOrPercentage and friends. 2019-01-07 17:05:40 +01:00
rule_tree style: Set the important rule change flag when a newly important rule is inserted. 2018-12-02 14:17:20 -05:00
servo Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
sharing Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
stylesheets style: Simplify computed::LengthOrPercentage and friends. 2019-01-07 17:05:40 +01:00
use_counters Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
values style: Simplify computed::LengthOrPercentage and friends. 2019-01-07 17:05:40 +01:00
animation.rs style: Minor build fixup after the Servo crossbeam_channel update. 2018-12-16 13:35:08 +01:00
applicable_declarations.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
attr.rs Fix some warnings 2018-12-28 15:31:08 +01:00
author_styles.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
bezier.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
bloom.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
build.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
build_gecko.rs style: Update the Rust target version for bindgen. 2019-01-07 00:32:50 +01:00
Cargo.toml style: Bump smallvec and smallbitvec. 2019-01-07 00:32:50 +01:00
cbindgen.toml style: Use cbindgen for ExtremumLength. 2019-01-07 00:03:52 +01:00
context.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
custom_properties.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
data.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
dom.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
dom_apis.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
driver.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
element_state.rs Rename nsIDocument to mozilla::dom::Document. 2019-01-07 00:32:51 +01:00
encoding_support.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
error_reporting.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
font_face.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
font_metrics.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
global_style_data.rs style: Make Servo use a single thread-pool for layout-related tasks per-process. 2018-12-23 13:00:56 +01:00
hash.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
lib.rs style: Make Servo use a single thread-pool for layout-related tasks per-process. 2018-12-23 13:00:56 +01:00
logical_geometry.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
macros.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
matching.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
parallel.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
parser.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
README.md docs: Add style overview. 2016-05-04 00:34:03 +02:00
rule_cache.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
rule_collector.rs style: Rustfmt recent changes. 2019-01-07 00:32:54 +01:00
scoped_tls.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
selector_map.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
selector_parser.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
shared_lock.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
str.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
style_adjuster.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
style_resolver.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
stylesheet_set.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
stylist.rs style: Rustfmt recent changes. 2019-01-07 00:32:54 +01:00
thread_state.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
timer.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
traversal.rs Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
traversal_flags.rs Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00

servo-style

Style system for Servo, using rust-cssparser for parsing.