mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Introduce UnbindContext
This holds the context that describes the original node that was removed from a tree when unbinding from a tree.
This commit is contained in:
parent
b63ca94c7f
commit
8f01790f06
10 changed files with 41 additions and 45 deletions
|
@ -53,7 +53,7 @@ use dom::htmltemplateelement::HTMLTemplateElement;
|
|||
use dom::htmltextareaelement::{HTMLTextAreaElement, RawLayoutHTMLTextAreaElementHelpers};
|
||||
use dom::namednodemap::NamedNodeMap;
|
||||
use dom::node::{CLICK_IN_PROGRESS, LayoutNodeHelpers, Node};
|
||||
use dom::node::{NodeDamage, SEQUENTIALLY_FOCUSABLE};
|
||||
use dom::node::{NodeDamage, SEQUENTIALLY_FOCUSABLE, UnbindContext};
|
||||
use dom::node::{document_from_node, window_from_node};
|
||||
use dom::nodelist::NodeList;
|
||||
use dom::text::Text;
|
||||
|
@ -1616,12 +1616,10 @@ impl VirtualMethods for Element {
|
|||
}
|
||||
}
|
||||
|
||||
fn unbind_from_tree(&self, tree_in_doc: bool) {
|
||||
if let Some(ref s) = self.super_type() {
|
||||
s.unbind_from_tree(tree_in_doc);
|
||||
}
|
||||
fn unbind_from_tree(&self, context: &UnbindContext) {
|
||||
self.super_type().unwrap().unbind_from_tree(context);
|
||||
|
||||
if !tree_in_doc {
|
||||
if !context.tree_in_doc {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue