aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/htmltablecellelement.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/htmltablecellelement.rs
parent9fcc9d9d3f59428bf19f950bd79ab257d59e3d16 (diff)
downloadservo-53b638c0e29ba78448d07695343b7ddfa36c5141.tar.gz
servo-53b638c0e29ba78448d07695343b7ddfa36c5141.zip
Update to string-cache 0.3
Diffstat (limited to 'components/script/dom/htmltablecellelement.rs')
-rw-r--r--components/script/dom/htmltablecellelement.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/components/script/dom/htmltablecellelement.rs b/components/script/dom/htmltablecellelement.rs
index 5c30132b7f9..1ec389d9977 100644
--- a/components/script/dom/htmltablecellelement.rs
+++ b/components/script/dom/htmltablecellelement.rs
@@ -14,7 +14,7 @@ use dom::htmlelement::HTMLElement;
use dom::htmltablerowelement::HTMLTableRowElement;
use dom::node::Node;
use dom::virtualmethods::VirtualMethods;
-use string_cache::Atom;
+use html5ever_atoms::LocalName;
use style::attr::{AttrValue, LengthOrPercentageOrAuto};
const DEFAULT_COLSPAN: u32 = 1;
@@ -25,7 +25,7 @@ pub struct HTMLTableCellElement {
}
impl HTMLTableCellElement {
- pub fn new_inherited(tag_name: Atom,
+ pub fn new_inherited(tag_name: LocalName,
prefix: Option<DOMString>,
document: &Document)
-> HTMLTableCellElement {
@@ -88,7 +88,7 @@ impl HTMLTableCellElementLayoutHelpers for LayoutJS<HTMLTableCellElement> {
fn get_background_color(&self) -> Option<RGBA> {
unsafe {
(&*self.upcast::<Element>().unsafe_get())
- .get_attr_for_layout(&ns!(), &atom!("bgcolor"))
+ .get_attr_for_layout(&ns!(), &local_name!("bgcolor"))
.and_then(AttrValue::as_color)
.cloned()
}
@@ -97,7 +97,7 @@ impl HTMLTableCellElementLayoutHelpers for LayoutJS<HTMLTableCellElement> {
fn get_colspan(&self) -> Option<u32> {
unsafe {
(&*self.upcast::<Element>().unsafe_get())
- .get_attr_for_layout(&ns!(), &atom!("colspan"))
+ .get_attr_for_layout(&ns!(), &local_name!("colspan"))
.map(AttrValue::as_uint)
}
}
@@ -105,7 +105,7 @@ impl HTMLTableCellElementLayoutHelpers for LayoutJS<HTMLTableCellElement> {
fn get_width(&self) -> LengthOrPercentageOrAuto {
unsafe {
(&*self.upcast::<Element>().unsafe_get())
- .get_attr_for_layout(&ns!(), &atom!("width"))
+ .get_attr_for_layout(&ns!(), &local_name!("width"))
.map(AttrValue::as_dimension)
.cloned()
.unwrap_or(LengthOrPercentageOrAuto::Auto)
@@ -118,11 +118,11 @@ impl VirtualMethods for HTMLTableCellElement {
Some(self.upcast::<HTMLElement>() as &VirtualMethods)
}
- fn parse_plain_attribute(&self, local_name: &Atom, value: DOMString) -> AttrValue {
+ fn parse_plain_attribute(&self, local_name: &LocalName, value: DOMString) -> AttrValue {
match *local_name {
- atom!("colspan") => AttrValue::from_u32(value.into(), DEFAULT_COLSPAN),
- atom!("bgcolor") => AttrValue::from_legacy_color(value.into()),
- atom!("width") => AttrValue::from_nonzero_dimension(value.into()),
+ local_name!("colspan") => AttrValue::from_u32(value.into(), DEFAULT_COLSPAN),
+ local_name!("bgcolor") => AttrValue::from_legacy_color(value.into()),
+ local_name!("width") => AttrValue::from_nonzero_dimension(value.into()),
_ => self.super_type().unwrap().parse_plain_attribute(local_name, value),
}
}