Title: [203800] trunk
- Revision
- 203800
- Author
- [email protected]
- Date
- 2016-07-27 15:15:37 -0700 (Wed, 27 Jul 2016)
Log Message
Parameters to DOMParser.parseFromString() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160268
Reviewed by Ryosuke Niwa.
Source/WebCore:
Parameters to DOMParser.parseFromString() should be mandatory:
- https://www.w3.org/TR/DOM-Parsing/#the-domparser-interface
Firefox and Chrome agree with the specification.
Test: fast/parser/DOMParser-parameters.html
* xml/DOMParser.idl:
LayoutTests:
Add test coverage.
* fast/parser/DOMParser-parameters-expected.txt: Added.
* fast/parser/DOMParser-parameters.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (203799 => 203800)
--- trunk/LayoutTests/ChangeLog 2016-07-27 22:06:28 UTC (rev 203799)
+++ trunk/LayoutTests/ChangeLog 2016-07-27 22:15:37 UTC (rev 203800)
@@ -1,5 +1,17 @@
2016-07-27 Chris Dumez <[email protected]>
+ Parameters to DOMParser.parseFromString() should be mandatory
+ https://bugs.webkit.org/show_bug.cgi?id=160268
+
+ Reviewed by Ryosuke Niwa.
+
+ Add test coverage.
+
+ * fast/parser/DOMParser-parameters-expected.txt: Added.
+ * fast/parser/DOMParser-parameters.html: Added.
+
+2016-07-27 Chris Dumez <[email protected]>
+
Align MediaList with the CSSOM specification
https://bugs.webkit.org/show_bug.cgi?id=160257
Added: trunk/LayoutTests/fast/parser/DOMParser-parameters-expected.txt (0 => 203800)
--- trunk/LayoutTests/fast/parser/DOMParser-parameters-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/parser/DOMParser-parameters-expected.txt 2016-07-27 22:15:37 UTC (rev 203800)
@@ -0,0 +1,11 @@
+Test that the parameters to DOMParser.parseFromString() are mandatory.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS parser.parseFromString() threw exception TypeError: Not enough arguments.
+PASS parser.parseFromString('<html></html>') threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Added: trunk/LayoutTests/fast/parser/DOMParser-parameters.html (0 => 203800)
--- trunk/LayoutTests/fast/parser/DOMParser-parameters.html (rev 0)
+++ trunk/LayoutTests/fast/parser/DOMParser-parameters.html 2016-07-27 22:15:37 UTC (rev 203800)
@@ -0,0 +1,15 @@
+<!DOCTYPE html>
+<html>
+<body>
+<script src=""
+<script>
+description("Test that the parameters to DOMParser.parseFromString() are mandatory.");
+
+var parser = new DOMParser();
+shouldThrow("parser.parseFromString()", "'TypeError: Not enough arguments'");
+shouldThrow("parser.parseFromString('<html></html>')", "'TypeError: Not enough arguments'");
+
+</script>
+<script src=""
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (203799 => 203800)
--- trunk/Source/WebCore/ChangeLog 2016-07-27 22:06:28 UTC (rev 203799)
+++ trunk/Source/WebCore/ChangeLog 2016-07-27 22:15:37 UTC (rev 203800)
@@ -1,3 +1,19 @@
+2016-07-27 Chris Dumez <[email protected]>
+
+ Parameters to DOMParser.parseFromString() should be mandatory
+ https://bugs.webkit.org/show_bug.cgi?id=160268
+
+ Reviewed by Ryosuke Niwa.
+
+ Parameters to DOMParser.parseFromString() should be mandatory:
+ - https://www.w3.org/TR/DOM-Parsing/#the-domparser-interface
+
+ Firefox and Chrome agree with the specification.
+
+ Test: fast/parser/DOMParser-parameters.html
+
+ * xml/DOMParser.idl:
+
2016-07-27 Eric Carlson <[email protected]>
Captions do not render in PiP window when element is hidden
Modified: trunk/Source/WebCore/xml/DOMParser.idl (203799 => 203800)
--- trunk/Source/WebCore/xml/DOMParser.idl 2016-07-27 22:06:28 UTC (rev 203799)
+++ trunk/Source/WebCore/xml/DOMParser.idl 2016-07-27 22:15:37 UTC (rev 203800)
@@ -21,6 +21,5 @@
Constructor,
ImplementationLacksVTable,
] interface DOMParser {
- // FIXME: Using "undefined" as default parameter value is wrong.
- [RaisesException] Document parseFromString(optional DOMString str = "undefined", optional DOMString contentType = "undefined");
+ [RaisesException, NewObject] Document parseFromString(DOMString str, DOMString contentType);
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes