aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmlmetaelement.rs
diff options
context:
space:
mode:
authorJoseph P DeBartola III <josephdebartola@gmail.com>2016-05-18 15:52:04 -0500
committerJoseph P DeBartola III <josephdebartola@gmail.com>2016-05-18 19:40:04 -0500
commitdd93ffec6b8739689abec8a5d45112808f76fdc5 (patch)
tree76c753e8233d8174dfd47bd16ada74d60ba3fa2d /components/script/dom/htmlmetaelement.rs
parente3be7184fb79d9d0b7b2a491769a58c59a990460 (diff)
downloadservo-dd93ffec6b8739689abec8a5d45112808f76fdc5.tar.gz
servo-dd93ffec6b8739689abec8a5d45112808f76fdc5.zip
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
Diffstat (limited to 'components/script/dom/htmlmetaelement.rs')
-rw-r--r--components/script/dom/htmlmetaelement.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/components/script/dom/htmlmetaelement.rs b/components/script/dom/htmlmetaelement.rs
index 73cc5c73aa0..88e5af9bfc1 100644
--- a/components/script/dom/htmlmetaelement.rs
+++ b/components/script/dom/htmlmetaelement.rs
@@ -2,6 +2,7 @@
* 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/. */
+use dom::attr::AttrValue;
use dom::bindings::cell::DOMRefCell;
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding;
use dom::bindings::codegen::Bindings::HTMLMetaElementBinding::HTMLMetaElementMethods;
@@ -90,7 +91,7 @@ impl HTMLMetaElementMethods for HTMLMetaElement {
make_getter!(Name, "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
make_getter!(Content, "content");
@@ -113,4 +114,11 @@ impl VirtualMethods for HTMLMetaElement {
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),
+ }
+ }
}