diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-12-17 10:42:52 +0100 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2014-12-17 15:19:45 -0500 |
commit | 466faac2a507c833b282e274a28f6ae533c628f9 (patch) | |
tree | 0022a66d52deec0081b8b721b56e2f15d7225f8e /components/script/dom/htmlcollection.rs | |
parent | b8900782b0fcb409f37189bdc08eb7f8b3564a5f (diff) | |
download | servo-466faac2a507c833b282e274a28f6ae533c628f9.tar.gz servo-466faac2a507c833b282e274a28f6ae533c628f9.zip |
Update rustc to revision 3dcd2157403163789aaf21a9ab3c4d30a7c6494d.
Diffstat (limited to 'components/script/dom/htmlcollection.rs')
-rw-r--r-- | components/script/dom/htmlcollection.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs index 86f977c843a..647b5ee66af 100644 --- a/components/script/dom/htmlcollection.rs +++ b/components/script/dom/htmlcollection.rs @@ -53,7 +53,7 @@ impl HTMLCollection { impl HTMLCollection { pub fn create(window: JSRef<Window>, root: JSRef<Node>, filter: Box<CollectionFilter+'static>) -> Temporary<HTMLCollection> { - HTMLCollection::new(window, Live(JS::from_rooted(root), filter)) + HTMLCollection::new(window, CollectionTypeId::Live(JS::from_rooted(root), filter)) } fn all_elements(window: JSRef<Window>, root: JSRef<Node>, @@ -178,8 +178,8 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { // http://dom.spec.whatwg.org/#dom-htmlcollection-length fn Length(self) -> u32 { match self.collection { - Static(ref elems) => elems.len() as u32, - Live(ref root, ref filter) => { + 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)) @@ -191,11 +191,11 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { // http://dom.spec.whatwg.org/#dom-htmlcollection-item fn Item(self, index: u32) -> Option<Temporary<Element>> { match self.collection { - Static(ref elems) => elems + CollectionTypeId::Static(ref elems) => elems .as_slice() .get(index as uint) .map(|elem| Temporary::new(elem.clone())), - Live(ref root, ref filter) => { + CollectionTypeId::Live(ref root, ref filter) => { let root = root.root(); HTMLCollection::traverse(*root) .filter(|element| filter.filter(*element, *root)) @@ -215,13 +215,13 @@ impl<'a> HTMLCollectionMethods for JSRef<'a, HTMLCollection> { // Step 2. match self.collection { - Static(ref elems) => elems.iter() + 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)), - Live(ref root, ref filter) => { + CollectionTypeId::Live(ref root, ref filter) => { let root = root.root(); HTMLCollection::traverse(*root) .filter(|element| filter.filter(*element, *root)) |