diff options
author | Patrick Walton <pcwalton@mimiga.net> | 2014-09-12 13:28:37 -0700 |
---|---|---|
committer | Patrick Walton <pcwalton@mimiga.net> | 2014-10-14 10:32:40 -0700 |
commit | ee2ccc4f872ba33a86057d87a99d1015b3c41cf1 (patch) | |
tree | 3a7ef263aa401fb3a36e9d48ff5bc8a384ab1f65 /components/script/dom/htmlbuttonelement.rs | |
parent | d1685015559562a42cc440f4e3b7a97d38cc642c (diff) | |
download | servo-ee2ccc4f872ba33a86057d87a99d1015b3c41cf1.tar.gz servo-ee2ccc4f872ba33a86057d87a99d1015b3c41cf1.zip |
script: Use atom comparison in more places, especially for attributes.
75% improvement in style recalc for Guardians of the Galaxy.
Diffstat (limited to 'components/script/dom/htmlbuttonelement.rs')
-rw-r--r-- | components/script/dom/htmlbuttonelement.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/htmlbuttonelement.rs b/components/script/dom/htmlbuttonelement.rs index af4dec6dcb3..ec2377297f3 100644 --- a/components/script/dom/htmlbuttonelement.rs +++ b/components/script/dom/htmlbuttonelement.rs @@ -62,7 +62,7 @@ impl<'a> HTMLButtonElementMethods for JSRef<'a, HTMLButtonElement> { // https://html.spec.whatwg.org/multipage/forms.html#dom-button-type fn Type(self) -> DOMString { let elem: JSRef<Element> = ElementCast::from_ref(self); - let ty = elem.get_string_attribute("type").into_ascii_lower(); + let ty = elem.get_string_attribute(&atom!("type")).into_ascii_lower(); // https://html.spec.whatwg.org/multipage/forms.html#attr-button-type match ty.as_slice() { "reset" | "button" | "menu" => ty, |