diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2015-07-22 18:28:02 +0530 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2015-07-22 18:34:54 +0530 |
commit | a9f651cfa1db2fad8a7851a5bf2bca4dc793a3a8 (patch) | |
tree | 2c8fa9f69c8a092c1029a6afab9142395b701766 /components/script/dom/node.rs | |
parent | 521d8bc32e25ee31a0ccc9de77720207b69ac358 (diff) | |
download | servo-a9f651cfa1db2fad8a7851a5bf2bca4dc793a3a8.tar.gz servo-a9f651cfa1db2fad8a7851a5bf2bca4dc793a3a8.zip |
Address review comments; add docs
Diffstat (limited to 'components/script/dom/node.rs')
-rw-r--r-- | components/script/dom/node.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/node.rs b/components/script/dom/node.rs index cdcc0b844af..e6290861c73 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -328,7 +328,7 @@ impl<'a> PrivateNodeHelpers for &'a Node { match before { Some(ref before) => { assert!(before.parent_node.get().map(Root::from_rooted).r() == Some(self)); - let prev_sibling = before.prev_sibling.get_rooted(); + let prev_sibling = before.GetPreviousSibling(); match prev_sibling { None => { assert!(Some(*before) == self.first_child.get().map(Root::from_rooted).r()); @@ -343,7 +343,7 @@ impl<'a> PrivateNodeHelpers for &'a Node { new_child.next_sibling.set(Some(JS::from_ref(before))); }, None => { - let last_child = self.last_child.get_rooted(); + let last_child = self.GetLastChild(); match last_child { None => self.first_child.set(Some(JS::from_ref(new_child))), Some(ref last_child) => { @@ -365,7 +365,7 @@ impl<'a> PrivateNodeHelpers for &'a Node { /// Fails unless `child` is a child of this node. fn remove_child(self, child: &Node) { assert!(child.parent_node.get().map(Root::from_rooted).r() == Some(self)); - let prev_sibling = child.prev_sibling.get_rooted(); + let prev_sibling = child.GetPreviousSibling(); match prev_sibling { None => { self.first_child.set(child.next_sibling.get()); @@ -374,7 +374,7 @@ impl<'a> PrivateNodeHelpers for &'a Node { prev_sibling.next_sibling.set(child.next_sibling.get()); } } - let next_sibling = child.next_sibling.get_rooted(); + let next_sibling = child.GetNextSibling(); match next_sibling { None => { self.last_child.set(child.prev_sibling.get()); @@ -1476,7 +1476,7 @@ impl Node { // https://dom.spec.whatwg.org/#concept-node-adopt pub fn adopt(node: &Node, document: &Document) { // Step 1. - let parent_node = node.parent_node.get_rooted(); + let parent_node = node.GetParentNode(); match parent_node { Some(ref parent) => { Node::remove(node, parent, SuppressObserver::Unsuppressed); |