mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Make HTMLImageElement name attribute use an atom
This commit is contained in:
parent
b86672af0c
commit
70e67d5e11
1 changed files with 3 additions and 2 deletions
|
@ -229,9 +229,9 @@ impl<'a> HTMLImageElementMethods for JSRef<'a, HTMLImageElement> {
|
|||
image.is_some()
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/#dom-img-name
|
||||
make_getter!(Name);
|
||||
|
||||
make_setter!(SetName, "name");
|
||||
make_atomic_setter!(SetName, "name");
|
||||
|
||||
make_getter!(Align);
|
||||
|
||||
|
@ -288,6 +288,7 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLImageElement> {
|
|||
|
||||
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
|
||||
match name {
|
||||
&atom!("name") => AttrValue::from_atomic(value),
|
||||
&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