<!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>[199871] 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/199871">199871</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-04-21 23:19:41 -0700 (Thu, 21 Apr 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Drop [UsePointersEvenForNonNullableObjectArguments] from Document
https://bugs.webkit.org/show_bug.cgi?id=156881
Reviewed by Darin Adler.
LayoutTests/imported/w3c:
Rebaseline now that more checks are passing.
* web-platform-tests/dom/interfaces-expected.txt:
* web-platform-tests/html/dom/interfaces-expected.txt:
Source/WebCore:
Drop [UsePointersEvenForNonNullableObjectArguments] from Document. There
is no major Web-exposed behavior change but the type of the exception
being thrown when passing null or not enough parameters has changed for
some of the API (It is now always a TypeError as per the Web IDL
specification).
Tests: fast/dom/Document/adoptNode-null.html
fast/dom/Document/importNode-null.html
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::parserInsertBefore):
(WebCore::ContainerNode::parserAppendChild):
* dom/Document.cpp:
(WebCore::Document::importNode):
(WebCore::Document::adoptNode):
(WebCore::Document::createNodeIterator):
(WebCore::Document::createTreeWalker):
(WebCore::Document::setBodyOrFrameset):
(WebCore::Document::hasValidNamespaceForElements): Deleted.
(WebCore::Document::scheduleForcedStyleRecalc): Deleted.
(WebCore::Document::scheduleStyleRecalc): Deleted.
(WebCore::Document::unscheduleStyleRecalc): Deleted.
(WebCore::Document::hasPendingStyleRecalc): Deleted.
(WebCore::Document::hasPendingForcedStyleRecalc): Deleted.
(WebCore::Document::recalcStyle): Deleted.
(WebCore::Document::explicitClose): Deleted.
* dom/Document.h:
(WebCore::Document::importNode):
* dom/Document.idl:
* dom/NodeIterator.cpp:
(WebCore::NodeIterator::NodeIterator):
* dom/NodeIterator.h:
(WebCore::NodeIterator::create):
LayoutTests:
Add test cases for cases where the type of the exception being thrown
has changed.
* fast/dom/Document/adoptNode-null-expected.txt: Added.
* fast/dom/Document/adoptNode-null.html: Added.
* fast/dom/Document/importNode-null-expected.txt: Added.
* fast/dom/Document/importNode-null.html: Added.
* fast/dom/importNode-null-expected.txt: Removed.
* fast/dom/importNode-null.html: Removed.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</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="#trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorimportedw3cwebplatformtestshtmldominterfacesexpectedtxt">trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomContainerNodecpp">trunk/Source/WebCore/dom/ContainerNode.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomDocumentidl">trunk/Source/WebCore/dom/Document.idl</a></li>
<li><a href="#trunkSourceWebCoredomNodeIteratorcpp">trunk/Source/WebCore/dom/NodeIterator.cpp</a></li>
<li><a href="#trunkSourceWebCoredomNodeIteratorh">trunk/Source/WebCore/dom/NodeIterator.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomDocumentadoptNodenullexpectedtxt">trunk/LayoutTests/fast/dom/Document/adoptNode-null-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDocumentadoptNodenullhtml">trunk/LayoutTests/fast/dom/Document/adoptNode-null.html</a></li>
<li><a href="#trunkLayoutTestsfastdomDocumentimportNodenullexpectedtxt">trunk/LayoutTests/fast/dom/Document/importNode-null-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomDocumentimportNodenullhtml">trunk/LayoutTests/fast/dom/Document/importNode-null.html</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastdomimportNodenullexpectedtxt">trunk/LayoutTests/fast/dom/importNode-null-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastdomimportNodenullhtml">trunk/LayoutTests/fast/dom/importNode-null.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/LayoutTests/ChangeLog        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-04-21 Chris Dumez <cdumez@apple.com>
+
+ Drop [UsePointersEvenForNonNullableObjectArguments] from Document
+ https://bugs.webkit.org/show_bug.cgi?id=156881
+
+ Reviewed by Darin Adler.
+
+ Add test cases for cases where the type of the exception being thrown
+ has changed.
+
+ * fast/dom/Document/adoptNode-null-expected.txt: Added.
+ * fast/dom/Document/adoptNode-null.html: Added.
+ * fast/dom/Document/importNode-null-expected.txt: Added.
+ * fast/dom/Document/importNode-null.html: Added.
+ * fast/dom/importNode-null-expected.txt: Removed.
+ * fast/dom/importNode-null.html: Removed.
+
</ins><span class="cx"> 2016-04-21 Dean Jackson <dino@apple.com>
</span><span class="cx">
</span><span class="cx"> Backdrop Filter should not be visible if element has visibility:hidden
</span></span></pre></div>
<a id="trunkLayoutTestsfastdomDocumentadoptNodenullexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Document/adoptNode-null-expected.txt (0 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Document/adoptNode-null-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/dom/Document/adoptNode-null-expected.txt        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Tests that document.adoptNode(null) throws a TypeError
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.adoptNode(null) threw exception TypeError: Type error.
+PASS document.adoptNode() threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomDocumentadoptNodenullhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Document/adoptNode-null.html (0 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Document/adoptNode-null.html         (rev 0)
+++ trunk/LayoutTests/fast/dom/Document/adoptNode-null.html        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../../resources/js-test-pre.js"></script>
+<script>
+description("Tests that document.adoptNode(null) throws a TypeError");
+
+shouldThrow("document.adoptNode(null)", "'TypeError: Type error'");
+shouldThrow("document.adoptNode()", "'TypeError: Not enough arguments'");
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomDocumentimportNodenullexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Document/importNode-null-expected.txt (0 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Document/importNode-null-expected.txt         (rev 0)
+++ trunk/LayoutTests/fast/dom/Document/importNode-null-expected.txt        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -0,0 +1,11 @@
</span><ins>+Tests that document.importNode(null) throws a TypeError
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS document.importNode(null) threw exception TypeError: Type error.
+PASS document.importNode() threw exception TypeError: Not enough arguments.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomDocumentimportNodenullhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/dom/Document/importNode-null.html (0 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/Document/importNode-null.html         (rev 0)
+++ trunk/LayoutTests/fast/dom/Document/importNode-null.html        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<body>
+<script src="../../../resources/js-test-pre.js"></script>
+<script>
+description("Tests that document.importNode(null) throws a TypeError");
+
+shouldThrow("document.importNode(null)", "'TypeError: Type error'");
+shouldThrow("document.importNode()", "'TypeError: Not enough arguments'");
+</script>
+<script src="../../../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsfastdomimportNodenullexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/dom/importNode-null-expected.txt (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/importNode-null-expected.txt        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/LayoutTests/fast/dom/importNode-null-expected.txt        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -1,4 +0,0 @@
</span><del>-This page tests calling document.importNode(null). If it passes, you'll see a "PASS" message below.
-
-caught exception: Error: NotSupportedError: DOM Exception 9
-PASS: importNode(null) didn't crash
</del></span></pre></div>
<a id="trunkLayoutTestsfastdomimportNodenullhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/dom/importNode-null.html (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/dom/importNode-null.html        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/LayoutTests/fast/dom/importNode-null.html        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -1,35 +0,0 @@
</span><del>-<html>
-<head>
-<script>
-function print(message, color)
-{
- var paragraph = document.createElement("div");
- paragraph.appendChild(document.createTextNode(message));
- paragraph.style.fontFamily = "monospace";
- if (color)
- paragraph.style.color = color;
- document.getElementById("console").appendChild(paragraph);
-}
-
-function test()
-{
- if (window.testRunner)
- testRunner.dumpAsText();
-
- try {
- document.importNode(null);
- } catch(e) {
- print("caught exception: " + e);
- } finally {
- print("PASS: importNode(null) didn't crash", "green");
- }
-}
-</script>
-</head>
-<body onload="test();">
-<p>This page tests calling document.importNode(null). If it passes, you'll
- see a "PASS" message below.</p>
-<hr>
-<div id='console'></div>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-04-21 Chris Dumez <cdumez@apple.com>
+
+ Drop [UsePointersEvenForNonNullableObjectArguments] from Document
+ https://bugs.webkit.org/show_bug.cgi?id=156881
+
+ Reviewed by Darin Adler.
+
+ Rebaseline now that more checks are passing.
+
+ * web-platform-tests/dom/interfaces-expected.txt:
+ * web-platform-tests/html/dom/interfaces-expected.txt:
+
</ins><span class="cx"> 2016-04-21 Youenn Fablet <youenn.fablet@crf.canon.fr>
</span><span class="cx">
</span><span class="cx"> [Fetch API] Improve some fetch response streams tests
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsdominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/dom/interfaces-expected.txt        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -262,8 +262,8 @@
</span><span class="cx"> FAIL Document interface: operation createTextNode(DOMString) assert_equals: property has wrong .length expected 1 but got 0
</span><span class="cx"> FAIL Document interface: operation createComment(DOMString) assert_equals: property has wrong .length expected 1 but got 0
</span><span class="cx"> FAIL Document interface: operation createProcessingInstruction(DOMString,DOMString) assert_equals: property has wrong .length expected 2 but got 0
</span><del>-FAIL Document interface: operation importNode(Node,boolean) assert_equals: property has wrong .length expected 1 but got 0
-FAIL Document interface: operation adoptNode(Node) assert_equals: property has wrong .length expected 1 but got 0
</del><ins>+PASS Document interface: operation importNode(Node,boolean)
+PASS Document interface: operation adoptNode(Node)
</ins><span class="cx"> FAIL Document interface: operation createAttribute(DOMString) assert_equals: property has wrong .length expected 1 but got 0
</span><span class="cx"> FAIL Document interface: operation createAttributeNS(DOMString,DOMString) assert_equals: property has wrong .length expected 2 but got 0
</span><span class="cx"> FAIL Document interface: operation createEvent(DOMString) assert_equals: property has wrong .length expected 1 but got 0
</span><span class="lines">@@ -331,13 +331,9 @@
</span><span class="cx"> fn.apply(obj, args);
</span><span class="cx"> }" did not throw
</span><span class="cx"> PASS Document interface: xmlDoc must inherit property "importNode" with the proper type (20)
</span><del>-FAIL Document interface: calling importNode(Node,boolean) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" threw object "Error: NotSupportedError: DOM Exception 9" ("NotSupportedError") expected object "TypeError" ("TypeError")
</del><ins>+PASS Document interface: calling importNode(Node,boolean) on xmlDoc with too few arguments must throw TypeError
</ins><span class="cx"> PASS Document interface: xmlDoc must inherit property "adoptNode" with the proper type (21)
</span><del>-FAIL Document interface: calling adoptNode(Node) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" threw object "Error: NotSupportedError: DOM Exception 9" ("NotSupportedError") expected object "TypeError" ("TypeError")
</del><ins>+PASS Document interface: calling adoptNode(Node) on xmlDoc with too few arguments must throw TypeError
</ins><span class="cx"> PASS Document interface: xmlDoc must inherit property "createAttribute" with the proper type (22)
</span><span class="cx"> FAIL Document interface: calling createAttribute(DOMString) on xmlDoc with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
</span><span class="cx"> fn.apply(obj, args);
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestshtmldominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -167,13 +167,9 @@
</span><span class="cx"> fn.apply(obj, args);
</span><span class="cx"> }" did not throw
</span><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property "importNode" with the proper type (20)
</span><del>-FAIL Document interface: calling importNode(Node,boolean) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" threw object "Error: NotSupportedError: DOM Exception 9" ("NotSupportedError") expected object "TypeError" ("TypeError")
</del><ins>+PASS Document interface: calling importNode(Node,boolean) on iframe.contentDocument with too few arguments must throw TypeError
</ins><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property "adoptNode" with the proper type (21)
</span><del>-FAIL Document interface: calling adoptNode(Node) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" threw object "Error: NotSupportedError: DOM Exception 9" ("NotSupportedError") expected object "TypeError" ("TypeError")
</del><ins>+PASS Document interface: calling adoptNode(Node) on iframe.contentDocument with too few arguments must throw TypeError
</ins><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property "createAttribute" with the proper type (22)
</span><span class="cx"> FAIL Document interface: calling createAttribute(DOMString) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
</span><span class="cx"> fn.apply(obj, args);
</span><span class="lines">@@ -482,13 +478,9 @@
</span><span class="cx"> fn.apply(obj, args);
</span><span class="cx"> }" did not throw
</span><span class="cx"> PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "importNode" with the proper type (20)
</span><del>-FAIL Document interface: calling importNode(Node,boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" threw object "Error: NotSupportedError: DOM Exception 9" ("NotSupportedError") expected object "TypeError" ("TypeError")
</del><ins>+PASS Document interface: calling importNode(Node,boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError
</ins><span class="cx"> PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "adoptNode" with the proper type (21)
</span><del>-FAIL Document interface: calling adoptNode(Node) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" threw object "Error: NotSupportedError: DOM Exception 9" ("NotSupportedError") expected object "TypeError" ("TypeError")
</del><ins>+PASS Document interface: calling adoptNode(Node) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError
</ins><span class="cx"> PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "createAttribute" with the proper type (22)
</span><span class="cx"> FAIL Document interface: calling createAttribute(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
</span><span class="cx"> fn.apply(obj, args);
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorimportedw3cwebplatformtestshtmldominterfacesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/LayoutTests/platform/ios-simulator/imported/w3c/web-platform-tests/html/dom/interfaces-expected.txt        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -167,13 +167,9 @@
</span><span class="cx"> fn.apply(obj, args);
</span><span class="cx"> }" did not throw
</span><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property "importNode" with the proper type (20)
</span><del>-FAIL Document interface: calling importNode(Node,boolean) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" threw object "Error: NotSupportedError: DOM Exception 9" ("NotSupportedError") expected object "TypeError" ("TypeError")
</del><ins>+PASS Document interface: calling importNode(Node,boolean) on iframe.contentDocument with too few arguments must throw TypeError
</ins><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property "adoptNode" with the proper type (21)
</span><del>-FAIL Document interface: calling adoptNode(Node) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" threw object "Error: NotSupportedError: DOM Exception 9" ("NotSupportedError") expected object "TypeError" ("TypeError")
</del><ins>+PASS Document interface: calling adoptNode(Node) on iframe.contentDocument with too few arguments must throw TypeError
</ins><span class="cx"> PASS Document interface: iframe.contentDocument must inherit property "createAttribute" with the proper type (22)
</span><span class="cx"> FAIL Document interface: calling createAttribute(DOMString) on iframe.contentDocument with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
</span><span class="cx"> fn.apply(obj, args);
</span><span class="lines">@@ -482,13 +478,9 @@
</span><span class="cx"> fn.apply(obj, args);
</span><span class="cx"> }" did not throw
</span><span class="cx"> PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "importNode" with the proper type (20)
</span><del>-FAIL Document interface: calling importNode(Node,boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" threw object "Error: NotSupportedError: DOM Exception 9" ("NotSupportedError") expected object "TypeError" ("TypeError")
</del><ins>+PASS Document interface: calling importNode(Node,boolean) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError
</ins><span class="cx"> PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "adoptNode" with the proper type (21)
</span><del>-FAIL Document interface: calling adoptNode(Node) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
- fn.apply(obj, args);
- }" threw object "Error: NotSupportedError: DOM Exception 9" ("NotSupportedError") expected object "TypeError" ("TypeError")
</del><ins>+PASS Document interface: calling adoptNode(Node) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError
</ins><span class="cx"> PASS Document interface: document.implementation.createDocument(null, "", null) must inherit property "createAttribute" with the proper type (22)
</span><span class="cx"> FAIL Document interface: calling createAttribute(DOMString) on document.implementation.createDocument(null, "", null) with too few arguments must throw TypeError assert_throws: Called with 0 arguments function "function () {
</span><span class="cx"> fn.apply(obj, args);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/Source/WebCore/ChangeLog        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2016-04-21 Chris Dumez <cdumez@apple.com>
+
+ Drop [UsePointersEvenForNonNullableObjectArguments] from Document
+ https://bugs.webkit.org/show_bug.cgi?id=156881
+
+ Reviewed by Darin Adler.
+
+ Drop [UsePointersEvenForNonNullableObjectArguments] from Document. There
+ is no major Web-exposed behavior change but the type of the exception
+ being thrown when passing null or not enough parameters has changed for
+ some of the API (It is now always a TypeError as per the Web IDL
+ specification).
+
+ Tests: fast/dom/Document/adoptNode-null.html
+ fast/dom/Document/importNode-null.html
+
+ * dom/ContainerNode.cpp:
+ (WebCore::ContainerNode::takeAllChildrenFrom):
+ (WebCore::ContainerNode::parserInsertBefore):
+ (WebCore::ContainerNode::parserAppendChild):
+ * dom/Document.cpp:
+ (WebCore::Document::importNode):
+ (WebCore::Document::adoptNode):
+ (WebCore::Document::createNodeIterator):
+ (WebCore::Document::createTreeWalker):
+ (WebCore::Document::setBodyOrFrameset):
+ (WebCore::Document::hasValidNamespaceForElements): Deleted.
+ (WebCore::Document::scheduleForcedStyleRecalc): Deleted.
+ (WebCore::Document::scheduleStyleRecalc): Deleted.
+ (WebCore::Document::unscheduleStyleRecalc): Deleted.
+ (WebCore::Document::hasPendingStyleRecalc): Deleted.
+ (WebCore::Document::hasPendingForcedStyleRecalc): Deleted.
+ (WebCore::Document::recalcStyle): Deleted.
+ (WebCore::Document::explicitClose): Deleted.
+ * dom/Document.h:
+ (WebCore::Document::importNode):
+ * dom/Document.idl:
+ * dom/NodeIterator.cpp:
+ (WebCore::NodeIterator::NodeIterator):
+ * dom/NodeIterator.h:
+ (WebCore::NodeIterator::create):
+
</ins><span class="cx"> 2016-04-21 Frederic Wang <fwang@igalia.com>
</span><span class="cx">
</span><span class="cx"> More improvements and explanations regarding resetting CSS properties on the <math> element
</span></span></pre></div>
<a id="trunkSourceWebCoredomContainerNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ContainerNode.cpp (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ContainerNode.cpp        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/Source/WebCore/dom/ContainerNode.cpp        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> destroyRenderTreeIfNeeded(child);
</span><span class="cx">
</span><span class="cx"> // FIXME: We need a no mutation event version of adoptNode.
</span><del>- RefPtr<Node> adoptedChild = document().adoptNode(&child.get(), ASSERT_NO_EXCEPTION);
</del><ins>+ RefPtr<Node> adoptedChild = document().adoptNode(child, ASSERT_NO_EXCEPTION);
</ins><span class="cx"> parserAppendChild(*adoptedChild);
</span><span class="cx"> // FIXME: Together with adoptNode above, the tree scope might get updated recursively twice
</span><span class="cx"> // (if the document changed or oldParent was in a shadow tree, AND *this is in a shadow tree).
</span><span class="lines">@@ -376,7 +376,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (&document() != &newChild->document())
</span><del>- document().adoptNode(newChild.ptr(), ASSERT_NO_EXCEPTION);
</del><ins>+ document().adoptNode(newChild, ASSERT_NO_EXCEPTION);
</ins><span class="cx">
</span><span class="cx"> insertBeforeCommon(nextChild, newChild);
</span><span class="cx">
</span><span class="lines">@@ -718,7 +718,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> if (&document() != &newChild->document())
</span><del>- document().adoptNode(newChild.ptr(), ASSERT_NO_EXCEPTION);
</del><ins>+ document().adoptNode(newChild, ASSERT_NO_EXCEPTION);
</ins><span class="cx">
</span><span class="cx"> {
</span><span class="cx"> NoEventDispatchAssertion assertNoEventDispatch;
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/Source/WebCore/dom/Document.cpp        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -992,16 +992,11 @@
</span><span class="cx"> return *propertySet->ensureCSSStyleDeclaration();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionCode& ec)
</del><ins>+RefPtr<Node> Document::importNode(Node& nodeToImport, bool deep, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!importedNode) {
- ec = NOT_SUPPORTED_ERR;
- return nullptr;
- }
-
- switch (importedNode->nodeType()) {
</del><ins>+ switch (nodeToImport.nodeType()) {
</ins><span class="cx"> case DOCUMENT_FRAGMENT_NODE:
</span><del>- if (importedNode->isShadowRoot())
</del><ins>+ if (nodeToImport.isShadowRoot())
</ins><span class="cx"> break;
</span><span class="cx"> FALLTHROUGH;
</span><span class="cx"> case ELEMENT_NODE:
</span><span class="lines">@@ -1009,11 +1004,11 @@
</span><span class="cx"> case CDATA_SECTION_NODE:
</span><span class="cx"> case PROCESSING_INSTRUCTION_NODE:
</span><span class="cx"> case COMMENT_NODE:
</span><del>- return importedNode->cloneNodeInternal(document(), deep ? CloningOperation::Everything : CloningOperation::OnlySelf);
</del><ins>+ return nodeToImport.cloneNodeInternal(document(), deep ? CloningOperation::Everything : CloningOperation::OnlySelf);
</ins><span class="cx">
</span><span class="cx"> case ATTRIBUTE_NODE:
</span><span class="cx"> // FIXME: This will "Attr::normalize" child nodes of Attr.
</span><del>- return Attr::create(*this, QualifiedName(nullAtom, downcast<Attr>(*importedNode).name(), nullAtom), downcast<Attr>(*importedNode).value());
</del><ins>+ return Attr::create(*this, QualifiedName(nullAtom, downcast<Attr>(nodeToImport).name(), nullAtom), downcast<Attr>(nodeToImport).value());
</ins><span class="cx">
</span><span class="cx"> case DOCUMENT_NODE: // Can't import a document into another document.
</span><span class="cx"> case DOCUMENT_TYPE_NODE: // FIXME: Support cloning a DocumentType node per DOM4.
</span><span class="lines">@@ -1025,48 +1020,43 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx">
</span><del>-RefPtr<Node> Document::adoptNode(Node* source, ExceptionCode& ec)
</del><ins>+RefPtr<Node> Document::adoptNode(Node& source, ExceptionCode& ec)
</ins><span class="cx"> {
</span><del>- if (!source) {
- ec = NOT_SUPPORTED_ERR;
- return nullptr;
- }
-
</del><span class="cx"> EventQueueScope scope;
</span><span class="cx">
</span><del>- switch (source->nodeType()) {
</del><ins>+ switch (source.nodeType()) {
</ins><span class="cx"> case DOCUMENT_NODE:
</span><span class="cx"> ec = NOT_SUPPORTED_ERR;
</span><span class="cx"> return nullptr;
</span><span class="cx"> case ATTRIBUTE_NODE: {
</span><del>- Attr& attr = downcast<Attr>(*source);
</del><ins>+ auto& attr = downcast<Attr>(source);
</ins><span class="cx"> if (attr.ownerElement())
</span><span class="cx"> attr.ownerElement()->removeAttributeNode(&attr, ec);
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> default:
</span><del>- if (source->isShadowRoot()) {
</del><ins>+ if (source.isShadowRoot()) {
</ins><span class="cx"> // ShadowRoot cannot disconnect itself from the host node.
</span><span class="cx"> ec = HIERARCHY_REQUEST_ERR;
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><del>- if (is<HTMLFrameOwnerElement>(*source)) {
- HTMLFrameOwnerElement& frameOwnerElement = downcast<HTMLFrameOwnerElement>(*source);
</del><ins>+ if (is<HTMLFrameOwnerElement>(source)) {
+ auto& frameOwnerElement = downcast<HTMLFrameOwnerElement>(source);
</ins><span class="cx"> if (frame() && frame()->tree().isDescendantOf(frameOwnerElement.contentFrame())) {
</span><span class="cx"> ec = HIERARCHY_REQUEST_ERR;
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- if (source->parentNode()) {
- source->parentNode()->removeChild(*source, ec);
</del><ins>+ if (source.parentNode()) {
+ source.parentNode()->removeChild(source, ec);
</ins><span class="cx"> if (ec)
</span><span class="cx"> return nullptr;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- adoptIfNeeded(source);
</del><ins>+ adoptIfNeeded(&source);
</ins><span class="cx">
</span><del>- return source;
</del><ins>+ return &source;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool Document::hasValidNamespaceForElements(const QualifiedName& qName)
</span><span class="lines">@@ -1778,54 +1768,16 @@
</span><span class="cx"> return Range::create(*this);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<NodeIterator> Document::createNodeIterator(Node* root, unsigned long whatToShow, RefPtr<NodeFilter>&& filter, bool, ExceptionCode& ec)
</del><ins>+Ref<NodeIterator> Document::createNodeIterator(Node& root, unsigned long whatToShow, RefPtr<NodeFilter>&& filter, bool)
</ins><span class="cx"> {
</span><del>- return createNodeIterator(root, whatToShow, WTFMove(filter), ec);
-}
-
-RefPtr<NodeIterator> Document::createNodeIterator(Node* root, unsigned long whatToShow, RefPtr<NodeFilter>&& filter, ExceptionCode& ec)
-{
- if (!root) {
- ec = TypeError;
- return nullptr;
- }
</del><span class="cx"> return NodeIterator::create(root, whatToShow, WTFMove(filter));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<NodeIterator> Document::createNodeIterator(Node* root, unsigned long whatToShow, ExceptionCode& ec)
</del><ins>+Ref<TreeWalker> Document::createTreeWalker(Node& root, unsigned long whatToShow, RefPtr<NodeFilter>&& filter, bool)
</ins><span class="cx"> {
</span><del>- return createNodeIterator(root, whatToShow, nullptr, ec);
</del><ins>+ return TreeWalker::create(root, whatToShow, WTFMove(filter));
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-RefPtr<NodeIterator> Document::createNodeIterator(Node* root, ExceptionCode& ec)
-{
- return createNodeIterator(root, 0xFFFFFFFF, nullptr, ec);
-}
-
-RefPtr<TreeWalker> Document::createTreeWalker(Node* root, unsigned long whatToShow, RefPtr<NodeFilter>&& filter, bool, ExceptionCode& ec)
-{
- return createTreeWalker(root, whatToShow, WTFMove(filter), ec);
-}
-
-RefPtr<TreeWalker> Document::createTreeWalker(Node* root, unsigned long whatToShow, RefPtr<NodeFilter>&& filter, ExceptionCode& ec)
-{
- if (!root) {
- ec = TypeError;
- return nullptr;
- }
- return TreeWalker::create(*root, whatToShow, WTFMove(filter));
-}
-
-RefPtr<TreeWalker> Document::createTreeWalker(Node* root, unsigned long whatToShow, ExceptionCode& ec)
-{
- return createTreeWalker(root, whatToShow, nullptr, ec);
-}
-
-RefPtr<TreeWalker> Document::createTreeWalker(Node* root, ExceptionCode& ec)
-{
- return createTreeWalker(root, 0xFFFFFFFF, nullptr, ec);
-}
-
</del><span class="cx"> void Document::scheduleForcedStyleRecalc()
</span><span class="cx"> {
</span><span class="cx"> m_pendingStyleRecalcShouldForce = true;
</span><span class="lines">@@ -2680,7 +2632,7 @@
</span><span class="cx">
</span><span class="cx"> if (&newBody->document() != this) {
</span><span class="cx"> ec = 0;
</span><del>- RefPtr<Node> node = importNode(newBody.get(), true, ec);
</del><ins>+ RefPtr<Node> node = importNode(*newBody, true, ec);
</ins><span class="cx"> if (ec)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/Source/WebCore/dom/Document.h        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -388,8 +388,8 @@
</span><span class="cx"> RefPtr<Attr> createAttribute(const String& name, ExceptionCode&);
</span><span class="cx"> RefPtr<Attr> createAttributeNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode&, bool shouldIgnoreNamespaceChecks = false);
</span><span class="cx"> RefPtr<EntityReference> createEntityReference(const String& name, ExceptionCode&);
</span><del>- RefPtr<Node> importNode(Node* importedNode, ExceptionCode& ec) { return importNode(importedNode, false, ec); }
- RefPtr<Node> importNode(Node* importedNode, bool deep, ExceptionCode&);
</del><ins>+ RefPtr<Node> importNode(Node& nodeToImport, ExceptionCode& ec) { return importNode(nodeToImport, false, ec); }
+ RefPtr<Node> importNode(Node& nodeToImport, bool deep, ExceptionCode&);
</ins><span class="cx"> WEBCORE_EXPORT RefPtr<Element> createElementNS(const String& namespaceURI, const String& qualifiedName, ExceptionCode&);
</span><span class="cx"> WEBCORE_EXPORT Ref<Element> createElement(const QualifiedName&, bool createdByParser);
</span><span class="cx">
</span><span class="lines">@@ -458,7 +458,7 @@
</span><span class="cx"> void setTimerThrottlingEnabled(bool);
</span><span class="cx"> bool isTimerThrottlingEnabled() const { return m_isTimerThrottlingEnabled; }
</span><span class="cx">
</span><del>- RefPtr<Node> adoptNode(Node* source, ExceptionCode&);
</del><ins>+ RefPtr<Node> adoptNode(Node& source, ExceptionCode&);
</ins><span class="cx">
</span><span class="cx"> Ref<HTMLCollection> images();
</span><span class="cx"> Ref<HTMLCollection> embeds();
</span><span class="lines">@@ -548,15 +548,11 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT Ref<Range> createRange();
</span><span class="cx">
</span><del>- RefPtr<NodeIterator> createNodeIterator(Node* root, unsigned long whatToShow, RefPtr<NodeFilter>&&, bool, ExceptionCode&); // For ObjC bindings.
- RefPtr<NodeIterator> createNodeIterator(Node* root, unsigned long whatToShow, RefPtr<NodeFilter>&&, ExceptionCode&);
- RefPtr<NodeIterator> createNodeIterator(Node* root, unsigned long whatToShow, ExceptionCode&);
- RefPtr<NodeIterator> createNodeIterator(Node* root, ExceptionCode&);
</del><ins>+ // The last bool parameter is for ObjC bindings.
+ Ref<NodeIterator> createNodeIterator(Node& root, unsigned long whatToShow = 0xFFFFFFFF, RefPtr<NodeFilter>&& = nullptr, bool = false);
</ins><span class="cx">
</span><del>- RefPtr<TreeWalker> createTreeWalker(Node* root, unsigned long whatToShow, RefPtr<NodeFilter>&&, bool, ExceptionCode&); // For ObjC bindings.
- RefPtr<TreeWalker> createTreeWalker(Node* root, unsigned long whatToShow, RefPtr<NodeFilter>&&, ExceptionCode&);
- RefPtr<TreeWalker> createTreeWalker(Node* root, unsigned long whatToShow, ExceptionCode&);
- RefPtr<TreeWalker> createTreeWalker(Node* root, ExceptionCode&);
</del><ins>+ // The last bool parameter is for ObjC bindings.
+ Ref<TreeWalker> createTreeWalker(Node& root, unsigned long whatToShow = 0xFFFFFFFF, RefPtr<NodeFilter>&& = nullptr, bool = false);
</ins><span class="cx">
</span><span class="cx"> // Special support for editing
</span><span class="cx"> Ref<CSSStyleDeclaration> createCSSStyleDeclaration();
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.idl (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.idl        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/Source/WebCore/dom/Document.idl        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -22,16 +22,15 @@
</span><span class="cx"> Constructor,
</span><span class="cx"> ConstructorCallWith=ScriptExecutionContext,
</span><span class="cx"> CustomToJSObject,
</span><del>- UsePointersEvenForNonNullableObjectArguments,
</del><span class="cx"> JSCustomHeader,
</span><span class="cx"> JSGenerateToNativeObject,
</span><span class="cx"> ExportMacro=WEBCORE_EXPORT,
</span><span class="cx"> ] interface Document : Node {
</span><span class="cx">
</span><span class="cx"> // DOM Level 1 Core
</span><del>- readonly attribute DocumentType doctype;
</del><ins>+ readonly attribute DocumentType? doctype;
</ins><span class="cx"> readonly attribute DOMImplementation implementation;
</span><del>- readonly attribute Element documentElement;
</del><ins>+ readonly attribute Element? documentElement;
</ins><span class="cx">
</span><span class="cx"> [NewObject, RaisesException, ImplementedAs=createElementForBindings] Element createElement(DOMString tagName);
</span><span class="cx"> [NewObject] DocumentFragment createDocumentFragment();
</span><span class="lines">@@ -54,8 +53,7 @@
</span><span class="cx">
</span><span class="cx"> // Introduced in DOM Level 2:
</span><span class="cx">
</span><del>- [ObjCLegacyUnnamedParameters, NewObject, RaisesException] Node importNode([Default=Undefined] optional Node importedNode,
- optional boolean deep);
</del><ins>+ [ObjCLegacyUnnamedParameters, NewObject, RaisesException] Node importNode(Node importedNode, optional boolean deep);
</ins><span class="cx">
</span><span class="cx"> // FIXME: 'qualifiedName' should not have [TreatNullAs=EmptyString].
</span><span class="cx"> [ObjCLegacyUnnamedParameters, NewObject, RaisesException] Element createElementNS([Default=Undefined] optional DOMString? namespaceURI,
</span><span class="lines">@@ -79,7 +77,7 @@
</span><span class="cx"> [SetterRaisesException] attribute DOMString? xmlVersion;
</span><span class="cx"> [SetterRaisesException] attribute boolean xmlStandalone;
</span><span class="cx">
</span><del>- [RaisesException] Node adoptNode([Default=Undefined] optional Node source);
</del><ins>+ [RaisesException] Node adoptNode(Node source);
</ins><span class="cx">
</span><span class="cx"> #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C || defined(LANGUAGE_GOBJECT) && LANGUAGE_GOBJECT
</span><span class="cx"> // document.documentURI was writable in DOM3 Core, but is read-only in DOM4
</span><span class="lines">@@ -102,19 +100,19 @@
</span><span class="cx"> // DOM Level 2 Tranversal and Range (DocumentTraversal interface)
</span><span class="cx">
</span><span class="cx"> #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C || defined(LANGUAGE_GOBJECT) && LANGUAGE_GOBJECT
</span><del>- [ObjCLegacyUnnamedParameters, RaisesException] NodeIterator createNodeIterator(Node root,
</del><ins>+ [ObjCLegacyUnnamedParameters] NodeIterator createNodeIterator(Node root,
</ins><span class="cx"> optional unsigned long whatToShow = 0xFFFFFFFF,
</span><span class="cx"> optional NodeFilter? filter,
</span><span class="cx"> optional boolean expandEntityReferences);
</span><del>- [ObjCLegacyUnnamedParameters, RaisesException] TreeWalker createTreeWalker(Node root,
</del><ins>+ [ObjCLegacyUnnamedParameters] TreeWalker createTreeWalker(Node root,
</ins><span class="cx"> optional unsigned long whatToShow = 0xFFFFFFFF,
</span><span class="cx"> optional NodeFilter? filter,
</span><span class="cx"> optional boolean expandEntityReferences);
</span><span class="cx"> #else
</span><del>- [RaisesException, NewObject] NodeIterator createNodeIterator(Node root,
</del><ins>+ [NewObject] NodeIterator createNodeIterator(Node root,
</ins><span class="cx"> optional unsigned long whatToShow = 0xFFFFFFFF,
</span><span class="cx"> optional NodeFilter? filter);
</span><del>- [RaisesException, NewObject] TreeWalker createTreeWalker(Node root,
</del><ins>+ [NewObject] TreeWalker createTreeWalker(Node root,
</ins><span class="cx"> optional unsigned long whatToShow = 0xFFFFFFFF,
</span><span class="cx"> optional NodeFilter? filter);
</span><span class="cx"> #endif
</span><span class="lines">@@ -129,20 +127,20 @@
</span><span class="cx">
</span><span class="cx"> // DOM Level 2 Style (DocumentCSS interface)
</span><span class="cx">
</span><del>- [ObjCLegacyUnnamedParameters] CSSStyleDeclaration getOverrideStyle([Default=Undefined] optional Element element,
</del><ins>+ [ObjCLegacyUnnamedParameters] CSSStyleDeclaration getOverrideStyle([Default=Undefined] optional Element? element,
</ins><span class="cx"> [Default=Undefined] optional DOMString pseudoElement);
</span><span class="cx">
</span><span class="cx"> readonly attribute DOMString contentType;
</span><span class="cx">
</span><span class="cx"> // DOM Level 3 XPath (XPathEvaluator interface)
</span><span class="cx"> [ObjCLegacyUnnamedParameters, RaisesException] XPathExpression createExpression([Default=Undefined] optional DOMString expression,
</span><del>- [Default=Undefined] optional XPathNSResolver resolver);
- XPathNSResolver createNSResolver(Node nodeResolver);
</del><ins>+ [Default=Undefined] optional XPathNSResolver? resolver);
+ XPathNSResolver createNSResolver(Node? nodeResolver);
</ins><span class="cx"> [ObjCLegacyUnnamedParameters, RaisesException] XPathResult evaluate([Default=Undefined] optional DOMString expression,
</span><del>- [Default=Undefined] optional Node contextNode,
- [Default=Undefined] optional XPathNSResolver resolver,
</del><ins>+ [Default=Undefined] optional Node? contextNode,
+ [Default=Undefined] optional XPathNSResolver? resolver,
</ins><span class="cx"> [Default=Undefined] optional unsigned short type,
</span><del>- [Default=Undefined] optional XPathResult inResult);
</del><ins>+ [Default=Undefined] optional XPathResult? inResult);
</ins><span class="cx">
</span><span class="cx"> // Common extensions
</span><span class="cx"> boolean execCommand([Default=Undefined] optional DOMString command,
</span><span class="lines">@@ -179,9 +177,9 @@
</span><span class="cx"> // FIXME: Should not have [TreatNullAs=EmptyString].
</span><span class="cx"> [TreatNullAs=EmptyString, GetterRaisesException, SetterRaisesException] attribute DOMString cookie;
</span><span class="cx">
</span><del>- [SetterRaisesException, ImplementedAs=bodyOrFrameset, StrictTypeChecking] attribute HTMLElement body;
</del><ins>+ [SetterRaisesException, ImplementedAs=bodyOrFrameset, StrictTypeChecking] attribute HTMLElement? body;
</ins><span class="cx">
</span><del>- readonly attribute HTMLHeadElement head;
</del><ins>+ readonly attribute HTMLHeadElement? head;
</ins><span class="cx"> readonly attribute HTMLCollection images;
</span><span class="cx"> readonly attribute HTMLCollection applets;
</span><span class="cx"> readonly attribute HTMLCollection links;
</span><span class="lines">@@ -227,14 +225,14 @@
</span><span class="cx">
</span><span class="cx"> #if defined(LANGUAGE_OBJECTIVE_C) && LANGUAGE_OBJECTIVE_C
</span><span class="cx"> // DOM Level 2 Style Interface
</span><del>- [ObjCLegacyUnnamedParameters, ObjCUseDefaultView] CSSStyleDeclaration getComputedStyle(Element element,
</del><ins>+ [ObjCLegacyUnnamedParameters, ObjCUseDefaultView] CSSStyleDeclaration getComputedStyle(Element? element,
</ins><span class="cx"> DOMString pseudoElement);
</span><span class="cx">
</span><span class="cx"> // WebKit extension
</span><span class="cx"> // FIXME: remove the first version once optional is implemented for Objective-C.
</span><del>- [ObjCUseDefaultView] CSSRuleList getMatchedCSSRules(Element element,
</del><ins>+ [ObjCUseDefaultView] CSSRuleList getMatchedCSSRules(Element? element,
</ins><span class="cx"> DOMString pseudoElement);
</span><del>- [ObjCUseDefaultView] CSSRuleList getMatchedCSSRules(Element element,
</del><ins>+ [ObjCUseDefaultView] CSSRuleList getMatchedCSSRules(Element? element,
</ins><span class="cx"> DOMString pseudoElement,
</span><span class="cx"> optional boolean authorOnly);
</span><span class="cx">
</span><span class="lines">@@ -251,7 +249,7 @@
</span><span class="cx"> HTMLCollection getElementsByClassName([Default=Undefined] optional DOMString classNames);
</span><span class="cx"> #endif
</span><span class="cx">
</span><del>- readonly attribute Element activeElement;
</del><ins>+ readonly attribute Element? activeElement;
</ins><span class="cx"> boolean hasFocus();
</span><span class="cx">
</span><span class="cx"> readonly attribute DOMString compatMode;
</span><span class="lines">@@ -265,12 +263,12 @@
</span><span class="cx">
</span><span class="cx"> // W3C version
</span><span class="cx"> readonly attribute boolean webkitFullscreenEnabled;
</span><del>- readonly attribute Element webkitFullscreenElement;
</del><ins>+ readonly attribute Element? webkitFullscreenElement;
</ins><span class="cx"> void webkitExitFullscreen();
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> [Conditional=POINTER_LOCK] void exitPointerLock();
</span><del>- [Conditional=POINTER_LOCK] readonly attribute Element pointerLockElement;
</del><ins>+ [Conditional=POINTER_LOCK] readonly attribute Element? pointerLockElement;
</ins><span class="cx">
</span><span class="cx"> [Conditional=CSS_REGIONS] DOMNamedFlowCollection webkitGetNamedFlows();
</span><span class="cx">
</span><span class="lines">@@ -281,8 +279,8 @@
</span><span class="cx"> #if defined(ENABLE_IOS_TOUCH_EVENTS) && ENABLE_IOS_TOUCH_EVENTS
</span><span class="cx"> #include <WebKitAdditions/DocumentIOS.idl>
</span><span class="cx"> #elif defined(ENABLE_TOUCH_EVENTS) && ENABLE_TOUCH_EVENTS
</span><del>- [NewObject, RaisesException] Touch createTouch([Default=Undefined] optional DOMWindow window,
- [Default=Undefined] optional EventTarget target,
</del><ins>+ [NewObject, RaisesException] Touch createTouch([Default=Undefined] optional DOMWindow? window,
+ [Default=Undefined] optional EventTarget? target,
</ins><span class="cx"> [Default=Undefined] optional long identifier,
</span><span class="cx"> [Default=Undefined] optional long pageX,
</span><span class="cx"> [Default=Undefined] optional long pageY,
</span><span class="lines">@@ -305,13 +303,13 @@
</span><span class="cx"> readonly attribute boolean hidden;
</span><span class="cx">
</span><span class="cx"> // currentscript API: http://www.whatwg.org/specs/web-apps/current-work/multipage/dom.html#dom-document-currentscript
</span><del>- readonly attribute HTMLScriptElement currentScript;
</del><ins>+ readonly attribute HTMLScriptElement? currentScript;
</ins><span class="cx">
</span><span class="cx"> // http://www.w3.org/TR/2014/WD-dom-20140204/#dom-document-origin
</span><span class="cx"> readonly attribute DOMString origin;
</span><span class="cx">
</span><span class="cx"> // http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement
</span><del>- readonly attribute Element scrollingElement;
</del><ins>+ readonly attribute Element? scrollingElement;
</ins><span class="cx">
</span><span class="cx">
</span><span class="cx"> // Event Handlers
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeIteratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NodeIterator.cpp (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NodeIterator.cpp        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/Source/WebCore/dom/NodeIterator.cpp        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -76,8 +76,8 @@
</span><span class="cx"> return node;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-NodeIterator::NodeIterator(Node* rootNode, unsigned long whatToShow, RefPtr<NodeFilter>&& filter)
- : NodeIteratorBase(*rootNode, whatToShow, WTFMove(filter))
</del><ins>+NodeIterator::NodeIterator(Node& rootNode, unsigned long whatToShow, RefPtr<NodeFilter>&& filter)
+ : NodeIteratorBase(rootNode, whatToShow, WTFMove(filter))
</ins><span class="cx"> , m_referenceNode(root(), true)
</span><span class="cx"> {
</span><span class="cx"> root()->document().attachNodeIterator(this);
</span></span></pre></div>
<a id="trunkSourceWebCoredomNodeIteratorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/NodeIterator.h (199870 => 199871)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/NodeIterator.h        2016-04-22 06:07:32 UTC (rev 199870)
+++ trunk/Source/WebCore/dom/NodeIterator.h        2016-04-22 06:19:41 UTC (rev 199871)
</span><span class="lines">@@ -36,7 +36,7 @@
</span><span class="cx">
</span><span class="cx"> class NodeIterator : public ScriptWrappable, public RefCounted<NodeIterator>, public NodeIteratorBase {
</span><span class="cx"> public:
</span><del>- static Ref<NodeIterator> create(Node* rootNode, unsigned long whatToShow, RefPtr<NodeFilter>&& filter)
</del><ins>+ static Ref<NodeIterator> create(Node& rootNode, unsigned long whatToShow, RefPtr<NodeFilter>&& filter)
</ins><span class="cx"> {
</span><span class="cx"> return adoptRef(*new NodeIterator(rootNode, whatToShow, WTFMove(filter)));
</span><span class="cx"> }
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx"> void nodeWillBeRemoved(Node&);
</span><span class="cx">
</span><span class="cx"> private:
</span><del>- NodeIterator(Node*, unsigned long whatToShow, RefPtr<NodeFilter>&&);
</del><ins>+ NodeIterator(Node&, unsigned long whatToShow, RefPtr<NodeFilter>&&);
</ins><span class="cx">
</span><span class="cx"> struct NodePointer {
</span><span class="cx"> RefPtr<Node> node;
</span></span></pre>
</div>
</div>
</body>
</html>