style: Introduce TNode::is_in_document.

MozReview-Commit-ID: BrhhoOghtUL
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-10-27 12:18:27 +02:00
parent 93272f46a5
commit f993693eb2
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 13 additions and 1 deletions

View file

@ -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)
}