Anthony Ramine
abef5da9d8
Refactor Gradient
...
In a similar way to Position, now specified and computed gradients share
a common Gradient type defined in style::values::generics::image.
This allows us to reuse most code for many style traits like ToCss,
HasViewportPercentage and ToComputedValue.
The test changes are the fallout of the disappearance of AngleOrCorner::None,
which align our code to the spec for serialisation, where components that can
be omitted should be omitted.
2017-05-15 15:36:15 +02:00
Anthony Ramine
f2aaba685b
Kill side keywords from style::values::specified::image
2017-05-15 15:35:31 +02:00
Anthony Ramine
1c54758ad6
Introduce style::values::generics::image
2017-05-15 15:35:26 +02:00
Michael Brennan
f7459fd848
Make no_viewport_percentage! use an absolute path for HasViewportPercentage
2017-05-11 14:24:03 +02:00
cku
3c3e7f63ee
Stylo: Implement {specified|computed}::LayerImage.
2017-05-03 20:51:33 +08:00
Anthony Ramine
ae82cdab34
Parse interpolation hints ( fixes #15166 )
2017-04-27 15:04:36 +02:00
Anthony Ramine
0854df922d
Fix parsing of -webkit-linear-gradient()
...
No code can actually be shared between WebKit and modern gradients. :(
2017-04-21 11:08:44 +02:00
Anthony Ramine
2ac57a7d8f
Fix parsing of -webkit-radial-gradient()
...
It's either keywords or lengths, but not a mix of two.
2017-04-20 22:46:18 +02:00
Anthony Ramine
de1fb76ac1
Properly forbid legacy keywords in modern gradient syntax
2017-04-20 13:11:13 +02:00
Anthony Ramine
d5cd34dec8
Implement -webkit-radial-gradient() ( fixes #15441 )
2017-04-20 11:26:47 +02:00
Anthony Ramine
50c25f3221
Extract the shape parsing code from GradientKind::parse_radial
2017-04-20 11:15:40 +02:00
Anthony Ramine
ba3f18f485
Allow unitless zero when parsing gradients' center
2017-04-14 09:49:38 +02:00
Anthony Ramine
133b599a6f
Implement webkit-prefixed linear gradients
...
This is half of https://github.com/servo/servo/issues/15441 .
2017-04-13 18:57:48 +02:00
Anthony Ramine
e01529a647
Repeat less code in Gradient::parse_function
2017-04-13 18:57:47 +02:00
Nazım Can Altınova
9618363e08
stylo: Add -moz-element support
2017-04-09 21:25:48 +03:00
Nazım Can Altınova
494238ab29
Add support for -moz-image-rect
2017-03-25 21:58:36 +03:00
Bobby Holley
63e8367eee
Don't resolve URLs at parse time for Stylo.
...
It's a bit unfortunate the use separate implementations of SpecifiedUrl for Servo
and Gecko, but they're different enough at this point that I don't think it really
makes sense to try to share everything. Splitting them out has some nice
simplifications as well.
I recognize that there's still some potential correctness issues for Servo using
the resolved URI in various places where the original URI may be the right thing,
but I've got too much on my plate to look into that for now.
MozReview-Commit-ID: BeDu93TQ4Ow
2017-03-22 19:11:30 -07:00
Simon Sapin
0f2d000a23
Borrow input to match_ignore_ascii_case!
...
In cssparser version 0.11, this macro will stop implicitly borrowing its
own input.
2017-02-26 10:40:09 +01:00
Manish Goregaokar
c0e1a1f963
Ensure that gradients have at least 2 stops
2017-01-31 22:23:00 -08:00
Manish Goregaokar
f59557d2f2
Box CalcLengthOrPercentage to reduce inline size of PropertyDeclaration(s)
2017-01-17 08:09:54 -08:00
Emilio Cobos Álvarez
f37aa12927
style: Prevent more missing docs in the values module.
2016-12-31 12:17:02 +01:00
Xidorn Quan
fed488cd01
Change SpecifiedUrl::for_cascade to take ServoUrl
2016-12-21 10:14:04 +11:00
Nick Price
5d56946bc2
Maintain Corner type, add None type to AngleOrCorner
2016-12-16 17:49:15 -05:00
Ravi Shankar
dee1a65a69
Use the ParserContext along with Parser in the parse function
2016-11-27 08:49:20 +05:30
Emilio Cobos Álvarez
913c874cb5
Urlmageddon: Use refcounted urls more often.
2016-11-17 18:34:23 +01:00
Emilio Cobos Álvarez
5f2e7af864
style: Centralize specified url value handling, and refcount urls.
2016-11-10 13:15:21 +01:00
Ravi Shankar
6061985898
Prefer Servo-specific ToCss for all types
2016-11-07 09:14:22 +05:30
Nazım Can Altınova
89850e6efa
Fix radial gradient's <size>/<ending-shape> parsing
2016-10-19 13:15:28 +03:00
Nazım Can Altınova
26c98edd68
Implement parsing of all gradients
2016-10-09 22:53:15 +03:00