mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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
|
@ -69,17 +69,17 @@ impl VirtualMethods for HTMLTitleElement {
|
|||
s.children_changed(mutation);
|
||||
}
|
||||
let node = self.upcast::<Node>();
|
||||
if node.is_in_doc() {
|
||||
if node.is_connected() {
|
||||
node.owner_doc().title_changed();
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
let node = self.upcast::<Node>();
|
||||
if tree_in_doc {
|
||||
if tree_connected {
|
||||
node.owner_doc().title_changed();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue