mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Overrode parse_plain_attribute of VirtualMethods for HTMLMetaElement to pass as an Atom
Imported AttrValue into HTMLMetaElement Updated make_setter! to make_atomic_setter! for in HTMLMetaElement
This commit is contained in:
parent
e3be7184fb
commit
dd93ffec6b
1 changed files with 9 additions and 1 deletions
|
@ -2,6 +2,7 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
use dom::attr::AttrValue;
|
||||||
use dom::bindings::cell::DOMRefCell;
|
use dom::bindings::cell::DOMRefCell;
|
||||||
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding;
|
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding;
|
||||||
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods;
|
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods;
|
||||||
|
@ -90,7 +91,7 @@ impl HTMLMetaElementMethods for HTMLMetaElement {
|
||||||
make_getter!(Name, "name");
|
make_getter!(Name, "name");
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-meta-name
|
// https://html.spec.whatwg.org/multipage/#dom-meta-name
|
||||||
make_setter!(SetName, "name");
|
make_atomic_setter!(SetName, "name");
|
||||||
|
|
||||||
// https://html.spec.whatwg.org/multipage/#dom-meta-content
|
// https://html.spec.whatwg.org/multipage/#dom-meta-content
|
||||||
make_getter!(Content, "content");
|
make_getter!(Content, "content");
|
||||||
|
@ -113,4 +114,11 @@ impl VirtualMethods for HTMLMetaElement {
|
||||||
self.process_attributes();
|
self.process_attributes();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn parse_plain_attribute(&self, name: &Atom, value: DOMString) -> AttrValue {
|
||||||
|
match name {
|
||||||
|
&atom!("name") => AttrValue::from_atomic(value),
|
||||||
|
_ => self.super_type().unwrap().parse_plain_attribute(name, value),
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue