<!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>[203517] 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/203517">203517</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-07-21 12:04:35 -0700 (Thu, 21 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>The 2 first parameters to DOMImplementation.createDocument() should be mandatory
https://bugs.webkit.org/show_bug.cgi?id=160030

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

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

Source/WebCore:

The 2 first parameters to DOMImplementation.createDocument() should be mandatory
as per the specification:
- https://dom.spec.whatwg.org/#domimplementation

Firefox and Chrome both agree with the specification. However, those
parameters were marked as optional in WebKit. Calling this function
without parameters would create a document element whose tag is the
string &quot;undefined&quot;, which does not seem helpful. This patch thus
aligns our behavior with the specification and other browsers.

No new tests, rebaselined existing tests.

* dom/DOMImplementation.idl:

LayoutTests:

Rebaseline / update existing test to reflect the behavior change.

* fast/css/zoom-on-unattached.html:
* fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt:
* fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js:
* fast/dom/HTMLLinkElement/prefetch-detached.html:
* fast/dom/node-move-to-new-document-crash-main.html:
* fast/forms/change-form-element-document-crash.html:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcsszoomonunattachedhtml">trunk/LayoutTests/fast/css/zoom-on-unattached.html</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMImplementationcreateDocumentnamespaceerrexpectedtxt">trunk/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDOMImplementationscripttestscreateDocumentnamespaceerrjs">trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js</a></li>
<li><a href="#trunkLayoutTestsfastdomHTMLLinkElementprefetchdetachedhtml">trunk/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html</a></li>
<li><a href="#trunkLayoutTestsfastdomnodemovetonewdocumentcrashmainhtml">trunk/LayoutTests/fast/dom/node-move-to-new-document-crash-main.html</a></li>
<li><a href="#trunkLayoutTestsfastformschangeformelementdocumentcrashhtml">trunk/LayoutTests/fast/forms/change-form-element-document-crash.html</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="#trunkLayoutTestsimportedw3cwebplatformtestsdomnodesDOMImplementationcreateDocumentexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt</a></li>
<li><a href="#trunkLayoutTestssvganimationssmilelementtargetcrashmainhtml">trunk/LayoutTests/svg/animations/smil-element-target-crash-main.html</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>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/ChangeLog        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-07-21  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        The 2 first parameters to DOMImplementation.createDocument() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=160030
+
+        Reviewed by Sam Weinig.
+
+        Rebaseline / update existing test to reflect the behavior change.
+
+        * fast/css/zoom-on-unattached.html:
+        * fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt:
+        * fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js:
+        * fast/dom/HTMLLinkElement/prefetch-detached.html:
+        * fast/dom/node-move-to-new-document-crash-main.html:
+        * fast/forms/change-form-element-document-crash.html:
+
</ins><span class="cx"> 2016-07-21  Csaba Osztrogonác  &lt;ossy@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Clarify testing mode names in run-jsc-stress-tests
</span></span></pre></div>
<a id="trunkLayoutTestsfastcsszoomonunattachedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css/zoom-on-unattached.html (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css/zoom-on-unattached.html        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/fast/css/zoom-on-unattached.html        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -3,7 +3,7 @@
</span><span class="cx">     testRunner.dumpAsText();
</span><span class="cx"> 
</span><span class="cx"> root = document.createElement(&quot;body&quot;);
</span><del>-d = document.implementation.createDocument();
</del><ins>+d = document.implementation.createDocument(null, &quot;test&quot;);
</ins><span class="cx"> d.adoptNode(root);
</span><span class="cx"> node = document.createElement(&quot;title&quot;);
</span><span class="cx"> root.appendChild(node);
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMImplementationcreateDocumentnamespaceerrexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/fast/dom/DOMImplementation/createDocument-namespace-err-expected.txt        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -3,8 +3,8 @@
</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.createDocument().toString() is &quot;[object XMLDocument]&quot;
-PASS document.implementation.createDocument(&quot;http://www.example.com&quot;).toString() is &quot;[object XMLDocument]&quot;
</del><ins>+PASS document.implementation.createDocument() threw exception TypeError: Not enough arguments.
+PASS document.implementation.createDocument(&quot;http://www.example.com&quot;) threw exception TypeError: Not enough arguments.
</ins><span class="cx"> PASS createDocument(, , null)
</span><span class="cx"> PASS createDocument(null, , null)
</span><span class="cx"> FAIL createDocument(, null, null)
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDOMImplementationscripttestscreateDocumentnamespaceerrjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/fast/dom/DOMImplementation/script-tests/createDocument-namespace-err.js        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -137,8 +137,7 @@
</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.createDocument().toString()&quot;, &quot;[object XMLDocument]&quot;);
-shouldBeEqualToString(&quot;document.implementation.createDocument(\&quot;http://www.example.com\&quot;).toString()&quot;, &quot;[object XMLDocument]&quot;);
</del><ins>+shouldThrow(&quot;document.implementation.createDocument()&quot;);
+shouldThrow(&quot;document.implementation.createDocument(\&quot;http://www.example.com\&quot;)&quot;);
</ins><span class="cx"> 
</span><span class="cx"> runNSTests(allNSTests, document.implementation, &quot;createDocument&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomHTMLLinkElementprefetchdetachedhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/fast/dom/HTMLLinkElement/prefetch-detached.html        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -11,7 +11,7 @@
</span><span class="cx"> document.getElementById('frag').innerHTML = '&lt;link href=&quot;prefetch.link&quot; rel=&quot;prefetch&quot;&gt;';
</span><span class="cx"> 
</span><span class="cx"> // Fun with detached documents.
</span><del>-var doc = document.implementation.createDocument('application/html+xml');
</del><ins>+var doc = document.implementation.createDocument('application/html+xml', 'test');
</ins><span class="cx"> var lnk = doc.createElement('link');
</span><span class="cx"> lnk.setAttribute('rel', 'prefetch');
</span><span class="cx"> lnk.setAttribute('href', 'prefetch.link');
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomnodemovetonewdocumentcrashmainhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/dom/node-move-to-new-document-crash-main.html (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/node-move-to-new-document-crash-main.html        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/fast/dom/node-move-to-new-document-crash-main.html        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -13,7 +13,7 @@
</span><span class="cx"> {
</span><span class="cx">     root = document.getElementById('root').contentDocument;
</span><span class="cx">     test = root.getElementById('test');
</span><del>-    var doc = document.implementation.createDocument();
</del><ins>+    var doc = document.implementation.createDocument(null, &quot;test&quot;);
</ins><span class="cx">     doc.adoptNode(test);
</span><span class="cx">     test.appendChild(root.getElementById('svg').cloneNode(0));
</span><span class="cx">     document.open();
</span></span></pre></div>
<a id="trunkLayoutTestsfastformschangeformelementdocumentcrashhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/forms/change-form-element-document-crash.html (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/forms/change-form-element-document-crash.html        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/fast/forms/change-form-element-document-crash.html        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -17,7 +17,7 @@
</span><span class="cx">     element.setAttribute('form', '1');
</span><span class="cx">     var container = document.createElement('div');
</span><span class="cx">     container.appendChild(element);
</span><del>-    document.implementation.createDocument().adoptNode(container);
</del><ins>+    document.implementation.createDocument(null, &quot;test&quot;).adoptNode(container);
</ins><span class="cx">     container.removeChild(element);
</span><span class="cx">     delete element;
</span><span class="cx">     gc();
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-07-21  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        The 2 first parameters to DOMImplementation.createDocument() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=160030
+
+        Reviewed by Sam Weinig.
+
+        Rebaseline several W3C tests now that more checks are passing.
+
+        * web-platform-tests/dom/interfaces-expected.txt:
+        * web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt:
+
</ins><span class="cx"> 2016-07-20  Jiewen Tan  &lt;jiewen_tan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix timeout of imported/w3c/WebCryptoAPI/idlharness.html
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -606,7 +606,7 @@
</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><span class="cx"> FAIL DOMImplementation interface: operation createDocumentType(DOMString,DOMString,DOMString) assert_equals: property has wrong .length expected 3 but got 0
</span><del>-FAIL DOMImplementation interface: operation createDocument(DOMString,DOMString,DocumentType) assert_equals: property has wrong .length expected 2 but got 0
</del><ins>+PASS DOMImplementation interface: operation createDocument(DOMString,DOMString,DocumentType) 
</ins><span class="cx"> PASS DOMImplementation interface: operation createHTMLDocument(DOMString) 
</span><span class="cx"> PASS DOMImplementation interface: operation hasFeature() 
</span><span class="cx"> PASS DOMImplementation must be primary interface of document.implementation 
</span><span class="lines">@@ -616,9 +616,7 @@
</span><span class="cx">             fn.apply(obj, args);
</span><span class="cx">         }&quot; threw object &quot;InvalidCharacterError (DOM Exception 5): The string conta...&quot; (&quot;InvalidCharacterError&quot;) expected object &quot;TypeError&quot; (&quot;TypeError&quot;)
</span><span class="cx"> PASS DOMImplementation interface: document.implementation must inherit property &quot;createDocument&quot; with the proper type (1) 
</span><del>-FAIL DOMImplementation interface: calling createDocument(DOMString,DOMString,DocumentType) on document.implementation with too few arguments must throw TypeError assert_throws: Called with 0 arguments function &quot;function () {
-            fn.apply(obj, args);
-        }&quot; did not throw
</del><ins>+PASS DOMImplementation interface: calling createDocument(DOMString,DOMString,DocumentType) on document.implementation with too few arguments must throw TypeError 
</ins><span class="cx"> PASS DOMImplementation interface: document.implementation must inherit property &quot;createHTMLDocument&quot; with the proper type (2) 
</span><span class="cx"> PASS DOMImplementation interface: calling createHTMLDocument(DOMString) on document.implementation with too few arguments must throw TypeError 
</span><span class="cx"> PASS DOMImplementation interface: document.implementation must inherit property &quot;hasFeature&quot; with the proper type (3) 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdomnodesDOMImplementationcreateDocumentexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/nodes/DOMImplementation-createDocument-expected.txt        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -358,6 +358,5 @@
</span><span class="cx"> PASS createDocument test 185: null,&quot;&quot;,DocumentType node 
</span><span class="cx"> PASS createDocument test 186: null,&quot;&quot;,DocumentType node 
</span><span class="cx"> PASS createDocument test 187: null,&quot;&quot;,DocumentType node 
</span><del>-FAIL createDocument with missing arguments assert_throws: createDocument() should throw function &quot;function () {
-    document.implementation.createDocument(...&quot; did not throw
</del><ins>+PASS createDocument with missing arguments 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestssvganimationssmilelementtargetcrashmainhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/svg/animations/smil-element-target-crash-main.html (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/svg/animations/smil-element-target-crash-main.html        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/LayoutTests/svg/animations/smil-element-target-crash-main.html        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -8,7 +8,7 @@
</span><span class="cx"> 
</span><span class="cx"> function crash()
</span><span class="cx"> {
</span><del>-    var doc = document.implementation.createDocument();
</del><ins>+    var doc = document.implementation.createDocument(null, &quot;test&quot;);
</ins><span class="cx">     doc.adoptNode(object1.contentDocument.getElementsByTagName(&quot;svg&quot;)[0]);
</span><span class="cx">     delete doc;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/Source/WebCore/ChangeLog        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -1,5 +1,26 @@
</span><span class="cx"> 2016-07-21  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        The 2 first parameters to DOMImplementation.createDocument() should be mandatory
+        https://bugs.webkit.org/show_bug.cgi?id=160030
+
+        Reviewed by Sam Weinig.
+
+        The 2 first parameters to DOMImplementation.createDocument() should be mandatory
+        as per the specification:
+        - https://dom.spec.whatwg.org/#domimplementation
+
+        Firefox and Chrome both agree with the specification. However, those
+        parameters were marked as optional in WebKit. Calling this function
+        without parameters would create a document element whose tag is the
+        string &quot;undefined&quot;, which does not seem helpful. This patch thus
+        aligns our behavior with the specification and other browsers.
+
+        No new tests, rebaselined existing tests.
+
+        * dom/DOMImplementation.idl:
+
+2016-07-21  Chris Dumez  &lt;cdumez@apple.com&gt;
+
</ins><span class="cx">         Kill legacy valueToStringWithNullCheck() utility function
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=159991
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoredomDOMImplementationidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/DOMImplementation.idl (203516 => 203517)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/DOMImplementation.idl        2016-07-21 18:40:00 UTC (rev 203516)
+++ trunk/Source/WebCore/dom/DOMImplementation.idl        2016-07-21 19:04:35 UTC (rev 203517)
</span><span class="lines">@@ -39,8 +39,7 @@
</span><span class="cx"> #else
</span><span class="cx">         XMLDocument
</span><span class="cx"> #endif
</span><del>-        // FIXME: Using &quot;undefined&quot; as default parameter value is wrong.
-        createDocument(optional DOMString? namespaceURI = null, [TreatNullAs=EmptyString] optional DOMString qualifiedName = &quot;undefined&quot;, optional DocumentType? doctype = null);
</del><ins>+    createDocument(DOMString? namespaceURI, [TreatNullAs=EmptyString] DOMString qualifiedName, optional DocumentType? doctype = null);
</ins><span class="cx"> 
</span><span class="cx">     // DOMImplementationCSS interface from DOM Level 2 CSS
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>