diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-01-02 09:22:51 -0700 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-01-02 09:22:51 -0700 |
commit | 141b5d038fad3c0c44a6f1b309b8ca9edea54580 (patch) | |
tree | d8f7fbbcba47b42eb2e0cc162605620bbc6f7a23 /components/script/dom/htmlcollection.rs | |
parent | a61417e2a87004e30e2a02f2e6ae58629062e3d5 (diff) | |
parent | 203d1669c8ce98468c7935ead8f0ef4c803dd5a0 (diff) | |
download | servo-141b5d038fad3c0c44a6f1b309b8ca9edea54580.tar.gz servo-141b5d038fad3c0c44a6f1b309b8ca9edea54580.zip |
auto merge of #4526 : servo/servo/deref-1, r=Manishearth
This is a start towards fixing #3868. Not all callers have been fixed yet, so the `Deref` implementation remains for now.
Diffstat (limited to 'components/script/dom/htmlcollection.rs')
-rw-r--r-- | components/script/dom/htmlcollection.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs index af885c0b561..9cbff941c03 100644 --- a/components/script/dom/htmlcollection.rs +++ b/components/script/dom/htmlcollection.rs @@ -181,8 +181,8 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { CollectionTypeId::Static(ref elems) => elems.len() as u32, CollectionTypeId::Live(ref root, ref filter) => { let root = root.root(); - HTMLCollection::traverse(*root) - .filter(|element| filter.filter(*element, *root)) + HTMLCollection::traverse(root.r()) + .filter(|element| filter.filter(*element, root.r())) .count() as u32 } } @@ -197,8 +197,8 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { .map(|elem| Temporary::new(elem.clone())), CollectionTypeId::Live(ref root, ref filter) => { let root = root.root(); - HTMLCollection::traverse(*root) - .filter(|element| filter.filter(*element, *root)) + HTMLCollection::traverse(root.r()) + .filter(|element| filter.filter(*element, root.r())) .nth(index as uint) .clone() .map(Temporary::from_rooted) @@ -218,13 +218,13 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { CollectionTypeId::Static(ref elems) => elems.iter() .map(|elem| elem.root()) .find(|elem| { - elem.get_string_attribute(&atom!("name")) == key || - elem.get_string_attribute(&atom!("id")) == key }) - .map(|maybe_elem| Temporary::from_rooted(*maybe_elem)), + elem.r().get_string_attribute(&atom!("name")) == key || + elem.r().get_string_attribute(&atom!("id")) == key }) + .map(|maybe_elem| Temporary::from_rooted(maybe_elem.r())), CollectionTypeId::Live(ref root, ref filter) => { let root = root.root(); - HTMLCollection::traverse(*root) - .filter(|element| filter.filter(*element, *root)) + HTMLCollection::traverse(root.r()) + .filter(|element| filter.filter(*element, root.r())) .find(|elem| { elem.get_string_attribute(&atom!("name")) == key || elem.get_string_attribute(&atom!("id")) == key }) |