mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
style: Introduce TNode::is_in_document.
MozReview-Commit-ID: BrhhoOghtUL Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
parent
93272f46a5
commit
f993693eb2
3 changed files with 13 additions and 1 deletions
|
@ -213,6 +213,10 @@ impl<'ln> TNode for ServoLayoutNode<'ln> {
|
|||
unsafe { self.node.get_flag(NodeFlags::CAN_BE_FRAGMENTED) }
|
||||
}
|
||||
|
||||
fn is_in_document(&self) -> bool {
|
||||
unsafe { self.node.get_flag(NodeFlags::IS_IN_DOC) }
|
||||
}
|
||||
|
||||
unsafe fn set_can_be_fragmented(&self, value: bool) {
|
||||
self.node.set_flag(NodeFlags::CAN_BE_FRAGMENTED, value)
|
||||
}
|
||||
|
@ -417,7 +421,7 @@ impl<'le> TElement for ServoLayoutElement<'le> {
|
|||
}
|
||||
|
||||
unsafe fn set_dirty_descendants(&self) {
|
||||
debug_assert!(self.as_node().node.get_flag(NodeFlags::IS_IN_DOC));
|
||||
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