Title: [203523] trunk
Revision
203523
Author
[email protected]
Date
2016-07-21 14:09:44 -0700 (Thu, 21 Jul 2016)

Log Message

Fix null handling for HTMLImageElement.border
https://bugs.webkit.org/show_bug.cgi?id=160039

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/dom/reflection-embedded-expected.txt:

Source/WebCore:

Fix null handling for HTMLImageElement.border to match the specification:
- https://html.spec.whatwg.org/#HTMLImageElement-partial

We are supposed to treat null as the empty string.

Both Firefox and Chrome agree with the specification.

No new tests, rebaselined existing tests.

* html/HTMLImageElement.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 (203522 => 203523)


--- trunk/LayoutTests/ChangeLog	2016-07-21 21:06:51 UTC (rev 203522)
+++ trunk/LayoutTests/ChangeLog	2016-07-21 21:09:44 UTC (rev 203523)
@@ -1,3 +1,15 @@
+2016-07-21  Chris Dumez  <[email protected]>
+
+        Fix null handling for HTMLImageElement.border
+        https://bugs.webkit.org/show_bug.cgi?id=160039
+
+        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  <[email protected]>
 
         REGRESSION: Plugin replaced YouTube Flash videos always have the same width

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


--- trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt	2016-07-21 21:06:51 UTC (rev 203522)
+++ trunk/LayoutTests/fast/dom/element-attribute-js-null-expected.txt	2016-07-21 21:09:44 UTC (rev 203523)
@@ -106,7 +106,7 @@
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLImageElement.name]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLImageElement.align]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLImageElement.alt]
-TEST SUCCEEDED: The value was the string 'null'. [tested HTMLImageElement.border]
+TEST SUCCEEDED: The value was the empty string. [tested HTMLImageElement.border]
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLImageElement.useMap]
 
 TEST SUCCEEDED: The value was the string 'null'. [tested HTMLInputElement.accept]

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


--- trunk/LayoutTests/fast/dom/element-attribute-js-null.html	2016-07-21 21:06:51 UTC (rev 203522)
+++ trunk/LayoutTests/fast/dom/element-attribute-js-null.html	2016-07-21 21:09:44 UTC (rev 203523)
@@ -293,7 +293,7 @@
                         {name: 'name', expectedNull: 'null'},
                         {name: 'align', expectedNull: 'null'},
                         {name: 'alt', expectedNull: 'null'},
-                        {name: 'border', expectedNull: 'null'},
+                        {name: 'border', expectedNull: ''},
                         {name: 'useMap', expectedNull: 'null'},
                     ]
                 },

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203522 => 203523)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2016-07-21 21:06:51 UTC (rev 203522)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2016-07-21 21:09:44 UTC (rev 203523)
@@ -1,5 +1,16 @@
 2016-07-21  Chris Dumez  <[email protected]>
 
+        Fix null handling for HTMLImageElement.border
+        https://bugs.webkit.org/show_bug.cgi?id=160039
+
+        Reviewed by Ryosuke Niwa.
+
+        Rebaseline W3C test now that more checks are passing.
+
+        * web-platform-tests/html/dom/reflection-embedded-expected.txt:
+
+2016-07-21  Chris Dumez  <[email protected]>
+
         The 2 first parameters to DOMImplementation.createDocument() should be mandatory
         https://bugs.webkit.org/show_bug.cgi?id=160030
 

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt (203522 => 203523)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt	2016-07-21 21:06:51 UTC (rev 203522)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt	2016-07-21 21:09:44 UTC (rev 203523)
@@ -1842,8 +1842,8 @@
 PASS img.border: IDL set to "\0" followed by getAttribute() 
 PASS img.border: IDL set to "\0" followed by IDL get 
 PASS img.border: IDL set to null should not throw 
-FAIL img.border: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
-FAIL img.border: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
+PASS img.border: IDL set to null followed by getAttribute() 
+PASS img.border: IDL set to null followed by IDL get 
 PASS img.border: IDL set to object "test-toString" should not throw 
 PASS img.border: IDL set to object "test-toString" followed by getAttribute() 
 PASS img.border: IDL set to object "test-toString" followed by IDL get 

Modified: trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt (203522 => 203523)


--- trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt	2016-07-21 21:06:51 UTC (rev 203522)
+++ trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/reflection-embedded-expected.txt	2016-07-21 21:09:44 UTC (rev 203523)
@@ -1842,8 +1842,8 @@
 PASS img.border: IDL set to "\0" followed by getAttribute() 
 PASS img.border: IDL set to "\0" followed by IDL get 
 PASS img.border: IDL set to null should not throw 
-FAIL img.border: IDL set to null followed by getAttribute() assert_equals: expected "" but got "null"
-FAIL img.border: IDL set to null followed by IDL get assert_equals: expected "" but got "null"
+PASS img.border: IDL set to null followed by getAttribute() 
+PASS img.border: IDL set to null followed by IDL get 
 PASS img.border: IDL set to object "test-toString" should not throw 
 PASS img.border: IDL set to object "test-toString" followed by getAttribute() 
 PASS img.border: IDL set to object "test-toString" followed by IDL get 

Modified: trunk/Source/WebCore/ChangeLog (203522 => 203523)


--- trunk/Source/WebCore/ChangeLog	2016-07-21 21:06:51 UTC (rev 203522)
+++ trunk/Source/WebCore/ChangeLog	2016-07-21 21:09:44 UTC (rev 203523)
@@ -1,3 +1,21 @@
+2016-07-21  Chris Dumez  <[email protected]>
+
+        Fix null handling for HTMLImageElement.border
+        https://bugs.webkit.org/show_bug.cgi?id=160039
+
+        Reviewed by Ryosuke Niwa.
+
+        Fix null handling for HTMLImageElement.border to match the specification:
+        - https://html.spec.whatwg.org/#HTMLImageElement-partial
+
+        We are supposed to treat null as the empty string.
+
+        Both Firefox and Chrome agree with the specification.
+
+        No new tests, rebaselined existing tests.
+
+        * html/HTMLImageElement.idl:
+
 2016-07-21  Daniel Bates  <[email protected]>
 
         REGRESSION: Plugin replaced YouTube Flash videos always have the same width

Modified: trunk/Source/WebCore/html/HTMLImageElement.idl (203522 => 203523)


--- trunk/Source/WebCore/html/HTMLImageElement.idl	2016-07-21 21:06:51 UTC (rev 203522)
+++ trunk/Source/WebCore/html/HTMLImageElement.idl	2016-07-21 21:09:44 UTC (rev 203523)
@@ -25,7 +25,7 @@
     [Reflect] attribute DOMString name;
     [Reflect] attribute DOMString align;
     [Reflect] attribute DOMString alt;
-    [Reflect] attribute DOMString border;
+    [Reflect, TreatNullAs=EmptyString] attribute DOMString border;
     attribute DOMString? crossOrigin;
     attribute long height;
     [Reflect] attribute long hspace;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to