mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Do not set dirty out-of-doc nodes
This commit is contained in:
parent
e66438de48
commit
d7b6a6f509
5 changed files with 15 additions and 3 deletions
|
@ -313,6 +313,10 @@ impl<'ln> TNode for ServoLayoutNode<'ln> {
|
|||
self.node.downcast().map(ServoShadowRoot::from_layout_js)
|
||||
}
|
||||
|
||||
fn is_in_document(&self) -> bool {
|
||||
unsafe { self.node.get_flag(NodeFlags::IS_IN_DOC) }
|
||||
}
|
||||
|
||||
fn is_connected(&self) -> bool {
|
||||
unsafe { self.node.get_flag(NodeFlags::IS_CONNECTED) }
|
||||
}
|
||||
|
@ -555,7 +559,7 @@ impl<'le> TElement for ServoLayoutElement<'le> {
|
|||
}
|
||||
|
||||
unsafe fn set_dirty_descendants(&self) {
|
||||
debug_assert!(self.as_node().is_connected());
|
||||
debug_assert!(self.as_node().is_in_document());
|
||||
self.as_node()
|
||||
.node
|
||||
.set_flag(NodeFlags::HAS_DIRTY_DESCENDANTS, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue