Don't persist styles on elements not in the document.

This commit is contained in:
Cameron McCormack 2016-12-29 15:04:45 +08:00
parent b5f3d7dd41
commit be1a73dac5
5 changed files with 24 additions and 4 deletions

View file

@ -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> {