mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Implement From<DOMString> for Atom
This commit is contained in:
parent
f7fb035188
commit
0adfb08089
20 changed files with 44 additions and 38 deletions
|
@ -115,9 +115,9 @@ impl HTMLCollection {
|
|||
|
||||
pub fn by_tag_name(window: &Window, root: &Node, mut tag: DOMString)
|
||||
-> Root<HTMLCollection> {
|
||||
let tag_atom = Atom::from(&*tag); // FIXME(ajeffrey): Convert directly from DOMString to Atom
|
||||
let tag_atom = Atom::from(&*tag);
|
||||
tag.make_ascii_lowercase();
|
||||
let ascii_lower_tag = Atom::from(&*tag); // FIXME(ajeffrey): Convert directly from DOMString to Atom
|
||||
let ascii_lower_tag = Atom::from(tag); // FIXME(ajeffrey): don't clone atom if it was already lowercased.
|
||||
HTMLCollection::by_atomic_tag_name(window, root, tag_atom, ascii_lower_tag)
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,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(&*tag); // FIXME(ajeffrey): Convert directly from DOMString to Atom
|
||||
let local = Atom::from(tag);
|
||||
let ns = namespace_from_domstring(maybe_ns);
|
||||
let qname = QualName::new(ns, local);
|
||||
HTMLCollection::by_qual_tag_name(window, root, qname)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue