mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
script: Fix busted document fragment appending code
This commit is contained in:
parent
a94e13f888
commit
b245a2475f
1 changed files with 8 additions and 6 deletions
|
@ -1381,18 +1381,20 @@ impl Node {
|
||||||
// Step 4.
|
// Step 4.
|
||||||
// Step 5: DocumentFragment, mutation records.
|
// Step 5: DocumentFragment, mutation records.
|
||||||
// Step 6: DocumentFragment.
|
// Step 6: DocumentFragment.
|
||||||
for c in node.children() {
|
let mut kids = Vec::new();
|
||||||
Node::remove(c, node, Suppressed);
|
for kid in node.children() {
|
||||||
|
kids.push(kid.clone());
|
||||||
|
Node::remove(kid, node, Suppressed);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 7: mutation records.
|
// Step 7: mutation records.
|
||||||
// Step 8.
|
// Step 8.
|
||||||
for node in node.children() {
|
for kid in kids.iter() {
|
||||||
do_insert(node, parent, child);
|
do_insert((*kid).clone(), parent, child);
|
||||||
}
|
}
|
||||||
|
|
||||||
for node in node.children() {
|
for kid in kids.into_iter() {
|
||||||
fire_observer_if_necessary(node, suppress_observers);
|
fire_observer_if_necessary(kid, suppress_observers);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue