diff options
author | Ms2ger <ms2ger@gmail.com> | 2015-05-09 19:52:05 +0200 |
---|---|---|
committer | Ms2ger <ms2ger@gmail.com> | 2015-05-12 12:08:18 +0200 |
commit | 9951e0b4d6fa22ed34a698d800fa9ca24e8a9681 (patch) | |
tree | f2b6613dffd5c8308843b593880420189893e732 /components/script/dom/htmltableelement.rs | |
parent | ca9c703bf5e7b6664ab956e15c7f53534f0f32cd (diff) | |
download | servo-9951e0b4d6fa22ed34a698d800fa9ca24e8a9681.tar.gz servo-9951e0b4d6fa22ed34a698d800fa9ca24e8a9681.zip |
Parse table border.
Diffstat (limited to 'components/script/dom/htmltableelement.rs')
-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), + } + } } |