mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Reuse declaration block with SVG presentation attributes
Ideally we'd only update the attributes that actually changed. That's a bit more work I can try to look into, but this and bug 1823686 should improve things here. Differential Revision: https://phabricator.services.mozilla.com/D173162
This commit is contained in:
parent
7d12331626
commit
4d62fec376
1 changed files with 8 additions and 0 deletions
|
@ -754,6 +754,14 @@ impl PropertyDeclarationBlock {
|
|||
self.declarations.remove(i);
|
||||
}
|
||||
|
||||
/// Clears all the declarations from this block.
|
||||
#[inline]
|
||||
pub fn clear(&mut self) {
|
||||
self.declarations_importance.clear();
|
||||
self.declarations.clear();
|
||||
self.longhands.clear();
|
||||
}
|
||||
|
||||
/// <https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-removeproperty>
|
||||
///
|
||||
/// `first_declaration` needs to be the result of
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue