mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Pass AbstractNode to Node<ScriptView>.add_to_doc().
This commit is contained in:
parent
75b83e38db
commit
f9be872e61
1 changed files with 2 additions and 2 deletions
|
@ -460,7 +460,7 @@ impl Node<ScriptView> {
|
||||||
node
|
node
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_to_doc(&mut self, doc: AbstractDocument) {
|
pub fn add_to_doc(&mut self, abstract_self: AbstractNode<ScriptView>, doc: AbstractDocument) {
|
||||||
let old_doc = self.owner_doc;
|
let old_doc = self.owner_doc;
|
||||||
self.owner_doc = doc;
|
self.owner_doc = doc;
|
||||||
let mut cur_node = self.first_child;
|
let mut cur_node = self.first_child;
|
||||||
|
@ -753,7 +753,7 @@ impl Node<ScriptView> {
|
||||||
node.parent_node().map(|parent| parent.remove_child(node));
|
node.parent_node().map(|parent| parent.remove_child(node));
|
||||||
abstract_self.add_child(node);
|
abstract_self.add_child(node);
|
||||||
do node.with_mut_base |node| {
|
do node.with_mut_base |node| {
|
||||||
node.add_to_doc(self.owner_doc);
|
node.add_to_doc(abstract_self, self.owner_doc);
|
||||||
}
|
}
|
||||||
Ok(node)
|
Ok(node)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue