mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +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
|
@ -185,6 +185,9 @@ pub trait TNode: Sized + Copy + Clone + Debug + NodeInfo + PartialEq {
|
|||
DomChildren(self.first_child())
|
||||
}
|
||||
|
||||
/// Returns whether the node is attached to a document.
|
||||
fn is_in_document(&self) -> bool;
|
||||
|
||||
/// Returns whether the node is connected.
|
||||
fn is_connected(&self) -> bool;
|
||||
|
||||
|
|
|
@ -421,6 +421,11 @@ impl<'ln> TNode for GeckoNode<'ln> {
|
|||
self.get_bool_flag(nsINode_BooleanFlag::IsInDocument)
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn is_connected(&self) -> bool {
|
||||
self.get_bool_flag(nsINode_BooleanFlag::IsConnected)
|
||||
}
|
||||
|
||||
fn traversal_parent(&self) -> Option<GeckoElement<'ln>> {
|
||||
self.flattened_tree_parent().and_then(|n| n.as_element())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue