aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmloptionelement.rs
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2016-10-30 19:27:43 +0100
committerSimon Sapin <simon.sapin@exyr.org>2016-11-03 16:23:05 +0100
commit53b638c0e29ba78448d07695343b7ddfa36c5141 (patch)
tree52647391f6184df815a1d9ce85ad4a84e51f0ffe /components/script/dom/htmloptionelement.rs
parent9fcc9d9d3f59428bf19f950bd79ab257d59e3d16 (diff)
downloadservo-53b638c0e29ba78448d07695343b7ddfa36c5141.tar.gz
servo-53b638c0e29ba78448d07695343b7ddfa36c5141.zip
Update to string-cache 0.3
Diffstat (limited to 'components/script/dom/htmloptionelement.rs')
-rw-r--r--components/script/dom/htmloptionelement.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/components/script/dom/htmloptionelement.rs b/components/script/dom/htmloptionelement.rs
index 1b27a10b311..d1576d532e3 100644
--- a/components/script/dom/htmloptionelement.rs
+++ b/components/script/dom/htmloptionelement.rs
@@ -22,8 +22,8 @@ use dom::htmlselectelement::HTMLSelectElement;
use dom::node::{Node, UnbindContext};
use dom::text::Text;
use dom::virtualmethods::VirtualMethods;
+use html5ever_atoms::LocalName;
use std::cell::Cell;
-use string_cache::Atom;
use style::element_state::*;
use style::str::{split_html_space_chars, str_join};
@@ -39,7 +39,7 @@ pub struct HTMLOptionElement {
}
impl HTMLOptionElement {
- fn new_inherited(local_name: Atom,
+ fn new_inherited(local_name: LocalName,
prefix: Option<DOMString>,
document: &Document) -> HTMLOptionElement {
HTMLOptionElement {
@@ -52,7 +52,7 @@ impl HTMLOptionElement {
}
#[allow(unrooted_must_root)]
- pub fn new(local_name: Atom,
+ pub fn new(local_name: LocalName,
prefix: Option<DOMString>,
document: &Document) -> Root<HTMLOptionElement> {
Node::reflect_node(box HTMLOptionElement::new_inherited(local_name, prefix, document),
@@ -82,7 +82,7 @@ impl HTMLOptionElement {
// FIXME(ajeffrey): Provide a way of buffering DOMStrings other than using Strings
fn collect_text(element: &Element, value: &mut String) {
- let svg_script = *element.namespace() == ns!(svg) && element.local_name() == &atom!("script");
+ let svg_script = *element.namespace() == ns!(svg) && element.local_name() == &local_name!("script");
let html_script = element.is::<HTMLScriptElement>();
if svg_script || html_script {
return;
@@ -133,7 +133,7 @@ impl HTMLOptionElementMethods for HTMLOptionElement {
// https://html.spec.whatwg.org/multipage/#attr-option-value
fn Value(&self) -> DOMString {
let element = self.upcast::<Element>();
- let attr = &atom!("value");
+ let attr = &local_name!("value");
if element.has_attribute(attr) {
element.get_string_attribute(attr)
} else {
@@ -147,7 +147,7 @@ impl HTMLOptionElementMethods for HTMLOptionElement {
// https://html.spec.whatwg.org/multipage/#attr-option-label
fn Label(&self) -> DOMString {
let element = self.upcast::<Element>();
- let attr = &atom!("label");
+ let attr = &local_name!("label");
if element.has_attribute(attr) {
element.get_string_attribute(attr)
} else {
@@ -185,7 +185,7 @@ impl VirtualMethods for HTMLOptionElement {
fn attribute_mutated(&self, attr: &Attr, mutation: AttributeMutation) {
self.super_type().unwrap().attribute_mutated(attr, mutation);
match attr.local_name() {
- &atom!("disabled") => {
+ &local_name!("disabled") => {
let el = self.upcast::<Element>();
match mutation {
AttributeMutation::Set(_) => {
@@ -199,7 +199,7 @@ impl VirtualMethods for HTMLOptionElement {
}
}
},
- &atom!("selected") => {
+ &local_name!("selected") => {
match mutation {
AttributeMutation::Set(_) => {
// https://html.spec.whatwg.org/multipage/#concept-option-selectedness