Title: [203527] trunk
Revision
203527
Author
cdu...@apple.com
Date
2016-07-21 14:22:58 -0700 (Thu, 21 Jul 2016)

Log Message

Fix null handling for td.bgColor / tr.bgColor
https://bugs.webkit.org/show_bug.cgi?id=160043

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 td.bgColor / tr.bgColor to match the
specification:
- https://html.spec.whatwg.org/#HTMLTableCellElement-partial
- https://html.spec.whatwg.org/#HTMLTableRowElement-partial

We are supposed to treat null as the empty string.

Firefox and Chrome both agree with the specification.

No new tests, rebaselined existing tests.

* html/HTMLTableCellElement.idl:
* html/HTMLTableRowElement.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 (203526 => 203527)


--- trunk/LayoutTests/ChangeLog	2016-07-21 21:19:22 UTC (rev 203526)
+++ trunk/LayoutTests/ChangeLog	2016-07-21 21:22:58 UTC (rev 203527)
@@ -1,3 +1,15 @@
+2016-07-21  Chris Dumez  <cdu...@apple.com>
+
+        Fix null handling for td.bgColor / tr.bgColor
+        https://bugs.webkit.org/show_bug.cgi?id=160043
+
+        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  Daniel Bates  <daba...@apple.com>
 
         Test platform/ios-simulator/ios/plugin/youtube-flash-plugin-iframe.html is flaky

Modified: trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt (203526 => 203527)


--- trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt	2016-07-21 21:19:22 UTC (rev 203526)
+++ trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt	2016-07-21 21:22:58 UTC (rev 203527)
@@ -190,7 +190,7 @@
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.abbr]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.align]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.axis]
-TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.bgColor]
+TEST SUCCEEDED: The value was the empty string. [tested HTMLTableCellElement.bgColor]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.ch]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.chOff]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableCellElement.headers]
@@ -216,7 +216,7 @@
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableElement.width]
 
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableRowElement.align]
-TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableRowElement.bgColor]
+TEST SUCCEEDED: The value was the empty string. [tested HTMLTableRowElement.bgColor]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableRowElement.ch]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableRowElement.chOff]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLTableRowElement.vAlign]

Modified: trunk/LayoutTests/fast/dom/element-attribute-js-null.html (203526 => 203527)


--- trunk/LayoutTests/fast/dom/element-attribute-js-null.html	2016-07-21 21:19:22 UTC (rev 203526)
+++ trunk/LayoutTests/fast/dom/element-attribute-js-null.html	2016-07-21 21:22:58 UTC (rev 203527)
@@ -485,7 +485,7 @@
                         {name: 'abbr', expectedNull: 'null'},
                         {name: 'align', expectedNull: 'null'},
                         {name: 'axis', expectedNull: 'null'},
-                        {name: 'bgColor', expectedNull: 'null'},
+                        {name: 'bgColor', expectedNull: ''},
                         {name: 'ch', expectedNull: 'null'},
                         {name: 'chOff', expectedNull: 'null'},
                         {name: 'headers', expectedNull: 'null'},
@@ -526,7 +526,7 @@
                     elementToUse: document.createElement('tr'),
                     attributes: [
                         {name: 'align', expectedNull: 'null'},
-                        {name: 'bgColor', expectedNull: 'null'},
+                        {name: 'bgColor', expectedNull: ''},
                         {name: 'ch', expectedNull: 'null'},
                         {name: 'chOff', expectedNull: 'null'},
                         {name: 'vAlign', expectedNull: 'null'}

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203526 => 203527)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-07-21 21:19:22 UTC (rev 203526)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-07-21 21:22:58 UTC (rev 203527)
@@ -1,5 +1,16 @@
 2016-07-21  Chris Dumez  <cdu...@apple.com>
 
+        Fix null handling for td.bgColor / tr.bgColor
+        https://bugs.webkit.org/show_bug.cgi?id=160043
+
+        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  <cdu...@apple.com>
+
         Fix null handling for several HTMLBodyElement attributes
         https://bugs.webkit.org/show_bug.cgi?id=160044
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-tabular-expected.txt (203526 => 203527)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-tabular-expected.txt	2016-07-21 21:19:22 UTC (rev 203526)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-tabular-expected.txt	2016-07-21 21:22:58 UTC (rev 203527)
@@ -7891,8 +7891,8 @@
 PASS tr.bgColor: IDL set to "\0" followed by getAttribute() 
 PASS tr.bgColor: IDL set to "\0" followed by IDL get 
 PASS tr.bgColor: IDL set to null should not throw 
-FAIL tr.bgColor: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
-FAIL tr.bgColor: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
+PASS tr.bgColor: IDL set to null followed by getAttribute() 
+PASS tr.bgColor: IDL set to null followed by IDL get 
 PASS tr.bgColor: IDL set to object "test-toString" should not throw 
 PASS tr.bgColor: IDL set to object "test-toString" followed by getAttribute() 
 PASS tr.bgColor: IDL set to object "test-toString" followed by IDL get 
@@ -9688,8 +9688,8 @@
 PASS td.bgColor: IDL set to "\0" followed by getAttribute() 
 PASS td.bgColor: IDL set to "\0" followed by IDL get 
 PASS td.bgColor: IDL set to null should not throw 
-FAIL td.bgColor: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
-FAIL td.bgColor: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
+PASS td.bgColor: IDL set to null followed by getAttribute() 
+PASS td.bgColor: IDL set to null followed by IDL get 
 PASS td.bgColor: IDL set to object "test-toString" should not throw 
 PASS td.bgColor: IDL set to object "test-toString" followed by getAttribute() 
 PASS td.bgColor: IDL set to object "test-toString" followed by IDL get 
@@ -11485,8 +11485,8 @@
 PASS th.bgColor: IDL set to "\0" followed by getAttribute() 
 PASS th.bgColor: IDL set to "\0" followed by IDL get 
 PASS th.bgColor: IDL set to null should not throw 
-FAIL th.bgColor: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
-FAIL th.bgColor: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
+PASS th.bgColor: IDL set to null followed by getAttribute() 
+PASS th.bgColor: IDL set to null followed by IDL get 
 PASS th.bgColor: IDL set to object "test-toString" should not throw 
 PASS th.bgColor: IDL set to object "test-toString" followed by getAttribute() 
 PASS th.bgColor: IDL set to object "test-toString" followed by IDL get 

Modified: trunk/Source/WebCore/ChangeLog (203526 => 203527)


--- trunk/Source/WebCore/ChangeLog	2016-07-21 21:19:22 UTC (rev 203526)
+++ trunk/Source/WebCore/ChangeLog	2016-07-21 21:22:58 UTC (rev 203527)
@@ -1,5 +1,26 @@
 2016-07-21  Chris Dumez  <cdu...@apple.com>
 
+        Fix null handling for td.bgColor / tr.bgColor
+        https://bugs.webkit.org/show_bug.cgi?id=160043
+
+        Reviewed by Ryosuke Niwa.
+
+        Fix null handling for td.bgColor / tr.bgColor to match the
+        specification:
+        - https://html.spec.whatwg.org/#HTMLTableCellElement-partial
+        - https://html.spec.whatwg.org/#HTMLTableRowElement-partial
+
+        We are supposed to treat null as the empty string.
+
+        Firefox and Chrome both agree with the specification.
+
+        No new tests, rebaselined existing tests.
+
+        * html/HTMLTableCellElement.idl:
+        * html/HTMLTableRowElement.idl:
+
+2016-07-21  Chris Dumez  <cdu...@apple.com>
+
         Fix null handling for several HTMLBodyElement attributes
         https://bugs.webkit.org/show_bug.cgi?id=160044
 

Modified: trunk/Source/WebCore/html/HTMLTableCellElement.idl (203526 => 203527)


--- trunk/Source/WebCore/html/HTMLTableCellElement.idl	2016-07-21 21:19:22 UTC (rev 203526)
+++ trunk/Source/WebCore/html/HTMLTableCellElement.idl	2016-07-21 21:22:58 UTC (rev 203527)
@@ -22,7 +22,7 @@
     readonly attribute long cellIndex;
     [Reflect] attribute DOMString align;
     [Reflect] attribute DOMString axis;
-    [Reflect] attribute DOMString bgColor;
+    [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
     [Reflect=char] attribute DOMString ch;
     [Reflect=charoff] attribute DOMString chOff;
 

Modified: trunk/Source/WebCore/html/HTMLTableRowElement.idl (203526 => 203527)


--- trunk/Source/WebCore/html/HTMLTableRowElement.idl	2016-07-21 21:19:22 UTC (rev 203526)
+++ trunk/Source/WebCore/html/HTMLTableRowElement.idl	2016-07-21 21:22:58 UTC (rev 203527)
@@ -23,7 +23,7 @@
     readonly attribute long sectionRowIndex;
     readonly attribute HTMLCollection cells;
     [Reflect] attribute DOMString align;
-    [Reflect] attribute DOMString bgColor;
+    [Reflect, TreatNullAs=EmptyString] attribute DOMString bgColor;
     [Reflect=char] attribute DOMString ch;
     [Reflect=charoff] attribute DOMString chOff;
     [Reflect] attribute DOMString vAlign;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to