diff options
author | Cameron McCormack <cam@mcc.id.au> | 2016-12-29 15:04:45 +0800 |
---|---|---|
committer | Cameron McCormack <cam@mcc.id.au> | 2016-12-30 10:58:31 +0800 |
commit | be1a73dac53ed8ccc7a77790db6e39fbc19ba901 (patch) | |
tree | 913bad01a02d104357c0b043a59e401572e129fc /components/script/layout_wrapper.rs | |
parent | b5f3d7dd413886037de8f1bc435ede34a98421b3 (diff) | |
download | servo-be1a73dac53ed8ccc7a77790db6e39fbc19ba901.tar.gz servo-be1a73dac53ed8ccc7a77790db6e39fbc19ba901.zip |
Don't persist styles on elements not in the document.
Diffstat (limited to 'components/script/layout_wrapper.rs')
-rw-r--r-- | components/script/layout_wrapper.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/components/script/layout_wrapper.rs b/components/script/layout_wrapper.rs index e6c38aa1fb3..3e245ccdd35 100644 --- a/components/script/layout_wrapper.rs +++ b/components/script/layout_wrapper.rs @@ -199,6 +199,10 @@ impl<'ln> TNode for ServoLayoutNode<'ln> { self.node.parent_node_ref().map(|node| self.new_with_this_lifetime(&node)) } } + + fn is_in_doc(&self) -> bool { + unsafe { (*self.node.unsafe_get()).is_in_doc() } + } } pub struct ServoChildrenIterator<'a> { |