diff options
author | Ms2ger <ms2ger@gmail.com> | 2014-11-05 13:43:29 +0100 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2014-11-05 16:19:11 +0100 |
commit | 214c356ecd20437a78b10cd4d04496c371037b71 (patch) | |
tree | 7a0899a338525f3ae8fc50e02ca18fdbfb07eb7f /components/script/dom/element.rs | |
parent | f7407ee43d314219c63615f5e81bb8eeb1781807 (diff) | |
download | servo-214c356ecd20437a78b10cd4d04496c371037b71.tar.gz servo-214c356ecd20437a78b10cd4d04496c371037b71.zip |
Pass an Atom to VirtualMethods::parse_plain_attribute.
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r-- | components/script/dom/element.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index a81c515aef8..ca1ac321b57 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -509,7 +509,7 @@ impl<'a> AttributeHandlers for JSRef<'a, Element> { value: DOMString) -> AttrValue { if *namespace == ns!("") { vtable_for(&NodeCast::from_ref(self)) - .parse_plain_attribute(local_name.as_slice(), value) + .parse_plain_attribute(local_name, value) } else { StringAttrValue(value) } @@ -1037,10 +1037,10 @@ impl<'a> VirtualMethods for JSRef<'a, Element> { self.notify_content_changed(); } - fn parse_plain_attribute(&self, name: &str, value: DOMString) -> AttrValue { + fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue { match name { - "id" => AttrValue::from_atomic(value), - "class" => AttrValue::from_tokenlist(value), + &atom!("id") => AttrValue::from_atomic(value), + &atom!("class") => AttrValue::from_tokenlist(value), _ => self.super_type().unwrap().parse_plain_attribute(name, value), } } |