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
|
@ -372,7 +372,7 @@ impl HTMLScriptElement {
|
|||
}
|
||||
|
||||
// Step 5.
|
||||
if !self.upcast::<Node>().is_in_doc() {
|
||||
if !self.upcast::<Node>().is_connected() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -760,7 +760,7 @@ impl VirtualMethods for HTMLScriptElement {
|
|||
match *attr.local_name() {
|
||||
local_name!("src") => {
|
||||
if let AttributeMutation::Set(_) = mutation {
|
||||
if !self.parser_inserted.get() && self.upcast::<Node>().is_in_doc() {
|
||||
if !self.parser_inserted.get() && self.upcast::<Node>().is_connected() {
|
||||
self.prepare();
|
||||
}
|
||||
}
|
||||
|
@ -773,7 +773,7 @@ impl VirtualMethods for HTMLScriptElement {
|
|||
if let Some(ref s) = self.super_type() {
|
||||
s.children_changed(mutation);
|
||||
}
|
||||
if !self.parser_inserted.get() && self.upcast::<Node>().is_in_doc() {
|
||||
if !self.parser_inserted.get() && self.upcast::<Node>().is_connected() {
|
||||
self.prepare();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue