mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Pass an Atom to VirtualMethods::parse_plain_attribute.
This commit is contained in:
parent
f7407ee43d
commit
214c356ecd
3 changed files with 10 additions and 7 deletions
|
@ -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),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue