diff options
author | Keith Yeung <kungfukeith11@gmail.com> | 2015-03-03 11:39:37 +0800 |
---|---|---|
committer | Keith Yeung <kungfukeith11@gmail.com> | 2015-03-03 11:46:13 +0800 |
commit | a07a0cf39f1417754327247f7f9aa6c4daf72070 (patch) | |
tree | e77a958b11afb39a566fc0c204ebada782df929c /components/script/dom/node.rs | |
parent | 801b939479f359777c6ee68cd634da0f7c73984b (diff) | |
download | servo-a07a0cf39f1417754327247f7f9aa6c4daf72070.tar.gz servo-a07a0cf39f1417754327247f7f9aa6c4daf72070.zip |
Added type parameter to PartialEq on JSRef (fixes #5112, #3960)
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 a7b5e5484d6..f04420728e8 100644 --- a/components/script/dom/node.rs +++ b/components/script/dom/node.rs @@ -409,7 +409,7 @@ pub trait NodeHelpers<'a> { fn child_elements(self) -> ChildElementIterator<'a>; fn following_siblings(self) -> NodeChildrenIterator<'a>; fn is_in_doc(self) -> bool; - fn is_inclusive_ancestor_of(self, parent: JSRef<'a, Node>) -> bool; // FIXME: See #3960 + fn is_inclusive_ancestor_of(self, parent: JSRef<Node>) -> bool; fn is_parent_of(self, child: JSRef<Node>) -> bool; fn type_id(self) -> NodeTypeId; @@ -715,7 +715,7 @@ impl<'a> NodeHelpers<'a> for JSRef<'a, Node> { } } - fn is_inclusive_ancestor_of(self, parent: JSRef<'a, Node>) -> bool { + fn is_inclusive_ancestor_of(self, parent: JSRef<Node>) -> bool { self == parent || parent.ancestors().any(|ancestor| ancestor == self) } @@ -1376,7 +1376,7 @@ impl Node { // Step 7-8. let reference_child = match child { - Some(child) if child.clone() == node => node.next_sibling().map(|node| node.root().get_unsound_ref_forever()), + Some(child) if child == node => node.next_sibling().map(|node| node.root().get_unsound_ref_forever()), _ => child }; @@ -1946,7 +1946,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> { } // Ok if not caught by previous error checks. - if node.clone() == child { + if node == child { return Ok(Temporary::from_rooted(child)); } @@ -2106,7 +2106,7 @@ impl<'a> NodeMethods for JSRef<'a, Node> { // http://dom.spec.whatwg.org/#dom-node-comparedocumentposition fn CompareDocumentPosition(self, other: JSRef<Node>) -> u16 { - if self.clone() == other { // FIXME: See issue #3960 + if self == other { // step 2. 0 } else { |