<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[203701] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/203701">203701</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-07-25 14:53:33 -0700 (Mon, 25 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Parameters to DOMImplementation.createDocumentType() should be mandatory and non-nullable
https://bugs.webkit.org/show_bug.cgi?id=160167

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Rebaseline a W3C test now that more checks are passing.

* web-platform-tests/dom/interfaces-expected.txt:

Source/WebCore:

Parameters to DOMImplementation.createDocumentType() should be mandatory
and non-nullable:
- https://dom.spec.whatwg.org/#domimplementation

Firefox and Chrome both agree with the specification. However, those
parameters were nullable and optional in WebKit.

Test: fast/dom/DOMImplementation/createDocumentType-parameters.html

* dom/DOMImplementation.idl:

LayoutTests:

* editing/selection/script-tests/DOMSelection-DocumentType.js:
* fast/dom/DOMImplementation/createDocumentType-err-expected.txt:
* fast/dom/DOMImplementation/script-tests/createDocumentType-err.js:
Update existing tests to reflect the behavior change.

* fast/dom/DOMImplementation/createDocumentType-parameters-expected.txt: Added.
* fast/dom/DOMImplementation/createDocumentType-parameters.html: Added.
Add layout test coverage. I have verified that this test passes on both
Firefox and Chrome.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestseditingselectionscripttestsDOMSelectionDocumentTypejs">trunk/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMImplementationcreateDocumentTypeerrexpectedtxt">trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMImplementationscripttestscreateDocumentTypeerrjs">trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsdominterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomDOMImplementationidl">trunk/Source/WebCore/dom/DOMImplementation.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomDOMImplementationcreateDocumentTypeparametersexpectedtxt">trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMImplementationcreateDocumentTypeparametershtml">trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-parameters.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (203700 => 203701)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-25 21:38:42 UTC (rev 203700)
+++ trunk/LayoutTests/ChangeLog        2016-07-25 21:53:33 UTC (rev 203701)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-07-25  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Parameters to DOMImplementation.createDocumentType() should be mandatory and non-nullable
+        https://bugs.webkit.org/show_bug.cgi?id=160167
+
+        Reviewed by Ryosuke Niwa.
+
+        * editing/selection/script-tests/DOMSelection-DocumentType.js:
+        * fast/dom/DOMImplementation/createDocumentType-err-expected.txt:
+        * fast/dom/DOMImplementation/script-tests/createDocumentType-err.js:
+        Update existing tests to reflect the behavior change.
+
+        * fast/dom/DOMImplementation/createDocumentType-parameters-expected.txt: Added.
+        * fast/dom/DOMImplementation/createDocumentType-parameters.html: Added.
+        Add layout test coverage. I have verified that this test passes on both
+        Firefox and Chrome.
+
</ins><span class="cx"> 2016-07-25  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Rename SubtleCrypto to WebKitSubtleCrypto
</span></span></pre></div>
<a id="trunkLayoutTestseditingselectionscripttestsDOMSelectionDocumentTypejs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js (203700 => 203701)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js        2016-07-25 21:38:42 UTC (rev 203700)
+++ trunk/LayoutTests/editing/selection/script-tests/DOMSelection-DocumentType.js        2016-07-25 21:53:33 UTC (rev 203701)
</span><span class="lines">@@ -1,7 +1,7 @@
</span><span class="cx"> description(&quot;Test to check if setBaseAndExtent guard node with null owner document (Bug 31680)&quot;);
</span><span class="cx"> 
</span><span class="cx"> var sel = window.getSelection();
</span><del>-var docType = document.implementation.createDocumentType('c');
</del><ins>+var docType = document.implementation.createDocumentType('c', '', '');
</ins><span class="cx"> 
</span><span class="cx"> sel.setBaseAndExtent(docType);
</span><span class="cx"> shouldBeNull(&quot;sel.anchorNode&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMImplementationcreateDocumentTypeerrexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt (203700 => 203701)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt        2016-07-25 21:38:42 UTC (rev 203700)
+++ trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-err-expected.txt        2016-07-25 21:53:33 UTC (rev 203701)
</span><span class="lines">@@ -3,17 +3,17 @@
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS document.implementation.createDocumentType('foo').toString() is &quot;[object DocumentType]&quot;
-PASS document.implementation.createDocumentType('foo', null).toString() is &quot;[object DocumentType]&quot;
-PASS createDocumentType(, ); threw INVALID_CHARACTER_ERR
-PASS createDocumentType(null, ); threw INVALID_CHARACTER_ERR
-PASS createDocumentType(, null); threw INVALID_CHARACTER_ERR
-PASS createDocumentType(, , null); threw INVALID_CHARACTER_ERR
-PASS createDocumentType(null, null); threw INVALID_CHARACTER_ERR
-PASS createDocumentType(null, null, null); threw INVALID_CHARACTER_ERR
-PASS createDocumentType(null, &quot;&quot;); threw INVALID_CHARACTER_ERR
-PASS createDocumentType(&quot;&quot;, null); threw INVALID_CHARACTER_ERR
-PASS createDocumentType(&quot;&quot;, &quot;&quot;); threw INVALID_CHARACTER_ERR
</del><ins>+PASS document.implementation.createDocumentType('foo') threw exception TypeError: Not enough arguments.
+PASS document.implementation.createDocumentType('foo', null) threw exception TypeError: Not enough arguments.
+PASS exceptionThrown.name is &quot;TypeError&quot;
+PASS exceptionThrown.name is &quot;TypeError&quot;
+PASS exceptionThrown.name is &quot;TypeError&quot;
+PASS createDocumentType(, , null)
+PASS exceptionThrown.name is &quot;TypeError&quot;
+PASS createDocumentType(null, null, null)
+PASS exceptionThrown.name is &quot;TypeError&quot;
+PASS exceptionThrown.name is &quot;TypeError&quot;
+PASS exceptionThrown.name is &quot;TypeError&quot;
</ins><span class="cx"> PASS createDocumentType(&quot;a:&quot;, null, null); threw NAMESPACE_ERR
</span><span class="cx"> PASS createDocumentType(&quot;:foo&quot;, null, null); threw NAMESPACE_ERR
</span><span class="cx"> PASS createDocumentType(&quot;:&quot;, null, null); threw NAMESPACE_ERR
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMImplementationcreateDocumentTypeparametersexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-parameters-expected.txt (0 => 203701)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-parameters-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-parameters-expected.txt        2016-07-25 21:53:33 UTC (rev 203701)
</span><span class="lines">@@ -0,0 +1,17 @@
</span><ins>+Test that the parameters to DOMImplementation.createDocumentType() are mandatory and non-nullable
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS document.implementation.createDocumentType() threw exception TypeError: Not enough arguments.
+PASS document.implementation.createDocumentType('a') threw exception TypeError: Not enough arguments.
+PASS document.implementation.createDocumentType('a', '') threw exception TypeError: Not enough arguments.
+PASS docType = document.implementation.createDocumentType(null, null, null) did not throw exception.
+PASS docType.name is &quot;null&quot;
+PASS docType.nodeName is &quot;null&quot;
+PASS docType.publicId is &quot;null&quot;
+PASS docType.systemId is &quot;null&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMImplementationcreateDocumentTypeparametershtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-parameters.html (0 => 203701)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-parameters.html                                (rev 0)
+++ trunk/LayoutTests/fast/dom/DOMImplementation/createDocumentType-parameters.html        2016-07-25 21:53:33 UTC (rev 203701)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;body&gt;
+&lt;script src=&quot;../../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+description(&quot;Test that the parameters to DOMImplementation.createDocumentType() are mandatory and non-nullable&quot;);
+
+// Parameters should be mandatory.
+shouldThrow(&quot;document.implementation.createDocumentType()&quot;);
+shouldThrow(&quot;document.implementation.createDocumentType('a')&quot;);
+shouldThrow(&quot;document.implementation.createDocumentType('a', '')&quot;);
+
+// Parameters should not be nullable.
+shouldNotThrow(&quot;docType = document.implementation.createDocumentType(null, null, null)&quot;);
+shouldBeEqualToString(&quot;docType.name&quot;, &quot;null&quot;);
+shouldBeEqualToString(&quot;docType.nodeName&quot;, &quot;null&quot;);
+shouldBeEqualToString(&quot;docType.publicId&quot;, &quot;null&quot;);
+shouldBeEqualToString(&quot;docType.systemId&quot;, &quot;null&quot;);
+&lt;/script&gt;
+&lt;script src=&quot;../../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMImplementationscripttestscreateDocumentTypeerrjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js (203700 => 203701)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js        2016-07-25 21:38:42 UTC (rev 203700)
+++ trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocumentType-err.js        2016-07-25 21:53:33 UTC (rev 203701)
</span><span class="lines">@@ -27,15 +27,15 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> var allTests = [
</span><del>-   { args: [undefined, undefined], code: 5  },
-   { args: [null, undefined], code: 5  },
-   { args: [undefined, null], code: 5 },
-   { args: [undefined, undefined, null], code: 5 },
-   { args: [null, null], code: 5 },
-   { args: [null, null, null], code: 5 },
-   { args: [null, &quot;&quot;], code: 5 },
-   { args: [&quot;&quot;, null], code: 5 },
-   { args: [&quot;&quot;, &quot;&quot;], code: 5 },
</del><ins>+   { args: [undefined, undefined], name: &quot;TypeError&quot; },
+   { args: [null, undefined], name: &quot;TypeError&quot;  },
+   { args: [undefined, null], name: &quot;TypeError&quot; },
+   { args: [undefined, undefined, null] },
+   { args: [null, null], name: &quot;TypeError&quot; },
+   { args: [null, null, null] },
+   { args: [null, &quot;&quot;], name: &quot;TypeError&quot; },
+   { args: [&quot;&quot;, null], name: &quot;TypeError&quot; },
+   { args: [&quot;&quot;, &quot;&quot;], name: &quot;TypeError&quot; },
</ins><span class="cx">    { args: [&quot;a:&quot;, null, null], code: 14 },
</span><span class="cx">    { args: [&quot;:foo&quot;, null, null], code: 14 },
</span><span class="cx">    { args: [&quot;:&quot;, null, null], code: 14 },
</span><span class="lines">@@ -84,15 +84,20 @@
</span><span class="cx">             document.implementation[createFunctionName].apply(document.implementation, test.args);
</span><span class="cx">             if ('code' in test)
</span><span class="cx">                 testFailed(msg + &quot; expected exception: &quot; + test.code);
</span><ins>+            else if ('name' in test)
+                testFailed(msg + &quot; expected exception: &quot; + test.name);
</ins><span class="cx">             else
</span><span class="cx">                 testPassed(msg);
</span><span class="cx">         } catch (e) {
</span><del>-            assertEquals(e.code, test.code || &quot;expected no exception&quot;, msg);
</del><ins>+            exceptionThrown = e;
+            if ('name' in test) {
+                shouldBeEqualToString(&quot;exceptionThrown.name&quot;, &quot;&quot; + test.name);
+            } else
+                assertEquals(e.code, test.code || &quot;expected no exception&quot;, msg);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// Moz throws a &quot;Not enough arguments&quot; exception in these, we don't:
-shouldBeEqualToString(&quot;document.implementation.createDocumentType('foo').toString()&quot;, &quot;[object DocumentType]&quot;);
-shouldBeEqualToString(&quot;document.implementation.createDocumentType('foo', null).toString()&quot;, &quot;[object DocumentType]&quot;);
</del><ins>+shouldThrow(&quot;document.implementation.createDocumentType('foo')&quot;);
+shouldThrow(&quot;document.implementation.createDocumentType('foo', null)&quot;);
</ins><span class="cx"> runTests(allTests, &quot;createDocumentType&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203700 => 203701)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-07-25 21:38:42 UTC (rev 203700)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-07-25 21:53:33 UTC (rev 203701)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-07-25  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Parameters to DOMImplementation.createDocumentType() should be mandatory and non-nullable
+        https://bugs.webkit.org/show_bug.cgi?id=160167
+
+        Reviewed by Ryosuke Niwa.
+
+        Rebaseline a W3C test now that more checks are passing.
+
+        * web-platform-tests/dom/interfaces-expected.txt:
+
</ins><span class="cx"> 2016-07-24  Youenn Fablet  &lt;youenn@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Fetch API] Request should be created with any HeadersInit data
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (203700 => 203701)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt        2016-07-25 21:38:42 UTC (rev 203700)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt        2016-07-25 21:53:33 UTC (rev 203701)
</span><span class="lines">@@ -533,7 +533,7 @@
</span><span class="cx"> PASS DOMImplementation interface object name 
</span><span class="cx"> PASS DOMImplementation interface: existence and properties of interface prototype object 
</span><span class="cx"> PASS DOMImplementation interface: existence and properties of interface prototype object's &quot;constructor&quot; property 
</span><del>-FAIL DOMImplementation interface: operation createDocumentType(DOMString,DOMString,DOMString) assert_equals: property has wrong .length expected 3 but got 0
</del><ins>+PASS DOMImplementation interface: operation createDocumentType(DOMString,DOMString,DOMString) 
</ins><span class="cx"> PASS DOMImplementation interface: operation createDocument(DOMString,DOMString,DocumentType) 
</span><span class="cx"> PASS DOMImplementation interface: operation createHTMLDocument(DOMString) 
</span><span class="cx"> PASS DOMImplementation interface: operation hasFeature() 
</span><span class="lines">@@ -540,9 +540,7 @@
</span><span class="cx"> PASS DOMImplementation must be primary interface of document.implementation 
</span><span class="cx"> PASS Stringification of document.implementation 
</span><span class="cx"> PASS DOMImplementation interface: document.implementation must inherit property &quot;createDocumentType&quot; with the proper type (0) 
</span><del>-FAIL DOMImplementation interface: calling createDocumentType(DOMString,DOMString,DOMString) on document.implementation with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; threw object &quot;InvalidCharacterError (DOM Exception 5): The string conta...&quot; (&quot;InvalidCharacterError&quot;) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
</del><ins>+PASS DOMImplementation interface: calling createDocumentType(DOMString,DOMString,DOMString) on document.implementation with too few arguments must throw TypeError 
</ins><span class="cx"> PASS DOMImplementation interface: document.implementation must inherit property &quot;createDocument&quot; with the proper type (1) 
</span><span class="cx"> PASS DOMImplementation interface: calling createDocument(DOMString,DOMString,DocumentType) on document.implementation with too few arguments must throw TypeError 
</span><span class="cx"> PASS DOMImplementation interface: document.implementation must inherit property &quot;createHTMLDocument&quot; with the proper type (2) 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203700 => 203701)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-25 21:38:42 UTC (rev 203700)
+++ trunk/Source/WebCore/ChangeLog        2016-07-25 21:53:33 UTC (rev 203701)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2016-07-25  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Parameters to DOMImplementation.createDocumentType() should be mandatory and non-nullable
+        https://bugs.webkit.org/show_bug.cgi?id=160167
+
+        Reviewed by Ryosuke Niwa.
+
+        Parameters to DOMImplementation.createDocumentType() should be mandatory
+        and non-nullable:
+        - https://dom.spec.whatwg.org/#domimplementation
+
+        Firefox and Chrome both agree with the specification. However, those
+        parameters were nullable and optional in WebKit.
+
+        Test: fast/dom/DOMImplementation/createDocumentType-parameters.html
+
+        * dom/DOMImplementation.idl:
+
</ins><span class="cx"> 2016-07-25  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Media controls should not be displayed for a video until it starts playing
</span></span></pre></div>
<a id="trunkSourceWebCoredomDOMImplementationidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DOMImplementation.idl (203700 => 203701)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMImplementation.idl        2016-07-25 21:38:42 UTC (rev 203700)
+++ trunk/Source/WebCore/dom/DOMImplementation.idl        2016-07-25 21:53:33 UTC (rev 203701)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> 
</span><span class="cx">     // DOM Level 2
</span><span class="cx"> 
</span><del>-    [ObjCLegacyUnnamedParameters, RaisesException, NewObject] DocumentType createDocumentType(optional DOMString? qualifiedName = null, optional DOMString? publicId = null, optional DOMString? systemId = null);
</del><ins>+    [ObjCLegacyUnnamedParameters, RaisesException, NewObject] DocumentType createDocumentType(DOMString qualifiedName, DOMString publicId, DOMString systemId);
</ins><span class="cx"> 
</span><span class="cx">     [NewObject, ObjCLegacyUnnamedParameters, RaisesException]
</span><span class="cx"> #if defined(LANGUAGE_OBJECTIVE_C) &amp;&amp; LANGUAGE_OBJECTIVE_C || defined(LANGUAGE_GOBJECT) &amp;&amp; LANGUAGE_GOBJECT
</span></span></pre>
</div>
</div>

</body>
</html>