diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-26 00:10:39 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2015-11-26 00:10:39 +0530 |
commit | 188fa9378c103093f1f8dac24bff0d9d237fd2bc (patch) | |
tree | 9ef42584eb3b543904524248ad11c1dff84082a5 /components/script/dom/htmlcollection.rs | |
parent | e7b19249489eff7a7fd49bf458ee7bd681f8ad13 (diff) | |
parent | 3dec6edd10ec800de50a04c105a75fb98e0411ca (diff) | |
download | servo-188fa9378c103093f1f8dac24bff0d9d237fd2bc.tar.gz servo-188fa9378c103093f1f8dac24bff0d9d237fd2bc.zip |
Auto merge of #8667 - asajeffrey:update-string-cache, r=SimonSapin
Update string cache
Updated string_cache to 0.2, and updated the dependencies that depend on string_cache.
Removed references to string_cache_plugin.
Import atom! and ns! from string_cache.
Replaced ns!("") by ns!().
Replaced ns!(XML) and co by ns!(xml) and co.
Replaced Atom::from_slice by Atom::from.
Replaced atom.as_slice() by &*atom.
r? @SimonSapin
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8667)
<!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/htmlcollection.rs')
-rw-r--r-- | components/script/dom/htmlcollection.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/components/script/dom/htmlcollection.rs b/components/script/dom/htmlcollection.rs index b645449dcc1..9eb375dc89b 100644 --- a/components/script/dom/htmlcollection.rs +++ b/components/script/dom/htmlcollection.rs @@ -161,9 +161,9 @@ impl HTMLCollection { pub fn by_tag_name(window: &Window, root: &Node, mut tag: DOMString) -> Root<HTMLCollection> { - let tag_atom = Atom::from_slice(&tag); + let tag_atom = Atom::from(&*tag); // FIXME(ajeffrey): Convert directly from DOMString to Atom tag.make_ascii_lowercase(); - let ascii_lower_tag = Atom::from_slice(&tag); + let ascii_lower_tag = Atom::from(&*tag); // FIXME(ajeffrey): Convert directly from DOMString to Atom HTMLCollection::by_atomic_tag_name(window, root, tag_atom, ascii_lower_tag) } @@ -194,7 +194,7 @@ impl HTMLCollection { pub fn by_tag_name_ns(window: &Window, root: &Node, tag: DOMString, maybe_ns: Option<DOMString>) -> Root<HTMLCollection> { - let local = Atom::from_slice(&tag); + let local = Atom::from(&*tag); // FIXME(ajeffrey): Convert directly from DOMString to Atom let ns = namespace_from_domstring(maybe_ns); let qname = QualName::new(ns, local); HTMLCollection::by_qual_tag_name(window, root, qname) @@ -219,7 +219,7 @@ impl HTMLCollection { pub fn by_class_name(window: &Window, root: &Node, classes: DOMString) -> Root<HTMLCollection> { - let class_atoms = split_html_space_chars(&classes).map(Atom::from_slice).collect(); + let class_atoms = split_html_space_chars(&classes).map(Atom::from).collect(); HTMLCollection::by_atomic_class_name(window, root, class_atoms) } @@ -370,7 +370,7 @@ impl HTMLCollectionMethods for HTMLCollection { } // Step 2.2 let name_attr = elem.get_string_attribute(&atom!("name")); - if !name_attr.is_empty() && !result.contains(&name_attr) && *elem.namespace() == ns!(HTML) { + if !name_attr.is_empty() && !result.contains(&name_attr) && *elem.namespace() == ns!(html) { result.push(name_attr) } } |