mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +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;
|
||||
};
|
||||
|
|
|
@ -4530,9 +4530,6 @@
|
|||
[HTMLTableElement interface: attribute width]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableElement interface: attribute bgColor]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableElement interface: attribute cellPadding]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -4599,9 +4596,6 @@
|
|||
[HTMLTableElement interface: document.createElement("table") must inherit property "width" with the proper type (21)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableElement interface: document.createElement("table") must inherit property "bgColor" with the proper type (22)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableElement interface: document.createElement("table") must inherit property "cellPadding" with the proper type (23)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -4821,9 +4815,6 @@
|
|||
[HTMLTableRowElement interface: attribute vAlign]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableRowElement interface: attribute bgColor]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableRowElement interface: document.createElement("tr") must inherit property "rowIndex" with the proper type (0)]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -4857,9 +4848,6 @@
|
|||
[HTMLTableRowElement interface: document.createElement("tr") must inherit property "vAlign" with the proper type (8)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableRowElement interface: document.createElement("tr") must inherit property "bgColor" with the proper type (9)]
|
||||
expected: FAIL
|
||||
|
||||
[HTMLTableDataCellElement interface: existence and properties of interface object]
|
||||
expected: FAIL
|
||||
|
||||
|
|
|
@ -1341,135 +1341,6 @@
|
|||
[table.width: IDL set to object "test-valueOf" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: typeof IDL attribute]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL get with DOM attribute unset]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to "" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to undefined followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to 7 followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to 1.5 followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to true followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to false followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to object "[object Object\]" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to NaN followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to Infinity followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to -Infinity followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to "\\0" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to null followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to object "test-toString" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: setAttribute() to object "test-valueOf" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to "" followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to undefined followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to undefined followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to 7 followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to 7 followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to 1.5 followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to 1.5 followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to true followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to true followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to false followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to false followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to object "[object Object\]" followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to object "[object Object\]" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to NaN followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to NaN followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to Infinity followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to Infinity followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to -Infinity followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to -Infinity followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to "\\0" followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to null followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to null followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to object "test-toString" followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to object "test-toString" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.bgColor: IDL set to object "test-valueOf" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[table.cellPadding: typeof IDL attribute]
|
||||
expected: FAIL
|
||||
|
||||
|
@ -10677,135 +10548,6 @@
|
|||
[tr.vAlign: IDL set to object "test-valueOf" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: typeof IDL attribute]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL get with DOM attribute unset]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to "" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to undefined followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to 7 followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to 1.5 followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to true followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to false followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to object "[object Object\]" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to NaN followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to Infinity followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to -Infinity followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to "\\0" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to null followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to object "test-toString" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: setAttribute() to object "test-valueOf" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to "" followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to " \\0\\x01\\x02\\x03\\x04\\x05\\x06\\x07 \\b\\t\\n\\v\\f\\r\\x0e\\x0f \\x10\\x11\\x12\\x13\\x14\\x15\\x16\\x17 \\x18\\x19\\x1a\\x1b\\x1c\\x1d\\x1e\\x1f foo " followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to undefined followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to undefined followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to 7 followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to 7 followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to 1.5 followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to 1.5 followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to true followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to true followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to false followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to false followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to object "[object Object\]" followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to object "[object Object\]" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to NaN followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to NaN followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to Infinity followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to Infinity followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to -Infinity followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to -Infinity followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to "\\0" followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to null followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to null followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to object "test-toString" followed by getAttribute()]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to object "test-toString" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.bgColor: IDL set to object "test-valueOf" followed by IDL get]
|
||||
expected: FAIL
|
||||
|
||||
[tr.itemScope: typeof IDL attribute]
|
||||
expected: FAIL
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue