mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +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
|
@ -2009,7 +2009,7 @@ impl VirtualMethods for HTMLMediaElement {
|
|||
fn unbind_from_tree(&self, context: &UnbindContext) {
|
||||
self.super_type().unwrap().unbind_from_tree(context);
|
||||
|
||||
if context.tree_in_doc {
|
||||
if context.tree_connected {
|
||||
let task = MediaElementMicrotask::PauseIfNotInDocumentTask {
|
||||
elem: DomRoot::from_ref(self),
|
||||
};
|
||||
|
@ -2061,7 +2061,7 @@ impl MicrotaskRunnable for MediaElementMicrotask {
|
|||
}
|
||||
},
|
||||
&MediaElementMicrotask::PauseIfNotInDocumentTask { ref elem } => {
|
||||
if !elem.upcast::<Node>().is_in_doc() {
|
||||
if !elem.upcast::<Node>().is_connected() {
|
||||
elem.internal_pause_steps();
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue