Two less properties, now that we're not using nsStyleCoord for them we can do
this.
Unfortunately the grid resolved value code needs to serialize it still, so this
doesn't remove as much code.
Also fix the script since the generated file was renamed.
Differential Revision: https://phabricator.services.mozilla.com/D36349
And rename the constants to not be prefixed by TOUCH_ACTION_, since that's part
of the type name anyway.
Differential Revision: https://phabricator.services.mozilla.com/D23413
--HG--
extra : moz-landing-system : lando
This also adopts the resolution from [1] while at it, making letter-spacing
compute to a length, serializing 0 to normal rather than keeping normal in the
computed value, which matches every other engine.
This removes the SMIL tests for percentages from letter-spacing since
letter-spacing does in fact not support percentages, so they were passing just
by chance.
[1]: https://github.com/w3c/csswg-drafts/issues/1484
Differential Revision: https://phabricator.services.mozilla.com/D21850
--HG--
extra : moz-landing-system : lando
As it turns out we need this to avoid losing precision both during painting and
during serialization.
This patch also changes to serialize `context-value` if it's the computed value.
I could keep the previous behavior, but it makes no sense to serialize the
initial value. We're the only ones to support this value anyway, and I couldn't
find a definition or spec for this.
Also update tests and expectations for:
* New unexpected passes.
* Always serializing the unit in getComputedStyle.
* Calc and interpolation support.
Chrome also always serializes the unit in getComputedStyle, so I'm pretty sure
this is compatible with them. Chrome is inconsistent and keeps numbers in
specified style, but that's inconsistent with itself and with other quirky
lengths, so I updated the tests instead.
Differential Revision: https://phabricator.services.mozilla.com/D21819
It's easier to see what remains that way. Done with the following script:
```
execfile("layout/style/ServoCSSPropList.py")
for p in data:
if p.type() != "longhand":
continue
if "GetCSNeedsLayoutFlush" in p.flags or "SerializedByServo" in p.flags or "Internal" in p.flags:
continue
print(p.name)
```
Ran like:
```
$ python print.py | sort
```
From the objdir.
Differential Revision: https://phabricator.services.mozilla.com/D20965
It's easier to see what remains that way. Done with the following script:
```
execfile("layout/style/ServoCSSPropList.py")
for p in data:
if p.type() != "longhand":
continue
if "GetCSNeedsLayoutFlush" in p.flags or "SerializedByServo" in p.flags or "Internal" in p.flags:
continue
print(p.name)
```
Ran like:
```
$ python print.py | sort
```
From the objdir.
Differential Revision: https://phabricator.services.mozilla.com/D20965
-moz-tab-size, border-image-outset and border-image-slice.
This is not a particularly interesting patch, just removes some code. We can
remove way more code when a few related properties are also ported.
Differential Revision: https://phabricator.services.mozilla.com/D19825
The only reason it was on style_traits is so that they could use it from some
other crates, but Servo eventually ends up getting the value from an integer, so
may as well pass it around and do that in the end of the process anyway.
Differential Revision: https://phabricator.services.mozilla.com/D16557
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
--HG--
extra : moz-landing-system : lando
(Also remove stale decl for DoGetOverflowY, which cleanup_computed_getters.py
found for me.)
Differential Revision: https://phabricator.services.mozilla.com/D14618
--HG--
extra : moz-landing-system : lando
I'm pretty sure the FIXME I left in the outline-style code is a bug,
but I want to clean this up further and I didn't want to fix it without adding
a test.
Differential Revision: https://phabricator.services.mozilla.com/D12859
--HG--
extra : moz-landing-system : lando
Skip mask and text-decoration for now since there's a single test-case failing
for each that seem worth fixing in a different bug:
* For mask, there's the case of setting mask: url(foo.svg#bar), which we test
we serialize absolutely. But given we're uncomputing it we don't serialize
the resolved URL. Chrome doesn't either so we could just change the test, but
even if we decided to do it we probably should do it in a separate bug.
* For text-decoration, we need to resolve the value, when it's an interpolation
between currentcolor and other color. Right now that returns the empty string
which is not great:
https://searchfox.org/mozilla-central/rev/d850d799a0009f851b5535580e0a8b4bb2c591d7/servo/components/style/values/specified/color.rs#194
So I need to come up with something. Probably we need to implement the "hard"
version of the serialization code that doesn't reuse the animation machinery.
Definitely a separate bug though.
While at it, also serialize all <position> longhands with Servo, so that I can
clean up the tests.
Differential Revision: https://phabricator.services.mozilla.com/D11948
--HG--
extra : moz-landing-system : lando
Basically, we rewrite the type of generics::transform::Translate and its
ToCss to match the spec. Besides, we always serialize Translate by servo,
so we could drop a lot of duplicated code.
Differential Revision: https://phabricator.services.mozilla.com/D11206
--HG--
extra : moz-landing-system : lando
The current spec says: "If only the X value is given, the Y value
defaults to the same value.", so we should update the behavior.
Besides, we also update the serialization, so we serialization both
specified and computed value by servo. We enable the preference
for all the css-transforms, so some of them are passed now.
Differential Revision: https://phabricator.services.mozilla.com/D10638
--HG--
extra : moz-landing-system : lando
With this change, all of Chrome, Edge, Firefox, and Safari serialize
border-image-repeat by omitting a repeated keyword, so we update a WPT
that was expecting duplicated keywords.
Differential Revision: https://phabricator.services.mozilla.com/D10445
--HG--
extra : moz-landing-system : lando
This is the first step to unprefix user-select.
This has no behavior change, it's just a nicer way to do the same thing which
allows us to unship individual values more easily using parse(condition).
Differential Revision: https://phabricator.services.mozilla.com/D11580
This is the first step to unprefix user-select.
This has no behavior change, it's just a nicer way to do the same thing which
allows us to unship individual values more easily using parse(condition).
Differential Revision: https://phabricator.services.mozilla.com/D11580
We could make sure we serialize TimingFunction for both computed
and specified values with servo (via CSSOM). However, Web animation
APIs could also serialize the timing function from a different code
path. We will fix it in the next patch.
Differential Revision: https://phabricator.services.mozilla.com/D10443
--HG--
extra : moz-landing-system : lando
This needs to update the "fill-rule" and "clip-rule" to use
predefined_type to avoid some compilation errors.
Differential Revision: https://phabricator.services.mozilla.com/D10142
--HG--
extra : moz-landing-system : lando
I had to fix the conversion for BackgroundSize too, hopefully we can
simplify all this using cbindgen in the future instead of CalcValue.
Differential Revision: https://phabricator.services.mozilla.com/D7580
--HG--
extra : moz-landing-system : lando
This changes the serialization of -moz-image-region to be consistent with that
of clip(), but it's an internal property and the specified value is already
serialized by servo so I think it's the right thing to do.
There are also no internal callers of the getter.
Differential Revision: https://phabricator.services.mozilla.com/D7069