diff options
-rw-r--r-- | components/script/dom/htmltableelement.rs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs index b206f45429b..5d78305883c 100644 --- a/components/script/dom/htmltableelement.rs +++ b/components/script/dom/htmltableelement.rs @@ -2,7 +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::{Attr, AttrHelpers}; +use dom::attr::{Attr, AttrHelpers, AttrValue}; use dom::bindings::codegen::Bindings::HTMLTableElementBinding::HTMLTableElementMethods; use dom::bindings::codegen::Bindings::HTMLTableElementBinding; use dom::bindings::codegen::Bindings::NodeBinding::NodeMethods; @@ -17,8 +17,11 @@ use dom::htmltablecaptionelement::HTMLTableCaptionElement; use dom::node::{Node, NodeHelpers, NodeTypeId}; use dom::virtualmethods::VirtualMethods; -use cssparser::RGBA; use util::str::{self, DOMString, LengthOrPercentageOrAuto}; + +use cssparser::RGBA; +use string_cache::Atom; + use std::cell::Cell; #[dom_struct] @@ -158,5 +161,12 @@ impl<'a> VirtualMethods for JSRef<'a, HTMLTableElement> { _ => () } } + + fn parse_plain_attribute(&self, local_name: &Atom, value: DOMString) -> AttrValue { + match local_name { + &atom!("border") => AttrValue::from_u32(value, 1), + _ => self.super_type().unwrap().parse_plain_attribute(local_name, value), + } + } } |