mirror of
https://github.com/servo/servo
synced 2026-04-30 11:27:28 +02:00
Add is_connected flag to node and use it to replace most uses of is_in_doc
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user