Title: [203444] trunk
Revision
203444
Author
[email protected]
Date
2016-07-19 22:13:06 -0700 (Tue, 19 Jul 2016)

Log Message

Fix null handling of SVGScriptElement.type attribute
https://bugs.webkit.org/show_bug.cgi?id=159927

Reviewed by Benjamin Poulain.

Source/WebCore:

Fix null handling of SVGScriptElement.type attribute:
- https://www.w3.org/TR/SVG2/interact.html#InterfaceSVGScriptElement

We were treating null as the null String which would end up removing
the 'type' content attribute. However, we should treat null as the
String "null".

Firefox and Chrome match the specification.

No new tests, updated existing test.

* svg/SVGScriptElement.idl:

LayoutTests:

Rebaseline existing test to reflect the behavior change.

* svg/dom/svg-element-attribute-js-null-expected.txt:
* svg/dom/svg-element-attribute-js-null.xhtml:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (203443 => 203444)


--- trunk/LayoutTests/ChangeLog	2016-07-20 05:09:51 UTC (rev 203443)
+++ trunk/LayoutTests/ChangeLog	2016-07-20 05:13:06 UTC (rev 203444)
@@ -1,5 +1,17 @@
 2016-07-19  Chris Dumez  <[email protected]>
 
+        Fix null handling of SVGScriptElement.type attribute
+        https://bugs.webkit.org/show_bug.cgi?id=159927
+
+        Reviewed by Benjamin Poulain.
+
+        Rebaseline existing test to reflect the behavior change.
+
+        * svg/dom/svg-element-attribute-js-null-expected.txt:
+        * svg/dom/svg-element-attribute-js-null.xhtml:
+
+2016-07-19  Chris Dumez  <[email protected]>
+
         Fix null handling of several HTMLDocument attributes
         https://bugs.webkit.org/show_bug.cgi?id=159923
 

Modified: trunk/LayoutTests/svg/dom/svg-element-attribute-js-null-expected.txt (203443 => 203444)


--- trunk/LayoutTests/svg/dom/svg-element-attribute-js-null-expected.txt	2016-07-20 05:09:51 UTC (rev 203443)
+++ trunk/LayoutTests/svg/dom/svg-element-attribute-js-null-expected.txt	2016-07-20 05:13:06 UTC (rev 203444)
@@ -6,6 +6,6 @@
 
 TEST SUCCEEDED: The value was the string '0'. [tested SVGLength.valueAsString]
 
-TEST SUCCEEDED: The value was the empty string. [tested SVGScriptElement.type]
+TEST SUCCEEDED: The value was the string 'null'. [tested SVGScriptElement.type]
 
 

Modified: trunk/LayoutTests/svg/dom/svg-element-attribute-js-null.xhtml (203443 => 203444)


--- trunk/LayoutTests/svg/dom/svg-element-attribute-js-null.xhtml	2016-07-20 05:09:51 UTC (rev 203443)
+++ trunk/LayoutTests/svg/dom/svg-element-attribute-js-null.xhtml	2016-07-20 05:13:06 UTC (rev 203444)
@@ -73,7 +73,7 @@
                     type: 'SVGScriptElement',
                     elementToUse: document.createElementNS(svgNS, 'script'),
                     attributes: [
-                        {name: 'type', expectedNull: ''}
+                        {name: 'type', expectedNull: 'null'}
                     ]
                 }
             ];

Modified: trunk/Source/WebCore/ChangeLog (203443 => 203444)


--- trunk/Source/WebCore/ChangeLog	2016-07-20 05:09:51 UTC (rev 203443)
+++ trunk/Source/WebCore/ChangeLog	2016-07-20 05:13:06 UTC (rev 203444)
@@ -1,5 +1,25 @@
 2016-07-19  Chris Dumez  <[email protected]>
 
+        Fix null handling of SVGScriptElement.type attribute
+        https://bugs.webkit.org/show_bug.cgi?id=159927
+
+        Reviewed by Benjamin Poulain.
+
+        Fix null handling of SVGScriptElement.type attribute:
+        - https://www.w3.org/TR/SVG2/interact.html#InterfaceSVGScriptElement
+
+        We were treating null as the null String which would end up removing
+        the 'type' content attribute. However, we should treat null as the
+        String "null".
+
+        Firefox and Chrome match the specification.
+
+        No new tests, updated existing test.
+
+        * svg/SVGScriptElement.idl:
+
+2016-07-19  Chris Dumez  <[email protected]>
+
         Fix null handling of several HTMLDocument attributes
         https://bugs.webkit.org/show_bug.cgi?id=159923
 

Modified: trunk/Source/WebCore/svg/SVGScriptElement.idl (203443 => 203444)


--- trunk/Source/WebCore/svg/SVGScriptElement.idl	2016-07-20 05:09:51 UTC (rev 203443)
+++ trunk/Source/WebCore/svg/SVGScriptElement.idl	2016-07-20 05:13:06 UTC (rev 203444)
@@ -24,8 +24,7 @@
  */
 
 interface SVGScriptElement : SVGElement {
-    // FIXME: This should not use [TreatNullAs=LegacyNullString].
-    [TreatNullAs=LegacyNullString, Reflect] attribute DOMString type;
+    [Reflect] attribute DOMString type;
 };
 
 SVGScriptElement implements SVGExternalResourcesRequired;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to