Commit graph

24 commits

Author SHA1 Message Date
Emilio Cobos Álvarez
36ff89bd28
style: Remove HasViewportPercentage.
It's not needed since #18268
2017-08-29 23:51:21 +02:00
Anthony Ramine
735e093de7 Implement #[compute(clone)] for #[derive(ToComputedValue)] 2017-08-28 10:39:53 +02:00
Anthony Ramine
efc852f6e3 Improve handling of trait bounds when deriving fmap-like traits 2017-08-28 10:39:50 +02:00
Fausto Núñez Alberro
14c5a1b8d3 Introduce ComputedUrl
Add web platform tests for computed URL styles

Mark url with no original or resolved unreachable

Update the WPT manifest for new url tests
2017-08-09 13:55:39 +02:00
Alan Jeffrey
d101f9c945 Implemented paint worklet arguments. 2017-07-29 15:32:13 -05:00
Emilio Cobos Álvarez
75a844cd32
Revert "Auto merge of #17868 - ferjm:bug1380259.radial.gradients, r=xidorn"
This reverts commit ef233381cc, reversing
changes made to f61528d297.

This broke a bunch of tests in m-c, like:

  https://treeherder.mozilla.org/logviewer.html#?job_id=118007409&repo=autoland
2017-07-26 14:25:22 +02:00
Fernando Jiménez Moreno
c50e892a04 stylo: serialize radial gradients using modern unprefixed style 2017-07-26 12:00:15 +02:00
Anthony Ramine
c2e746004a Derive ToCss for MozImageRect<Color> 2017-07-12 11:45:16 +02:00
Anthony Ramine
907d629ca4 Rename ImageRect to MozImageRect 2017-07-12 11:45:15 +02:00
Nazım Can Altınova
d589645ee9 stylo: Implement -moz-prefixed radial gradients 2017-06-30 17:54:01 -07:00
Nazım Can Altınova
3e42684d3c stylo: Implement -moz-prefixed linear gradients 2017-06-30 17:53:01 -07:00
bors-servo
9070ca1c3c Auto merge of #17428 - shinglyu:lineargradient, r=nox
Convert -webkit-linear-gradient coordinate system for Stylo

<!-- Please describe your changes on the following line: -->
This patch will fix the -webkit-linear-gradient direction issue in Stylo. I decided to NOT change the behavior of Servo, because according to the webcompat spec the webkit prefixed version should just be an alias of non-prefixed version. But we might want to remove support for old syntax like "-webkit-linear-gradient(top, ...)" (without "to"), because they are not in the spec anymore.

The Gecko layout system use different coordinate systems for prefixed and non-prefixed version, so I did a conversion, but for Servo I keep the modern version only.

Since I believe we should not support old syntax in Servo, so I'm not going to put the test in Servo. I'll submit my test cases to the Gecko wpt test instead.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix [Bug 1372821](https://bugzilla.mozilla.org/show_bug.cgi?id=1372821)
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because test will be submitted to the Gecko side

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17428)
<!-- Reviewable:end -->
2017-06-27 14:34:01 -07:00
Anthony Ramine
39e29f557e Simplify machinery to serialise optional parts of CSS values
We simply implement ToCss for Option<T>, printing nothing if the value is None,
and we then use SequenceWriter to skip writing of separators around empty parts.
2017-06-21 11:17:22 +02:00
Shing Lyu
f6c652dd9c Convert -webkit-linear-gradient coordinate system for Stylo 2017-06-20 16:46:21 +08:00
Anthony Ramine
8eec24cd46 Revert "Derive ToCss for MozImageRect"
This reverts commit fe19c3810c.
2017-06-13 18:00:29 +02:00
Anthony Ramine
53b465895f Derive ToCss for EndingShape 2017-06-13 11:29:46 +02:00
Anthony Ramine
fe19c3810c Derive ToCss for MozImageRect 2017-06-13 11:29:25 +02:00
Alan Jeffrey
fd17dcd604 Implemented the plumbing for paint worklets. 2017-06-07 13:49:30 -05:00
Anthony Ramine
c4f1d647a0 Derive the most trivial ToCss implementations 🌋
For now, all variants get serialised as the space-separated serialisations
of their fields. Unit variants are not supported.
2017-06-04 16:17:56 +02:00
Anthony Ramine
07c0456cfd Derive ToComputedValue
For now, only impls for types like in style::values::generics can be derived.

This also needed a few ToComputedValueAsSpecified impls that I would like to
replace by some #[to_computed_value(clone)] attribute, but I think it is ok
to keep it like this for now.
2017-05-21 15:31:17 +02:00
Anthony Ramine
cb2e04acf6 Remove style::values::HasViewportPercentage reexport 2017-05-20 22:00:05 +02:00
Anthony Ramine
90bae7f802 Derive HasViewportPercentage 🍷 2017-05-20 14:48:04 +02:00
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
1c54758ad6 Introduce style::values::generics::image 2017-05-15 15:35:26 +02:00