aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-06-28 15:58:57 +0200
committerMs2ger <ms2ger@gmail.com>2015-06-28 15:59:01 +0200
commit0b680dc9bd01eda17d4805ff3ca80e1af843ae6e (patch)
treefb9962193d3205f925b9c0eca3fa4076288d2bd2 /components/script/dom
parent53c04b33f00ac5fc25d7d98dbb2cf0b983ddd3bd (diff)
downloadservo-0b680dc9bd01eda17d4805ff3ca80e1af843ae6e.tar.gz
servo-0b680dc9bd01eda17d4805ff3ca80e1af843ae6e.zip
Fix a bug in Node::pre_insert.
It was accidentally broken in 3ce368fa289bc4c6d09b23357350a37b861013f9.
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/node.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs
index 83244f554b9..35c07308a08 100644
--- a/components/script/dom/node.rs
+++ b/components/script/dom/node.rs
@@ -1626,11 +1626,14 @@ impl Node {
}
// Step 7-8.
+ let reference_child_root;
let reference_child = match child {
- Some(child) if child == node => node.GetNextSibling(),
- _ => None
+ Some(child) if child == node => {
+ reference_child_root = node.GetNextSibling();
+ reference_child_root.r()
+ },
+ _ => child
};
- let reference_child = reference_child.r().or(child);
// Step 9.
let document = document_from_node(parent);