mirror of
https://github.com/servo/servo.git
synced 2025-06-20 15:18:58 +01:00
auto merge of #1501 : Ms2ger/servo/add_child, r=jdm
This commit is contained in:
commit
89bb1194c1
1 changed files with 2 additions and 2 deletions
|
@ -575,8 +575,6 @@ impl AbstractNode {
|
|||
let before_node = before.mut_node();
|
||||
// XXX Should assert that parent is self.
|
||||
assert!(before_node.parent_node.is_some());
|
||||
before_node.set_prev_sibling(Some(new_child.clone()));
|
||||
new_child_node.set_next_sibling(Some(before.clone()));
|
||||
match before_node.prev_sibling {
|
||||
None => {
|
||||
// XXX Should assert that before is the first child of
|
||||
|
@ -589,6 +587,8 @@ impl AbstractNode {
|
|||
new_child_node.set_prev_sibling(Some(prev_sibling.clone()));
|
||||
},
|
||||
}
|
||||
before_node.set_prev_sibling(Some(new_child.clone()));
|
||||
new_child_node.set_next_sibling(Some(before.clone()));
|
||||
},
|
||||
None => {
|
||||
match this_node.last_child {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue