diff options
-rw-r--r-- | components/script/dom/htmltableelement.rs | 6 | ||||
-rw-r--r-- | components/script/dom/htmltablerowelement.rs | 10 | ||||
-rw-r--r-- | components/script/dom/webidls/HTMLTableElement.webidl | 2 | ||||
-rw-r--r-- | components/script/dom/webidls/HTMLTableRowElement.webidl | 2 | ||||
-rw-r--r-- | tests/wpt/metadata/html/dom/interfaces.html.ini | 12 | ||||
-rw-r--r-- | tests/wpt/metadata/html/dom/reflection-tabular.html.ini | 258 |
6 files changed, 17 insertions, 273 deletions
diff --git a/components/script/dom/htmltableelement.rs b/components/script/dom/htmltableelement.rs index 6a63223d09d..1308aff4a44 100644 --- a/components/script/dom/htmltableelement.rs +++ b/components/script/dom/htmltableelement.rs @@ -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"); } diff --git a/components/script/dom/htmltablerowelement.rs b/components/script/dom/htmltablerowelement.rs index 5c03a8e045b..88096980bcf 100644 --- a/components/script/dom/htmltablerowelement.rs +++ b/components/script/dom/htmltablerowelement.rs @@ -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); diff --git a/components/script/dom/webidls/HTMLTableElement.webidl b/components/script/dom/webidls/HTMLTableElement.webidl index 3a614efce1f..546d146bc15 100644 --- a/components/script/dom/webidls/HTMLTableElement.webidl +++ b/components/script/dom/webidls/HTMLTableElement.webidl @@ -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; }; diff --git a/components/script/dom/webidls/HTMLTableRowElement.webidl b/components/script/dom/webidls/HTMLTableRowElement.webidl index 77475ce1630..e5c2183b103 100644 --- a/components/script/dom/webidls/HTMLTableRowElement.webidl +++ b/components/script/dom/webidls/HTMLTableRowElement.webidl @@ -21,5 +21,5 @@ partial interface HTMLTableRowElement { // attribute DOMString chOff; // attribute DOMString vAlign; - //[TreatNullAs=EmptyString] attribute DOMString bgColor; + [TreatNullAs=EmptyString] attribute DOMString bgColor; }; diff --git a/tests/wpt/metadata/html/dom/interfaces.html.ini b/tests/wpt/metadata/html/dom/interfaces.html.ini index f4b6a1162fc..22905a21630 100644 --- a/tests/wpt/metadata/html/dom/interfaces.html.ini +++ b/tests/wpt/metadata/html/dom/interfaces.html.ini @@ -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 diff --git a/tests/wpt/metadata/html/dom/reflection-tabular.html.ini b/tests/wpt/metadata/html/dom/reflection-tabular.html.ini index 5b5631272d1..351a0fc5e29 100644 --- a/tests/wpt/metadata/html/dom/reflection-tabular.html.ini +++ b/tests/wpt/metadata/html/dom/reflection-tabular.html.ini @@ -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 |