servo: Merge #7747 - Imlement 'bgcolor' IDL attrs for table elements (from frewsxcv:bgcolor); r=Ms2ger

The content attributes and presentational hints were implemented in
the #4289 pull request. This just implements the relevant IDL
attributes.

Source-Repo: https://github.com/servo/servo
Source-Revision: 500d5098655032465bdca5c6167f681078df0fc3
This commit is contained in:
Corey Farwell
2015-09-26 10:02:43 -06:00
parent 4e0969aef7
commit c1503b7981
4 changed files with 17 additions and 3 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);