mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +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
|
@ -195,9 +195,10 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLImageElement> {
|
|||
}
|
||||
}
|
||||
|
||||
fn parse_plain_attribute(&self, name: &str, value: DOMString) -> AttrValue {
|
||||
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
|
||||
match name {
|
||||
"width" | "height" | "hspace" | "vspace" => AttrValue::from_u32(value, 0),
|
||||
&atom!("width") | &atom!("height") |
|
||||
&atom!("hspace") | &atom!("vspace") => AttrValue::from_u32(value, 0),
|
||||
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue