Commit graph

30 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
81f40a57e4 style: Reformat recent style system changes. 2019-05-29 16:14:30 +02:00
Emilio Cobos Álvarez
44926adde7 style: Use cbindgen for border-image-width.
Differential Revision: https://phabricator.services.mozilla.com/D32032
2019-05-29 16:14:23 +02:00
Emilio Cobos Álvarez
7d01114cbf style: Add a Zero trait that doesn't require Add, and use it in place of num_traits and IsZeroLength.
Use it to be consistent in InsetRect serialization and storage between Servo and
Gecko.

Differential Revision: https://phabricator.services.mozilla.com/D21493
2019-03-13 15:08:14 +01:00
Emilio Cobos Álvarez
197065f6bc style: Use rust lengths for border corners.
The test in https://github.com/web-platform-tests/wpt/pull/15423 hasn't been
synced over yet, but it passes with this patch of course.

Differential Revision: https://phabricator.services.mozilla.com/D20960
2019-03-13 15:08:12 +01:00
Emilio Cobos Álvarez
aad4dac5b4 style: Make the generic size not use euclid under the hood.
The euclid size is not really used for anything. Also rename it to Size2D to
avoid cbindgen conflicts with values::length::Size.

Differential Revision: https://phabricator.services.mozilla.com/D20959
2019-03-13 15:08:11 +01:00
Emilio Cobos Álvarez
daf1f02feb 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
2019-01-08 12:00:48 +01:00
Emilio Cobos Álvarez
5f173c463e style: Rustfmt recent changes. 2019-01-07 00:32:54 +01:00
Emilio Cobos Álvarez
ca1ad003bd style: Use NonNegative more in the border code.
This ended up not being so small of a patch as I'd have thought, since it
propagated a bit. But most of it is mechanical. Interesting part is
NonNegativeNumberOrPercentage and the actual uses of the NonNegative stuff and
during parsing.

This looks like it'd fix a few correctness issues during interpolation for all
the types except for BorderRadius and co (which handled it manually).

I should write tests for those in a different patch.

Differential Revision: https://phabricator.services.mozilla.com/D14673
2019-01-07 00:03:41 +01:00
Simon Sapin
be69f9c3e6 Rustfmt has changed its default style :/ 2018-12-28 13:17:47 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Simon Sapin
a15d33a10e cargo fix --edition 2018-11-10 17:47:28 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Emilio Cobos Álvarez
e338bd3add
style: Serialize clip-path and shape-outside using Servo.
Differential Revision: https://phabricator.services.mozilla.com/D3653
2018-09-03 12:30:57 +02:00
Bobby Holley
c99bcdd4b8 Run rustfmt on selectors, servo_arc, and style.
This was generated with:

./mach cargo fmt --package selectors &&
./mach cargo fmt --package servo_arc &&
./mach cargo fmt --package style

Using rustfmt 0.4.1-nightly (a4462d1 2018-03-26)
2018-04-10 17:35:15 -07:00
Emilio Cobos Álvarez
68ce13aae4
style: Simplify border-image-repeat serialization.
We're the only ones to preserve explicitly the second keyword, as noticed in:

  https://github.com/w3c/web-platform-tests/pull/10170
2018-04-11 00:43:45 +02:00
Gecko Backout
007218b9ec Backed out changeset d186bcce1235 for failing on layout/style/test/test_shorthand_property_getters.html on a CLOSED TREE
Backs out https://github.com/servo/servo/pull/20610
2018-04-10 16:44:34 +00:00
Emilio Cobos Álvarez
2f324aa665
style: Simplify border-image-repeat serialization.
We're the only ones to preserve explicitly the second keyword, as noticed in:

  https://github.com/w3c/web-platform-tests/pull/10170
2018-04-10 13:43:09 +02:00
Anthony Ramine
52f0fcabad Properly implement ToAnimatedZero for BorderSpacing 2018-02-15 12:03:01 +01:00
Anthony Ramine
c92d0a8902 Implement Clone for AnimationValue by hand 🐉🐲
We use the same trick as in PropertyDeclaration::clone.
2018-02-11 09:47:14 +01:00
Mauricio Collares
8e411105ce
style: Rename background::RepeatKeyword and border::RepeatKeyword. 2018-02-01 15:23:41 +01:00
chansuke
50b517d0db
style: Move border-image-repeat outside of mako. 2018-02-01 13:59:10 +01:00
Emilio Cobos Álvarez
2ac1327e4b
style: Make border-spacing serialization consistent, and move it to precomputed_type. 2017-09-17 21:33:17 +02:00
Emilio Cobos Álvarez
f9c06d7932
style: Generalise BorderCornerRadius as Size. 2017-09-17 21:33:14 +02:00
Simon Sapin
b5a4b8d6a0 Upgrade to rustc 1.21.0-nightly (13d94d5fa 2017-08-10) 2017-08-15 14:10:44 +02:00
Anthony Ramine
fb8400d745 Move impl of ToAnimatedZero for BorderCornerRadius where it belongs 2017-08-14 01:46:53 +02:00
Anthony Ramine
e58f541951 Rename BorderImageWidthSide to BorderImageSideWidth 2017-06-02 10:53:28 +02:00
Anthony Ramine
862fc4f88d Rename BorderRadiusSize to BorderCornerSize 2017-05-29 00:58:53 +02:00
Anthony Ramine
af3ede418b Refactor BorderRadius and move it to the border modules
BorderRadius now parses itself reusing Rect<T>.
2017-05-28 14:36:37 +02:00
Anthony Ramine
078d4ed40c Use generics for border-image-slice property 2017-05-23 14:36:54 +02:00
Anthony Ramine
c8eb277ca5 Use generics for the border-image-width property 2017-05-23 10:59:59 +02:00