aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlcollection.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-01-01 12:20:52 +0100
committerMs2ger <ms2ger@gmail.com>2015-01-01 20:36:43 +0100
commit1dad710063e601d3560b0cf89c602d16a0a48657 (patch)
tree400c86753feef6e0949cb2fabd5a1ee84f5812f3 /components/script/dom/htmlcollection.rs
parentc9f26dfd599bd50deac9e120bd54c9dbdfe40ae0 (diff)
downloadservo-1dad710063e601d3560b0cf89c602d16a0a48657.tar.gz
servo-1dad710063e601d3560b0cf89c602d16a0a48657.zip
Replace Root::deref() calls by Root::r() calls where possible.
This changes those calls that were already sound.
Diffstat (limited to 'components/script/dom/htmlcollection.rs')
-rw-r--r--components/script/dom/htmlcollection.rs18
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 })