mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Use Arc<PropertyDeclarationBlock> everwhere it’s appropriate.
This commit is contained in:
parent
c50e6add4a
commit
acc38aa8c2
13 changed files with 85 additions and 68 deletions
|
@ -15,6 +15,7 @@ use dom::node::{Node, NodeDamage, window_from_node};
|
|||
use dom::window::Window;
|
||||
use std::ascii::AsciiExt;
|
||||
use std::slice;
|
||||
use std::sync::Arc;
|
||||
use string_cache::Atom;
|
||||
use style::parser::ParserContextExtraData;
|
||||
use style::properties::{PropertyDeclaration, Shorthand, Importance};
|
||||
|
@ -367,7 +368,7 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration {
|
|||
*element.style_attribute().borrow_mut() = if decl_block.declarations.is_empty() {
|
||||
None // Step 2
|
||||
} else {
|
||||
Some(decl_block)
|
||||
Some(Arc::new(decl_block))
|
||||
};
|
||||
element.sync_property_with_attrs_style();
|
||||
let node = element.upcast::<Node>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue