mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +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
|
@ -171,12 +171,12 @@ impl VirtualMethods for HTMLMetaElement {
|
|||
Some(self.upcast::<HTMLElement>() as &dyn VirtualMethods)
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
if tree_in_doc {
|
||||
if tree_connected {
|
||||
self.process_attributes();
|
||||
}
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ impl VirtualMethods for HTMLMetaElement {
|
|||
s.unbind_from_tree(context);
|
||||
}
|
||||
|
||||
if context.tree_in_doc {
|
||||
if context.tree_connected {
|
||||
self.process_referrer_attribute();
|
||||
|
||||
if let Some(s) = self.stylesheet.borrow_mut().take() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue