- Revision
- 203529
- Author
- [email protected]
- Date
- 2016-07-21 14:25:10 -0700 (Thu, 21 Jul 2016)
Log Message
Fix null handling for several HTMLTableElement attributes
https://bugs.webkit.org/show_bug.cgi?id=160041
Reviewed by Ryosuke Niwa.
LayoutTests/imported/w3c:
Rebaseline W3C test now that more checks are passing.
* web-platform-tests/html/dom/reflection-tabular-expected.txt:
Source/WebCore:
Fix null handling for several HTMLTableElement attributes to match the
specification:
- https://html.spec.whatwg.org/#HTMLTableElement-partial
The attributes in question are 'bicolor', 'cellSpacing' and
'cellPadding'. We are supposed to treat null as the empty string for
these attributes.
Firefox and Chrome both agree with the specification.
No new tests, rebaselined existing tests.
* html/HTMLTableElement.idl:
LayoutTests:
Update existing test to reflect the behavior change.
* fast/dom/element-attribute-js-null-expected.txt:
* fast/dom/element-attribute-js-null.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (203528 => 203529)
--- trunk/LayoutTests/ChangeLog 2016-07-21 21:23:28 UTC (rev 203528)
+++ trunk/LayoutTests/ChangeLog 2016-07-21 21:25:10 UTC (rev 203529)
@@ -1,5 +1,17 @@
2016-07-21 Chris Dumez <[email protected]>
+ Fix null handling for several HTMLTableElement attributes
+ https://bugs.webkit.org/show_bug.cgi?id=160041
+
+ Reviewed by Ryosuke Niwa.
+
+ Update existing test to reflect the behavior change.
+
+ * fast/dom/element-attribute-js-null-expected.txt:
+ * fast/dom/element-attribute-js-null.html:
+
+2016-07-21 Chris Dumez <[email protected]>
+
Fix null handling for HTMLObjectElement.border
https://bugs.webkit.org/show_bug.cgi?id=160040
Modified: trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt (203528 => 203529)
--- trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt 2016-07-21 21:23:28 UTC (rev 203528)
+++ trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt 2016-07-21 21:25:10 UTC (rev 203529)
@@ -206,10 +206,10 @@
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableColElement.width]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableElement.align]
-TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableElement.bgColor]
+TEST SUCCEEDED: The value was the empty string. [tested HTMLTableElement.bgColor]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableElement.border]
-TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableElement.cellPadding]
-TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableElement.cellSpacing]
+TEST SUCCEEDED: The value was the empty string. [tested HTMLTableElement.cellPadding]
+TEST SUCCEEDED: The value was the empty string. [tested HTMLTableElement.cellSpacing]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableElement.frame]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableElement.rules]
TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableElement.summary]
Modified: trunk/LayoutTests/fast/dom/element-attribute-js-null.html (203528 => 203529)
--- trunk/LayoutTests/fast/dom/element-attribute-js-null.html 2016-07-21 21:23:28 UTC (rev 203528)
+++ trunk/LayoutTests/fast/dom/element-attribute-js-null.html 2016-07-21 21:25:10 UTC (rev 203529)
@@ -511,10 +511,10 @@
elementToUse: document.createElement('table'),
attributes: [
{name: 'align', expectedNull: 'null'},
- {name: 'bgColor', expectedNull: 'null'},
+ {name: 'bgColor', expectedNull: ''},
{name: 'border', expectedNull: 'null'},
- {name: 'cellPadding', expectedNull: 'null'},
- {name: 'cellSpacing', expectedNull: 'null'},
+ {name: 'cellPadding', expectedNull: ''},
+ {name: 'cellSpacing', expectedNull: ''},
{name: 'frame', expectedNull: 'null'},
{name: 'rules', expectedNull: 'null'},
{name: 'summary', expectedNull: 'null'},
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203528 => 203529)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2016-07-21 21:23:28 UTC (rev 203528)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2016-07-21 21:25:10 UTC (rev 203529)
@@ -1,5 +1,16 @@
2016-07-21 Chris Dumez <[email protected]>
+ Fix null handling for several HTMLTableElement attributes
+ https://bugs.webkit.org/show_bug.cgi?id=160041
+
+ Reviewed by Ryosuke Niwa.
+
+ Rebaseline W3C test now that more checks are passing.
+
+ * web-platform-tests/html/dom/reflection-tabular-expected.txt:
+
+2016-07-21 Chris Dumez <[email protected]>
+
Fix null handling for HTMLObjectElement.border
https://bugs.webkit.org/show_bug.cgi?id=160040
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-tabular-expected.txt (203528 => 203529)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-tabular-expected.txt 2016-07-21 21:23:28 UTC (rev 203528)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-tabular-expected.txt 2016-07-21 21:25:10 UTC (rev 203529)
@@ -1204,8 +1204,8 @@
PASS table.bgColor: IDL set to "\0" followed by getAttribute()
PASS table.bgColor: IDL set to "\0" followed by IDL get
PASS table.bgColor: IDL set to null should not throw
-FAIL table.bgColor: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
-FAIL table.bgColor: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
+PASS table.bgColor: IDL set to null followed by getAttribute()
+PASS table.bgColor: IDL set to null followed by IDL get
PASS table.bgColor: IDL set to object "test-toString" should not throw
PASS table.bgColor: IDL set to object "test-toString" followed by getAttribute()
PASS table.bgColor: IDL set to object "test-toString" followed by IDL get
@@ -1281,8 +1281,8 @@
PASS table.cellPadding: IDL set to "\0" followed by getAttribute()
PASS table.cellPadding: IDL set to "\0" followed by IDL get
PASS table.cellPadding: IDL set to null should not throw
-FAIL table.cellPadding: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
-FAIL table.cellPadding: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
+PASS table.cellPadding: IDL set to null followed by getAttribute()
+PASS table.cellPadding: IDL set to null followed by IDL get
PASS table.cellPadding: IDL set to object "test-toString" should not throw
PASS table.cellPadding: IDL set to object "test-toString" followed by getAttribute()
PASS table.cellPadding: IDL set to object "test-toString" followed by IDL get
@@ -1358,8 +1358,8 @@
PASS table.cellSpacing: IDL set to "\0" followed by getAttribute()
PASS table.cellSpacing: IDL set to "\0" followed by IDL get
PASS table.cellSpacing: IDL set to null should not throw
-FAIL table.cellSpacing: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
-FAIL table.cellSpacing: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
+PASS table.cellSpacing: IDL set to null followed by getAttribute()
+PASS table.cellSpacing: IDL set to null followed by IDL get
PASS table.cellSpacing: IDL set to object "test-toString" should not throw
PASS table.cellSpacing: IDL set to object "test-toString" followed by getAttribute()
PASS table.cellSpacing: IDL set to object "test-toString" followed by IDL get
Modified: trunk/Source/WebCore/ChangeLog (203528 => 203529)
--- trunk/Source/WebCore/ChangeLog 2016-07-21 21:23:28 UTC (rev 203528)
+++ trunk/Source/WebCore/ChangeLog 2016-07-21 21:25:10 UTC (rev 203529)
@@ -1,5 +1,26 @@
2016-07-21 Chris Dumez <[email protected]>
+ Fix null handling for several HTMLTableElement attributes
+ https://bugs.webkit.org/show_bug.cgi?id=160041
+
+ Reviewed by Ryosuke Niwa.
+
+ Fix null handling for several HTMLTableElement attributes to match the
+ specification:
+ - https://html.spec.whatwg.org/#HTMLTableElement-partial
+
+ The attributes in question are 'bicolor', 'cellSpacing' and
+ 'cellPadding'. We are supposed to treat null as the empty string for
+ these attributes.
+
+ Firefox and Chrome both agree with the specification.
+
+ No new tests, rebaselined existing tests.
+
+ * html/HTMLTableElement.idl:
+
+2016-07-21 Chris Dumez <[email protected]>
+
Fix null handling for HTMLObjectElement.border
https://bugs.webkit.org/show_bug.cgi?id=160040
Modified: trunk/Source/WebCore/html/HTMLTableElement.idl (203528 => 203529)
--- trunk/Source/WebCore/html/HTMLTableElement.idl 2016-07-21 21:23:28 UTC (rev 203528)
+++ trunk/Source/WebCore/html/HTMLTableElement.idl 2016-07-21 21:25:10 UTC (rev 203529)
@@ -26,10 +26,10 @@
readonly attribute HTMLCollection rows;
readonly attribute HTMLCollection tBodies;
[Reflect] attribute DOMString align;
- [Reflect] attribute DOMString bgColor;
+ [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
[Reflect] attribute DOMString border;
- [Reflect] attribute DOMString cellPadding;
- [Reflect] attribute DOMString cellSpacing;
+ [Reflect, TreatNullAs=EmptyString] attribute DOMString cellPadding;
+ [Reflect, TreatNullAs=EmptyString] attribute DOMString cellSpacing;
[Reflect] attribute DOMString frame;