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

@ -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);