mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
style: Add a mechanism to serialize shorthands for getComputedStyle().
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. Differential Revision: https://phabricator.services.mozilla.com/D11944
This commit is contained in:
parent
60331f01d0
commit
ebb57eff22
2 changed files with 10 additions and 1 deletions
|
@ -309,7 +309,9 @@ impl PropertyDeclarationBlock {
|
|||
.find(|(declaration, _)| declaration.id() == property)
|
||||
}
|
||||
|
||||
fn shorthand_to_css(
|
||||
/// Tries to serialize a given shorthand from the declarations in this
|
||||
/// block.
|
||||
pub fn shorthand_to_css(
|
||||
&self,
|
||||
shorthand: ShorthandId,
|
||||
dest: &mut CssStringWriter,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue