<!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>[200246] 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/200246">200246</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-04-29 09:51:58 -0700 (Fri, 29 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Web IDL] Specify default values for optional parameters of wrapper types
https://bugs.webkit.org/show_bug.cgi?id=157161

Reviewed by Darin Adler.

Source/WebCore:

Specify default values for optional parameters of wrapper types.

* Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::count): Deleted.
* Modules/indexeddb/IDBIndex.h:
* Modules/indexeddb/IDBIndex.idl:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::count): Deleted.
* Modules/indexeddb/IDBObjectStore.h:
* Modules/indexeddb/IDBObjectStore.idl:
* Modules/mediastream/RTCPeerConnection.cpp:
(WebCore::RTCPeerConnection::createDataChannel): Deleted.
* Modules/mediastream/RTCPeerConnection.h:
* Modules/mediastream/RTCPeerConnection.idl:

* bindings/scripts/CodeGeneratorJS.pm:
(WillConvertUndefinedToDefaultParameterValue):
Optimization to avoid generating a ternary if the default
value of a wrapper type parameter is null, since undefined
will already convert to null for those.

(GenerateParametersCheck):
Use null as implicit default value for nullable parameters, given that Web IDL
converts undefined to null for such parameters:
http://heycam.github.io/webidl/#es-nullable-type

(CanUseWTFOptionalForParameter):
Drop the check for wrapper types.

* bindings/scripts/test/*:
Improve bindings tests coverage / rebaseline.

* css/MediaQueryList.idl:
* css/MediaQueryListListener.idl:
* dom/Document.idl:

* html/canvas/DOMPath.idl:
The previous syntax was working because the bindings was generating an early
return if addPath() was called with only one parameter, calling the
implementation method with only 1 parameter. However, since we no longer
generate early returns for optional parameters, we now have to use a slightly
different syntax to maintain the previous behavior. This is only temporary,
I just did not want to deal with SVG tear off types in this patch since they
are very special in the bindings generator.

* page/DOMSelection.idl:
The node parameter to extend() was confusingly marked as optional. However,
when omitted, it would get translated into null, which would throw an
exception since the type is not nullable. Since the specification says 'node'
should not be optional, and since there is no behavior change, I dropped
the 'optional'. The only web-exposed difference is the message provided with
the TypeError that is thrown when called without enough parameters. The new
message is more accurate (see rebaselined layout test).

* svg/SVGMarkerElement.idl:
The parameter for setOrientToAngle() was confusingly marked as optional and
having a default value of null. However, the bindings would throw a TypeError
if called with no parameters or when calling it with null. This is because
this is an SVG Tear off type and the bindings always throw when passing null
for an SVG Tear off type. I therefore updated the IDL to reflect the actual
behavior (no actual behavior change). The new IDL also now matches the spec:
http://www.w3.org/TR/SVG2/painting.html#InterfaceSVGMarkerElement

* svg/SVGSVGElement.idl:
Same comments as for SVGMarkerElement. The new IDL matches the actual
behavior and is closer to the specification. I added FIXME comments for when
it does not match the specification:
http://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSVGElement
I did not change web-exposed behavior in this patch.

* svg/SVGTextContentElement.idl:
Same as above. No actual behavior change.

* testing/Internals.cpp:
* testing/Internals.h:
* testing/Internals.idl:
* xml/XPathEvaluator.idl:

LayoutTests:

Rebaseline as a different exception message is now given when calling
Selection.extend() without enough parameters.

* editing/selection/extend-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestseditingselectionextendexpectedtxt">trunk/LayoutTests/editing/selection/extend-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexcpp">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexh">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBIndexidl">trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreh">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl">trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectioncpp">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectionh">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h</a></li>
<li><a href="#trunkSourceWebCoreModulesmediastreamRTCPeerConnectionidl">trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjh">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestObjmm">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#trunkSourceWebCorecssMediaQueryListidl">trunk/Source/WebCore/css/MediaQueryList.idl</a></li>
<li><a href="#trunkSourceWebCorecssMediaQueryListListeneridl">trunk/Source/WebCore/css/MediaQueryListListener.idl</a></li>
<li><a href="#trunkSourceWebCoredomDocumentidl">trunk/Source/WebCore/dom/Document.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasDOMPathidl">trunk/Source/WebCore/html/canvas/DOMPath.idl</a></li>
<li><a href="#trunkSourceWebCorepageDOMSelectionidl">trunk/Source/WebCore/page/DOMSelection.idl</a></li>
<li><a href="#trunkSourceWebCoresvgSVGMarkerElementidl">trunk/Source/WebCore/svg/SVGMarkerElement.idl</a></li>
<li><a href="#trunkSourceWebCoresvgSVGSVGElementidl">trunk/Source/WebCore/svg/SVGSVGElement.idl</a></li>
<li><a href="#trunkSourceWebCoresvgSVGTextContentElementidl">trunk/Source/WebCore/svg/SVGTextContentElement.idl</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
<li><a href="#trunkSourceWebCorexmlXPathEvaluatoridl">trunk/Source/WebCore/xml/XPathEvaluator.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/LayoutTests/ChangeLog        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-04-29  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [Web IDL] Specify default values for optional parameters of wrapper types
+        https://bugs.webkit.org/show_bug.cgi?id=157161
+
+        Reviewed by Darin Adler.
+
+        Rebaseline as a different exception message is now given when calling
+        Selection.extend() without enough parameters.
+
+        * editing/selection/extend-expected.txt:
+
</ins><span class="cx"> 2016-04-29  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ATK] Expose the value of aria-roledescription via an AtkObject attribute
</span></span></pre></div>
<a id="trunkLayoutTestseditingselectionextendexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/editing/selection/extend-expected.txt (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/editing/selection/extend-expected.txt        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/LayoutTests/editing/selection/extend-expected.txt        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -4,5 +4,5 @@
</span><span class="cx"> Success: s.extend(span2.firstChild, -1) raised Error: IndexSizeError: DOM Exception 1.
</span><span class="cx"> Success: window.getSelection() is b.
</span><span class="cx"> Success: window.getSelection() is arbaz.
</span><del>-Success: s.extend() raised TypeError: Type error.
</del><ins>+Success: s.extend() raised TypeError: Not enough arguments.
</ins><span class="cx"> Success: s.extend(null, 0) raised TypeError: Type error.
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/ChangeLog        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -1,3 +1,88 @@
</span><ins>+2016-04-29  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [Web IDL] Specify default values for optional parameters of wrapper types
+        https://bugs.webkit.org/show_bug.cgi?id=157161
+
+        Reviewed by Darin Adler.
+
+        Specify default values for optional parameters of wrapper types.
+
+        * Modules/indexeddb/IDBIndex.cpp:
+        (WebCore::IDBIndex::count): Deleted.
+        * Modules/indexeddb/IDBIndex.h:
+        * Modules/indexeddb/IDBIndex.idl:
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::count): Deleted.
+        * Modules/indexeddb/IDBObjectStore.h:
+        * Modules/indexeddb/IDBObjectStore.idl:
+        * Modules/mediastream/RTCPeerConnection.cpp:
+        (WebCore::RTCPeerConnection::createDataChannel): Deleted.
+        * Modules/mediastream/RTCPeerConnection.h:
+        * Modules/mediastream/RTCPeerConnection.idl:
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (WillConvertUndefinedToDefaultParameterValue):
+        Optimization to avoid generating a ternary if the default
+        value of a wrapper type parameter is null, since undefined
+        will already convert to null for those.
+
+        (GenerateParametersCheck):
+        Use null as implicit default value for nullable parameters, given that Web IDL
+        converts undefined to null for such parameters:
+        http://heycam.github.io/webidl/#es-nullable-type
+
+        (CanUseWTFOptionalForParameter):
+        Drop the check for wrapper types.
+
+        * bindings/scripts/test/*:
+        Improve bindings tests coverage / rebaseline.
+
+        * css/MediaQueryList.idl:
+        * css/MediaQueryListListener.idl:
+        * dom/Document.idl:
+
+        * html/canvas/DOMPath.idl:
+        The previous syntax was working because the bindings was generating an early
+        return if addPath() was called with only one parameter, calling the
+        implementation method with only 1 parameter. However, since we no longer
+        generate early returns for optional parameters, we now have to use a slightly
+        different syntax to maintain the previous behavior. This is only temporary,
+        I just did not want to deal with SVG tear off types in this patch since they
+        are very special in the bindings generator.
+
+        * page/DOMSelection.idl:
+        The node parameter to extend() was confusingly marked as optional. However,
+        when omitted, it would get translated into null, which would throw an
+        exception since the type is not nullable. Since the specification says 'node'
+        should not be optional, and since there is no behavior change, I dropped
+        the 'optional'. The only web-exposed difference is the message provided with
+        the TypeError that is thrown when called without enough parameters. The new
+        message is more accurate (see rebaselined layout test).
+
+        * svg/SVGMarkerElement.idl:
+        The parameter for setOrientToAngle() was confusingly marked as optional and
+        having a default value of null. However, the bindings would throw a TypeError
+        if called with no parameters or when calling it with null. This is because
+        this is an SVG Tear off type and the bindings always throw when passing null
+        for an SVG Tear off type. I therefore updated the IDL to reflect the actual
+        behavior (no actual behavior change). The new IDL also now matches the spec:
+        http://www.w3.org/TR/SVG2/painting.html#InterfaceSVGMarkerElement
+
+        * svg/SVGSVGElement.idl:
+        Same comments as for SVGMarkerElement. The new IDL matches the actual
+        behavior and is closer to the specification. I added FIXME comments for when
+        it does not match the specification:
+        http://www.w3.org/TR/SVG2/struct.html#InterfaceSVGSVGElement
+        I did not change web-exposed behavior in this patch.
+
+        * svg/SVGTextContentElement.idl:
+        Same as above. No actual behavior change.
+
+        * testing/Internals.cpp:
+        * testing/Internals.h:
+        * testing/Internals.idl:
+        * xml/XPathEvaluator.idl:
+
</ins><span class="cx"> 2016-04-29  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [ATK] Expose the value of aria-roledescription via an AtkObject attribute
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.cpp        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -137,13 +137,6 @@
</span><span class="cx">     return openCursor(context, keyRange.get(), direction, ec);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBIndex::count(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBIndex::count&quot;);
-
-    return doCount(context, IDBKeyRangeData::allKeys(), ec);
-}
-
</del><span class="cx"> RefPtr&lt;IDBRequest&gt; IDBIndex::count(ScriptExecutionContext&amp; context, IDBKeyRange* range, ExceptionCodeWithMessage&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBIndex::count&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.h        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -52,7 +52,6 @@
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, IDBKeyRange*, const String&amp; direction, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; openCursor(ScriptExecutionContext&amp;, JSC::JSValue key, const String&amp; direction, ExceptionCodeWithMessage&amp;);
</span><span class="cx"> 
</span><del>-    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
</del><span class="cx">     RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBIndexidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBIndex.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest get(any key);
</span><span class="cx">     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest getKey(IDBKeyRange? key);
</span><span class="cx">     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest getKey(any key);
</span><del>-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(optional IDBKeyRange? range);
</del><ins>+    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(optional IDBKeyRange? range = null);
</ins><span class="cx">     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(any key);
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -562,13 +562,6 @@
</span><span class="cx">     m_transaction-&gt;deleteIndex(m_info.identifier(), name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext&amp; context, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
-
-    return doCount(context, IDBKeyRangeData::allKeys(), ec);
-}
-
</del><span class="cx"> RefPtr&lt;IDBRequest&gt; IDBObjectStore::count(ScriptExecutionContext&amp; context, JSValue key, ExceptionCodeWithMessage&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBObjectStore::count&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -74,7 +74,6 @@
</span><span class="cx">     RefPtr&lt;IDBIndex&gt; createIndex(ScriptExecutionContext&amp;, const String&amp; name, const IDBKeyPath&amp;, bool unique, bool multiEntry, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     RefPtr&lt;IDBIndex&gt; index(const String&amp; name, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     void deleteIndex(const String&amp; name, ExceptionCodeWithMessage&amp;);
</span><del>-    RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
</del><span class="cx">     RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, IDBKeyRange*, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; count(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -49,6 +49,6 @@
</span><span class="cx">     [CallWith=ScriptExecutionContext, Custom, RaisesExceptionWithMessage] IDBIndex createIndex(DOMString name, DOMString keyPath, optional Dictionary options);
</span><span class="cx">     [RaisesExceptionWithMessage] IDBIndex index(DOMString name);
</span><span class="cx">     [RaisesExceptionWithMessage] void deleteIndex(DOMString name);
</span><del>-    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(optional IDBKeyRange? range);
</del><ins>+    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(optional IDBKeyRange? range = null);
</ins><span class="cx">     [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBRequest count(any key);
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -328,16 +328,11 @@
</span><span class="cx">     m_backend-&gt;setConfiguration(*m_configuration);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RTCPeerConnection::privateGetStats(MediaStreamTrack&amp; selector, PeerConnection::StatsPromise&amp;&amp; promise)
</del><ins>+void RTCPeerConnection::privateGetStats(MediaStreamTrack* selector, PeerConnection::StatsPromise&amp;&amp; promise)
</ins><span class="cx"> {
</span><del>-    m_backend-&gt;getStats(&amp;selector, WTFMove(promise));
</del><ins>+    m_backend-&gt;getStats(selector, WTFMove(promise));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RTCPeerConnection::privateGetStats(PeerConnection::StatsPromise&amp;&amp; promise)
-{
-    m_backend-&gt;getStats(nullptr, WTFMove(promise));
-}
-
</del><span class="cx"> RefPtr&lt;RTCDataChannel&gt; RTCPeerConnection::createDataChannel(String, const Dictionary&amp;, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     if (m_signalingState == SignalingState::Closed) {
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.h        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -93,8 +93,7 @@
</span><span class="cx">     RTCConfiguration* getConfiguration() const;
</span><span class="cx">     void setConfiguration(const Dictionary&amp; configuration, ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    void privateGetStats(MediaStreamTrack&amp;, PeerConnection::StatsPromise&amp;&amp;);
-    void privateGetStats(PeerConnection::StatsPromise&amp;&amp;);
</del><ins>+    void privateGetStats(MediaStreamTrack*, PeerConnection::StatsPromise&amp;&amp;);
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;RTCDataChannel&gt; createDataChannel(String label, const Dictionary&amp; dataChannelDict, ExceptionCode&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesmediastreamRTCPeerConnectionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     [Private] Promise queuedSetRemoteDescription(RTCSessionDescription description);
</span><span class="cx">     [Private] Promise queuedAddIceCandidate(RTCIceCandidate candidate);
</span><span class="cx"> 
</span><del>-    [Private] Promise privateGetStats(optional MediaStreamTrack selector);
</del><ins>+    [Private] Promise privateGetStats(optional MediaStreamTrack? selector = null);
</ins><span class="cx"> 
</span><span class="cx">     [JSBuiltin] Promise createOffer(optional Dictionary offerOptions);
</span><span class="cx">     // Legacy signature: void createOffer(RTCSessionDescriptionCallback successCallback
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -3380,7 +3380,6 @@
</span><span class="cx">     return 0 if $parameter-&gt;isVariadic;
</span><span class="cx">     return 0 if $codeGenerator-&gt;IsCallbackInterface($type);
</span><span class="cx">     return 0 if $codeGenerator-&gt;IsEnumType($type);
</span><del>-    return 0 if $codeGenerator-&gt;IsWrapperType($type);
</del><span class="cx"> 
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="lines">@@ -3420,6 +3419,8 @@
</span><span class="cx">         return 1 if $parameterType eq &quot;float&quot; or $parameterType eq &quot;unrestricted float&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    return 1 if $codeGenerator-&gt;IsWrapperType($parameterType) and $defaultValue eq &quot;null&quot;;
+
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -3469,15 +3470,23 @@
</span><span class="cx">         my $argType = $parameter-&gt;type;
</span><span class="cx">         my $optional = $parameter-&gt;isOptional;
</span><span class="cx"> 
</span><del>-        # As per Web IDL, optional dictionary parameters are always considered to have a default value of an empty dictionary, unless otherwise specified.
-        $parameter-&gt;default(&quot;[]&quot;) if ($optional &amp;&amp; !defined($parameter-&gt;default) &amp;&amp; $argType eq &quot;Dictionary&quot;);
</del><ins>+        die &quot;Optional parameters of non-nullable wrapper types are not supported&quot; if $optional &amp;&amp; !$parameter-&gt;isNullable &amp;&amp; $codeGenerator-&gt;IsWrapperType($argType) &amp;&amp; !$codeGenerator-&gt;IsCallbackInterface($argType);
</ins><span class="cx"> 
</span><del>-        # We use the null string as default value for non-nullable parameters of type DOMString unless specified otherwise.
-        $parameter-&gt;default(&quot;null&quot;) if ($optional &amp;&amp; !defined($parameter-&gt;default) &amp;&amp; $argType eq &quot;DOMString&quot; &amp;&amp; !$parameter-&gt;isNullable);
</del><ins>+        if ($optional &amp;&amp; !defined($parameter-&gt;default)) {
+            # As per Web IDL, optional dictionary parameters are always considered to have a default value of an empty dictionary, unless otherwise specified.
+            $parameter-&gt;default(&quot;[]&quot;) if $argType eq &quot;Dictionary&quot;;
+            
+            # We use undefined as default value for optional parameters of type 'any' unless specified otherwise.
+            $parameter-&gt;default(&quot;undefined&quot;) if $argType eq &quot;any&quot;;
</ins><span class="cx"> 
</span><del>-        # We use undefined as default value for optional parameters of type 'any' unless specified otherwise.
-        $parameter-&gt;default(&quot;undefined&quot;) if ($optional &amp;&amp; !defined($parameter-&gt;default) &amp;&amp; $argType eq &quot;any&quot;);
</del><ins>+            # We use the null string as default value for parameters of type DOMString unless specified otherwise.
+            $parameter-&gt;default(&quot;null&quot;) if $argType eq &quot;DOMString&quot;;
</ins><span class="cx"> 
</span><ins>+            # As per Web IDL, passing undefined for a nullable parameter is treated as null. Therefore, use null as
+            # default value for nullable parameters unless otherwise specified.
+            $parameter-&gt;default(&quot;null&quot;) if $parameter-&gt;isNullable;
+        }
+
</ins><span class="cx">         # FIXME: We should eventually stop generating any early calls, and instead use either default parameter values or WTF::Optional&lt;&gt;.
</span><span class="cx">         if ($optional &amp;&amp; !defined($parameter-&gt;default) &amp;&amp; !CanUseWTFOptionalForParameter($parameter) &amp;&amp; !$codeGenerator-&gt;IsCallbackInterface($argType)) {
</span><span class="cx">             # Generate early call if there are enough parameters.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -1770,6 +1770,26 @@
</span><span class="cx">     item-&gt;methodWithOptionalAny(convertedA);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void webkit_dom_test_obj_method_with_optional_nullable_wrapper(WebKitDOMTestObj* self, WebKitDOMTestObj* obj)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(obj));
+    WebCore::TestObj* item = WebKit::core(self);
+    WebCore::TestObj* convertedObj = WebKit::core(obj);
+    item-&gt;methodWithOptionalNullableWrapper(convertedObj);
+}
+
+void webkit_dom_test_obj_method_with_optional_nullable_wrapper_is_null(WebKitDOMTestObj* self, WebKitDOMTestObj* obj)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(obj));
+    WebCore::TestObj* item = WebKit::core(self);
+    WebCore::TestObj* convertedObj = WebKit::core(obj);
+    item-&gt;methodWithOptionalNullableWrapperIsNull(convertedObj);
+}
+
</ins><span class="cx"> gchar* webkit_dom_test_obj_conditional_method1(WebKitDOMTestObj* self)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(Condition1)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -709,6 +709,26 @@
</span><span class="cx"> webkit_dom_test_obj_method_with_optional_any(WebKitDOMTestObj* self, WebKitDOMany* a);
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * webkit_dom_test_obj_method_with_optional_nullable_wrapper:
+ * @self: A #WebKitDOMTestObj
+ * @obj: A #WebKitDOMTestObj
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_nullable_wrapper(WebKitDOMTestObj* self, WebKitDOMTestObj* obj);
+
+/**
+ * webkit_dom_test_obj_method_with_optional_nullable_wrapper_is_null:
+ * @self: A #WebKitDOMTestObj
+ * @obj: A #WebKitDOMTestObj
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_nullable_wrapper_is_null(WebKitDOMTestObj* self, WebKitDOMTestObj* obj);
+
+/**
</ins><span class="cx">  * webkit_dom_test_obj_conditional_method1:
</span><span class="cx">  * @self: A #WebKitDOMTestObj
</span><span class="cx">  *
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -158,6 +158,8 @@
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalBoolean(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAny(JSC::ExecState*);
</span><ins>+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull(JSC::ExecState*);
</ins><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(JSC::ExecState*);
</span><span class="lines">@@ -734,6 +736,8 @@
</span><span class="cx">     { &quot;methodWithOptionalBoolean&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalBoolean), (intptr_t) (0) } },
</span><span class="cx">     { &quot;methodWithOptionalBooleanIsFalse&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalBooleanIsFalse), (intptr_t) (0) } },
</span><span class="cx">     { &quot;methodWithOptionalAny&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalAny), (intptr_t) (0) } },
</span><ins>+    { &quot;methodWithOptionalNullableWrapper&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper), (intptr_t) (0) } },
+    { &quot;methodWithOptionalNullableWrapperIsNull&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull), (intptr_t) (0) } },
</ins><span class="cx">     { &quot;methodWithCallbackArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t) (1) } },
</span><span class="cx">     { &quot;methodWithNonCallbackArgAndCallbackArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t) (2) } },
</span><span class="cx">     { &quot;methodWithCallbackAndOptionalArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t) (0) } },
</span><span class="lines">@@ -4443,6 +4447,36 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapper(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalNullableWrapper&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    TestObj* obj = JSTestObj::toWrapped(state-&gt;argument(0));
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.methodWithOptionalNullableWrapper(obj);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalNullableWrapperIsNull(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalNullableWrapperIsNull&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    TestObj* obj = JSTestObj::toWrapped(state-&gt;argument(0));
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.methodWithOptionalNullableWrapperIsNull(obj);
+    return JSValue::encode(jsUndefined());
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(ExecState* state)
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="lines">@@ -4881,13 +4915,6 @@
</span><span class="cx">     TestObj* objArg1 = JSTestObj::toWrapped(state-&gt;argument(0));
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><del>-
-    size_t argsCount = state-&gt;argumentCount();
-    if (argsCount &lt;= 1) {
-        impl.overloadedMethodWithOptionalParameter(objArg1);
-        return JSValue::encode(jsUndefined());
-    }
-
</del><span class="cx">     TestObj* objArg2 = JSTestObj::toWrapped(state-&gt;argument(1));
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -194,6 +194,8 @@
</span><span class="cx"> - (void)methodWithOptionalBoolean:(BOOL)b;
</span><span class="cx"> - (void)methodWithOptionalBooleanIsFalse:(BOOL)b;
</span><span class="cx"> - (void)methodWithOptionalAny:(DOMany *)a;
</span><ins>+- (void)methodWithOptionalNullableWrapper:(DOMTestObj *)obj;
+- (void)methodWithOptionalNullableWrapperIsNull:(DOMTestObj *)obj;
</ins><span class="cx"> - (void)classMethod;
</span><span class="cx"> - (int)classMethodWithOptional:(int)arg;
</span><span class="cx"> - (void)classMethod2:(int)arg;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -1388,7 +1388,19 @@
</span><span class="cx">     IMPL-&gt;methodWithOptionalAny(core(a));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)methodWithOptionalNullableWrapper:(DOMTestObj *)obj
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;methodWithOptionalNullableWrapper(core(obj));
+}
</ins><span class="cx"> 
</span><ins>+- (void)methodWithOptionalNullableWrapperIsNull:(DOMTestObj *)obj
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;methodWithOptionalNullableWrapperIsNull(core(obj));
+}
+
+
</ins><span class="cx"> #if ENABLE(Condition1)
</span><span class="cx"> - (NSString *)conditionalMethod1
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -201,6 +201,8 @@
</span><span class="cx">     void    methodWithOptionalBoolean(optional boolean b);
</span><span class="cx">     void    methodWithOptionalBooleanIsFalse(optional boolean b = false);
</span><span class="cx">     void    methodWithOptionalAny(optional any a);
</span><ins>+    void    methodWithOptionalNullableWrapper(optional TestObj? obj);
+    void    methodWithOptionalNullableWrapperIsNull(optional TestObj? obj = null);
</ins><span class="cx"> 
</span><span class="cx"> #if defined(TESTING_JS)
</span><span class="cx">     // Callback interface parameters.
</span><span class="lines">@@ -258,7 +260,7 @@
</span><span class="cx">     // FIXME: Implement support for overloaded functions with variadic arguments.
</span><span class="cx">     void    overloadedMethod(Blob... blobArgs);
</span><span class="cx"> 
</span><del>-    void overloadedMethodWithOptionalParameter(TestObj? objArg1, optional TestObj? objArg2);
</del><ins>+    void overloadedMethodWithOptionalParameter(TestObj? objArg1, optional TestObj? objArg2 = null);
</ins><span class="cx">     void overloadedMethodWithOptionalParameter(TestObj? objArg, optional long longArg);
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaQueryListidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaQueryList.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaQueryList.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/css/MediaQueryList.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -22,6 +22,8 @@
</span><span class="cx"> ] interface MediaQueryList {
</span><span class="cx">     readonly attribute DOMString media;
</span><span class="cx">     readonly attribute boolean matches;
</span><del>-    void addListener(optional MediaQueryListListener listener);
-    void removeListener(optional MediaQueryListListener listener);
</del><ins>+
+    // FIXME: The listener parameter should not be optional.
+    void addListener(optional MediaQueryListListener? listener = null);
+    void removeListener(optional MediaQueryListListener? listener = null);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorecssMediaQueryListListeneridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/MediaQueryListListener.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/MediaQueryListListener.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/css/MediaQueryListListener.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -21,5 +21,5 @@
</span><span class="cx">     CallbackNeedsOperatorEqual,
</span><span class="cx">     Callback=FunctionOnly,
</span><span class="cx"> ] callback interface MediaQueryListListener {
</span><del>-    boolean queryChanged(optional MediaQueryList list = null);
</del><ins>+    boolean queryChanged(optional MediaQueryList? list = null);
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/dom/Document.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -118,10 +118,10 @@
</span><span class="cx"> #else
</span><span class="cx">     [NewObject] NodeIterator createNodeIterator(Node root,
</span><span class="cx">         optional unsigned long whatToShow = 0xFFFFFFFF,
</span><del>-        optional NodeFilter? filter);
</del><ins>+        optional NodeFilter? filter = null);
</ins><span class="cx">     [NewObject] TreeWalker createTreeWalker(Node root,
</span><span class="cx">         optional unsigned long whatToShow = 0xFFFFFFFF,
</span><del>-        optional NodeFilter? filter);
</del><ins>+        optional NodeFilter? filter = null);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     // DOM Level 2 Abstract Views (DocumentView interface)
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasDOMPathidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/DOMPath.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/DOMPath.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/html/canvas/DOMPath.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -33,8 +33,10 @@
</span><span class="cx">     ExportMacro=WEBCORE_EXPORT,
</span><span class="cx">     InterfaceName=Path2D,
</span><span class="cx"> ] interface DOMPath {
</span><del>-    // FIXME: The parameters should not be nullable.
-    [Conditional=CANVAS_PATH] void addPath(DOMPath? path, optional SVGMatrix? transform);
</del><ins>+    // FIXME: This should be:
+    // [Conditional=CANVAS_PATH] void addPath(DOMPath path, optional SVGMatrix transform);
+    [Conditional=CANVAS_PATH] void addPath(DOMPath? path);
+    [Conditional=CANVAS_PATH] void addPath(DOMPath? path, SVGMatrix transform);
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: These methods should be shared with CanvasRenderingContext2D in the CanvasPathMethods interface.
</span><span class="cx">     void closePath();
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMSelectionidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMSelection.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMSelection.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/page/DOMSelection.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx">     boolean containsNode(optional Node? node = null, optional boolean allowPartial = false);
</span><span class="cx">     [RaisesException] void selectAllChildren(optional Node? node = null);
</span><span class="cx"> 
</span><del>-    [RaisesException] void extend(optional Node node = null, optional long offset = 0);
</del><ins>+    [RaisesException] void extend(Node node, optional long offset = 0);
</ins><span class="cx"> 
</span><span class="cx">     [RaisesException] Range getRangeAt(optional long index = 0);
</span><span class="cx">     void removeAllRanges();
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGMarkerElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGMarkerElement.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGMarkerElement.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/svg/SVGMarkerElement.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">     readonly attribute SVGAnimatedAngle       orientAngle;
</span><span class="cx"> 
</span><span class="cx">     void setOrientToAuto();
</span><del>-    void setOrientToAngle(optional SVGAngle angle = null);
</del><ins>+    void setOrientToAngle(SVGAngle angle);
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> SVGMarkerElement implements SVGExternalResourcesRequired;
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGSVGElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGSVGElement.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGSVGElement.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/svg/SVGSVGElement.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -50,10 +50,16 @@
</span><span class="cx">     boolean animationsPaused();
</span><span class="cx">     unrestricted float getCurrentTime();
</span><span class="cx">     void setCurrentTime(optional unrestricted float seconds = NaN);
</span><del>-    NodeList getIntersectionList(optional SVGRect rect = null, optional SVGElement? referenceElement = null);
-    NodeList getEnclosureList(optional SVGRect rect = null, optional SVGElement? referenceElement = null);
-    boolean checkIntersection(optional SVGElement? element = null, optional SVGRect rect = null);
-    boolean checkEnclosure(optional SVGElement? element = null, optional SVGRect rect = null);
</del><ins>+
+    // FIXME: referenceElement should not be optional.
+    NodeList getIntersectionList(SVGRect rect, optional SVGElement? referenceElement = null);
+
+    // FIXME: referenceElement should not be optional.
+    NodeList getEnclosureList(SVGRect rect, optional SVGElement? referenceElement = null);
+
+    boolean checkIntersection(SVGElement? element, SVGRect rect); // element should not be nullable.
+    boolean checkEnclosure(SVGElement? element, SVGRect rect); // element should not be nullable.
+
</ins><span class="cx">     void deselectAll();
</span><span class="cx"> 
</span><span class="cx">     SVGNumber createSVGNumber();
</span><span class="lines">@@ -63,7 +69,7 @@
</span><span class="cx">     SVGMatrix createSVGMatrix();
</span><span class="cx">     SVGRect createSVGRect();
</span><span class="cx">     SVGTransform createSVGTransform();
</span><del>-    SVGTransform createSVGTransformFromMatrix(optional SVGMatrix matrix = null);
</del><ins>+    SVGTransform createSVGTransformFromMatrix(SVGMatrix matrix);
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: Using &quot;undefined&quot; as default parameter value is wrong.
</span><span class="cx">     Element getElementById([RequiresExistingAtomicString] optional DOMString elementId = &quot;undefined&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoresvgSVGTextContentElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/svg/SVGTextContentElement.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/svg/SVGTextContentElement.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/svg/SVGTextContentElement.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">     [RaisesException] SVGPoint getEndPositionOfChar(optional unsigned long offset = 0);
</span><span class="cx">     [RaisesException] SVGRect getExtentOfChar(optional unsigned long offset = 0);
</span><span class="cx">     [RaisesException] unrestricted float getRotationOfChar(optional unsigned long offset = 0);
</span><del>-    long getCharNumAtPosition(optional SVGPoint point = null);
</del><ins>+    long getCharNumAtPosition(SVGPoint point);
</ins><span class="cx">     [RaisesException] void selectSubString(optional unsigned long offset = 0, optional unsigned long length = 0);
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/testing/Internals.cpp        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -2384,11 +2384,6 @@
</span><span class="cx">     return document-&gt;renderView()-&gt;compositor().compositingUpdateCount();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(ExceptionCode&amp; ec)
-{
-    updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(nullptr, ec);
-}
-
</del><span class="cx"> void Internals::updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node* node, ExceptionCode&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     Document* document;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/testing/Internals.h        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -326,7 +326,6 @@
</span><span class="cx">     void startTrackingCompositingUpdates(ExceptionCode&amp;);
</span><span class="cx">     unsigned compositingUpdateCount(ExceptionCode&amp;);
</span><span class="cx"> 
</span><del>-    void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(ExceptionCode&amp;);
</del><span class="cx">     void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(Node*, ExceptionCode&amp;);
</span><span class="cx">     unsigned layoutCount() const;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/testing/Internals.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -332,7 +332,7 @@
</span><span class="cx">     // |node| should be Document, HTMLIFrameElement, or unspecified.
</span><span class="cx">     // If |node| is an HTMLIFrameElement, it assumes node.contentDocument is
</span><span class="cx">     // specified without security checks. Unspecified or null means this document.
</span><del>-    [RaisesException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node? node);
</del><ins>+    [RaisesException] void updateLayoutIgnorePendingStylesheetsAndRunPostLayoutTasks(optional Node? node = null);
</ins><span class="cx"> 
</span><span class="cx">     readonly attribute unsigned long layoutCount;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorexmlXPathEvaluatoridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/xml/XPathEvaluator.idl (200245 => 200246)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/xml/XPathEvaluator.idl        2016-04-29 16:44:30 UTC (rev 200245)
+++ trunk/Source/WebCore/xml/XPathEvaluator.idl        2016-04-29 16:51:58 UTC (rev 200246)
</span><span class="lines">@@ -23,7 +23,7 @@
</span><span class="cx"> ] interface XPathEvaluator {
</span><span class="cx">     // FIXME: Using &quot;undefined&quot; as default parameter value is wrong.
</span><span class="cx">     [RaisesException] XPathExpression createExpression(optional DOMString expression = &quot;undefined&quot;,
</span><del>-                                     optional XPathNSResolver resolver = null);
</del><ins>+                                     optional XPathNSResolver? resolver = null);
</ins><span class="cx"> 
</span><span class="cx">     XPathNSResolver createNSResolver(optional Node? nodeResolver = null);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>