diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2016-10-30 19:27:43 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2016-11-03 16:23:05 +0100 |
commit | 53b638c0e29ba78448d07695343b7ddfa36c5141 (patch) | |
tree | 52647391f6184df815a1d9ce85ad4a84e51f0ffe /components/script/dom/htmltablerowelement.rs | |
parent | 9fcc9d9d3f59428bf19f950bd79ab257d59e3d16 (diff) | |
download | servo-53b638c0e29ba78448d07695343b7ddfa36c5141.tar.gz servo-53b638c0e29ba78448d07695343b7ddfa36c5141.zip |
Update to string-cache 0.3
Diffstat (limited to 'components/script/dom/htmltablerowelement.rs')
-rw-r--r-- | components/script/dom/htmltablerowelement.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs index 7a7273c3597..b95aba1c3e0 100644 --- a/components/script/dom/htmltablerowelement.rs +++ b/components/script/dom/htmltablerowelement.rs @@ -21,7 +21,7 @@ use dom::htmltableheadercellelement::HTMLTableHeaderCellElement; use dom::htmltablesectionelement::HTMLTableSectionElement; use dom::node::{Node, window_from_node}; use dom::virtualmethods::VirtualMethods; -use string_cache::Atom; +use html5ever_atoms::LocalName; use style::attr::AttrValue; #[derive(JSTraceable)] @@ -40,7 +40,7 @@ pub struct HTMLTableRowElement { } impl HTMLTableRowElement { - fn new_inherited(local_name: Atom, prefix: Option<DOMString>, document: &Document) + fn new_inherited(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> HTMLTableRowElement { HTMLTableRowElement { htmlelement: HTMLElement::new_inherited(local_name, prefix, document), @@ -49,7 +49,7 @@ impl HTMLTableRowElement { } #[allow(unrooted_must_root)] - pub fn new(local_name: Atom, prefix: Option<DOMString>, document: &Document) + pub fn new(local_name: LocalName, prefix: Option<DOMString>, document: &Document) -> Root<HTMLTableRowElement> { Node::reflect_node(box HTMLTableRowElement::new_inherited(local_name, prefix, document), document, @@ -87,7 +87,7 @@ impl HTMLTableRowElementMethods for HTMLTableRowElement { node.insert_cell_or_row( index, || self.Cells(), - || HTMLTableDataCellElement::new(atom!("td"), None, &node.owner_doc())) + || HTMLTableDataCellElement::new(local_name!("td"), None, &node.owner_doc())) } // https://html.spec.whatwg.org/multipage/#dom-tr-deletecell @@ -145,7 +145,7 @@ impl HTMLTableRowElementLayoutHelpers for LayoutJS<HTMLTableRowElement> { 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() } @@ -157,9 +157,9 @@ impl VirtualMethods for HTMLTableRowElement { 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!("bgcolor") => AttrValue::from_legacy_color(value.into()), + local_name!("bgcolor") => AttrValue::from_legacy_color(value.into()), _ => self.super_type().unwrap().parse_plain_attribute(local_name, value), } } |