diff options
author | Adrian Utrilla <adrianutrilla@gmail.com> | 2016-04-04 11:03:30 +0200 |
---|---|---|
committer | Adrian Utrilla <adrianutrilla@gmail.com> | 2016-04-04 11:33:37 +0200 |
commit | bc1b8ef4c6d672de5d6c12a8a82286112208e900 (patch) | |
tree | 293593644030edb96ef35e106821a572a5d8a994 /components/script/dom/cssstyledeclaration.rs | |
parent | 88d29e537cb3e92cc39804eabca7cb347c1417e9 (diff) | |
download | servo-bc1b8ef4c6d672de5d6c12a8a82286112208e900.tar.gz servo-bc1b8ef4c6d672de5d6c12a8a82286112208e900.zip |
Inlined content_changed
Diffstat (limited to 'components/script/dom/cssstyledeclaration.rs')
-rw-r--r-- | components/script/dom/cssstyledeclaration.rs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/components/script/dom/cssstyledeclaration.rs b/components/script/dom/cssstyledeclaration.rs index 7c61098dc88..a33672b7fe6 100644 --- a/components/script/dom/cssstyledeclaration.rs +++ b/components/script/dom/cssstyledeclaration.rs @@ -9,7 +9,7 @@ use dom::bindings::inheritance::Castable; use dom::bindings::js::{JS, Root}; use dom::bindings::reflector::{Reflector, reflect_dom_object}; use dom::element::{Element, StylePriority}; -use dom::node::{Node, NodeDamage, document_from_node, window_from_node}; +use dom::node::{Node, NodeDamage, window_from_node}; use dom::window::Window; use std::ascii::AsciiExt; use std::borrow::ToOwned; @@ -257,9 +257,8 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration { element.update_inline_style(decl, priority); } - let document = document_from_node(element); - let node = element.upcast(); - document.content_changed(node, NodeDamage::NodeStyleDamaged); + let node = element.upcast::<Node>(); + node.dirty(NodeDamage::NodeStyleDamaged); Ok(()) } @@ -292,9 +291,8 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration { None => element.set_inline_style_property_priority(&[&*property], priority), } - let document = document_from_node(element); - let node = element.upcast(); - document.content_changed(node, NodeDamage::NodeStyleDamaged); + let node = element.upcast::<Node>(); + node.dirty(NodeDamage::NodeStyleDamaged); Ok(()) } @@ -329,9 +327,8 @@ impl CSSStyleDeclarationMethods for CSSStyleDeclaration { None => elem.remove_inline_style_property(&property), } - let document = document_from_node(elem); - let node = elem.upcast(); - document.content_changed(node, NodeDamage::NodeStyleDamaged); + let node = elem.upcast::<Node>(); + node.dirty(NodeDamage::NodeStyleDamaged); // Step 6 Ok(value) |