mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +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
|
@ -42,7 +42,7 @@ use dom::htmltablesectionelement::HTMLTableSectionElement;
|
|||
use dom::htmltemplateelement::HTMLTemplateElement;
|
||||
use dom::htmltextareaelement::HTMLTextAreaElement;
|
||||
use dom::htmltitleelement::HTMLTitleElement;
|
||||
use dom::node::{ChildrenMutation, CloneChildrenFlag, Node};
|
||||
use dom::node::{ChildrenMutation, CloneChildrenFlag, Node, UnbindContext};
|
||||
use string_cache::Atom;
|
||||
use util::str::DOMString;
|
||||
|
||||
|
@ -82,9 +82,9 @@ pub trait VirtualMethods {
|
|||
|
||||
/// Called when a Node is removed from a tree, where 'tree_in_doc'
|
||||
/// indicates whether the tree is part of a Document.
|
||||
fn unbind_from_tree(&self, tree_in_doc: bool) {
|
||||
fn unbind_from_tree(&self, context: &UnbindContext) {
|
||||
if let Some(ref s) = self.super_type() {
|
||||
s.unbind_from_tree(tree_in_doc);
|
||||
s.unbind_from_tree(context);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue