mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
parent
d39c8546b6
commit
a844b080d6
6 changed files with 17 additions and 273 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -21,5 +21,5 @@ partial interface HTMLTableRowElement {
|
|||
// attribute DOMString chOff;
|
||||
// attribute DOMString vAlign;
|
||||
|
||||
//[TreatNullAs=EmptyString] attribute DOMString bgColor;
|
||||
[TreatNullAs=EmptyString] attribute DOMString bgColor;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue