Closed
Bug 1507305
Opened 6 years ago
Closed 6 years ago
Give Servo the ability to serialize computed shorthands
Categories
(Core :: CSS Parsing and Computation, enhancement)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla65
Tracking | Status | |
---|---|---|
firefox65 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
I wrote this for bug 775618, but it applies to all our other shorthands. Need a bit more care with mask and text-decoration, but this introduces the infrastructure, and improves consistency of serialization, in particular with calc(), where Servo follows the Spec but Gecko doesn't.
Assignee | ||
Updated•6 years ago
|
Assignee: nobody → emilio
Assignee | ||
Comment 1•6 years ago
|
||
This implements the mechanism reusing the animation machinery for now, so it asserts in a few cases that this wouldn't handle correctly. For shorthands that have colors and other bits we'd need a more sophisticated mechanism with a bit more code (that resolves colors and such), but it'd look something like this regardless, and we should have this in any case.
Assignee | ||
Comment 2•6 years ago
|
||
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.
Assignee | ||
Comment 3•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=c56002c2f29091bf70f89db6a9ba9160100e44fe
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/5201cfe20675 Add a mechanism to serialize shorthands for getComputedStyle(). r=heycam
Pushed by emilio@crisal.io: https://hg.mozilla.org/integration/autoland/rev/76aa81358d76 Use Servo to serialize most of the already-exposed shorthands. r=heycam
Comment 6•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5201cfe20675 https://hg.mozilla.org/mozilla-central/rev/76aa81358d76
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in
before you can comment on or make changes to this bug.
Description
•