mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Add is_connected flag to node and use it to replace most uses of is_in_doc
This commit is contained in:
parent
640fc04743
commit
441357b74e
29 changed files with 111 additions and 96 deletions
|
@ -90,15 +90,15 @@ pub trait VirtualMethods {
|
|||
}
|
||||
}
|
||||
|
||||
/// Called when a Node is appended to a tree, where 'tree_in_doc' indicates
|
||||
/// Called when a Node is appended to a tree, where 'tree_connected' indicates
|
||||
/// whether the tree is part of a Document.
|
||||
fn bind_to_tree(&self, tree_in_doc: bool) {
|
||||
fn bind_to_tree(&self, tree_connected: bool) {
|
||||
if let Some(ref s) = self.super_type() {
|
||||
s.bind_to_tree(tree_in_doc);
|
||||
s.bind_to_tree(tree_connected);
|
||||
}
|
||||
}
|
||||
|
||||
/// Called when a Node is removed from a tree, where 'tree_in_doc'
|
||||
/// Called when a Node is removed from a tree, where 'tree_connected'
|
||||
/// indicates whether the tree is part of a Document.
|
||||
/// Implements removing steps:
|
||||
/// <https://dom.spec.whatwg.org/#concept-node-remove-ext>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue