auto merge of #3897 : Ms2ger/servo/enable-reflection, r=Manishearth

This commit is contained in:
bors-servo 2014-11-05 11:12:40 -07:00
commit fba6cb9c42
5 changed files with 26915 additions and 13 deletions

View file

@ -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)
}
@ -1028,10 +1028,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),
}
}