mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Changing update_inline_style to process multiple declarations at once to handle shorthand serialization better
This commit is contained in:
parent
f38607967e
commit
3dafd558c5
3 changed files with 131 additions and 81 deletions
|
@ -157,7 +157,9 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
|||
self.0.next().map(|r| &**r)
|
||||
}
|
||||
}
|
||||
let serialized_value = shorthand.serialize_shorthand_to_string(Map(list.iter()));
|
||||
|
||||
// TODO: important is hardcoded to false because method does not implement it yet
|
||||
let serialized_value = shorthand.serialize_shorthand_value_to_string(Map(list.iter()), false);
|
||||
return DOMString::from(serialized_value);
|
||||
}
|
||||
|
||||
|
@ -241,10 +243,8 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
|||
let element = self.owner.upcast::<Element>();
|
||||
|
||||
// Step 8
|
||||
for decl in declarations {
|
||||
// Step 9
|
||||
element.update_inline_style(decl, priority);
|
||||
}
|
||||
// Step 9
|
||||
element.update_inline_style(declarations, priority);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue