Imlement 'bgcolor' IDL attrs for table elements

The content attributes and presentational hints were implemented in
the #4289 pull request. This just implements the relevant IDL
attributes.
This commit is contained in:
Corey Farwell 2015-09-26 10:07:34 -04:00
parent d39c8546b6
commit a844b080d6
6 changed files with 17 additions and 273 deletions

View file

@ -127,6 +127,12 @@ impl HTMLTableElementMethods for HTMLTableElement {
reference_element.r()).is_ok());
tbody
}
// https://html.spec.whatwg.org/multipage/#dom-table-bgcolor
make_getter!(BgColor);
// https://html.spec.whatwg.org/multipage/#dom-table-bgcolor
make_setter!(SetBgColor, "bgcolor");
}

View file

@ -4,7 +4,7 @@
use cssparser::RGBA;
use dom::attr::Attr;
use dom::bindings::codegen::Bindings::HTMLTableRowElementBinding;
use dom::bindings::codegen::Bindings::HTMLTableRowElementBinding::{self, HTMLTableRowElementMethods};
use dom::bindings::codegen::InheritTypes::{HTMLElementCast, HTMLTableRowElementDerived};
use dom::bindings::js::Root;
use dom::document::Document;
@ -55,6 +55,14 @@ impl HTMLTableRowElement {
}
}
impl HTMLTableRowElementMethods for HTMLTableRowElement {
// https://html.spec.whatwg.org/multipage/#dom-tr-bgcolor
make_getter!(BgColor);
// https://html.spec.whatwg.org/multipage/#dom-tr-bgcolor
make_setter!(SetBgColor, "bgcolor");
}
impl VirtualMethods for HTMLTableRowElement {
fn super_type<'b>(&'b self) -> Option<&'b VirtualMethods> {
let htmlelement: &HTMLElement = HTMLElementCast::from_ref(self);

View file

@ -34,7 +34,7 @@ partial interface HTMLTableElement {
// attribute DOMString summary;
// attribute DOMString width;
//[TreatNullAs=EmptyString] attribute DOMString bgColor;
[TreatNullAs=EmptyString] attribute DOMString bgColor;
//[TreatNullAs=EmptyString] attribute DOMString cellPadding;
//[TreatNullAs=EmptyString] attribute DOMString cellSpacing;
};

View file

@ -21,5 +21,5 @@ partial interface HTMLTableRowElement {
// attribute DOMString chOff;
// attribute DOMString vAlign;
//[TreatNullAs=EmptyString] attribute DOMString bgColor;
[TreatNullAs=EmptyString] attribute DOMString bgColor;
};