Parse table border.

This commit is contained in:
Ms2ger 2015-05-09 19:52:05 +02:00
parent ca9c703bf5
commit 9951e0b4d6

View file

@ -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),
}
}
}