<!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>[200242] trunk/Source/WebCore</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/200242">200242</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-04-29 09:08:00 -0700 (Fri, 29 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Web IDL] Drop 'any' type handling from CanUseWTFOptionalForParameter()
https://bugs.webkit.org/show_bug.cgi?id=157152

Reviewed by Darin Adler.

Drop 'any' type handling from CanUseWTFOptionalForParameter(). Always
use undefined as default value for parameters of type 'any' unless
specified otherwise.

* Modules/indexeddb/IDBCursor.cpp:
(WebCore::IDBCursor::continueFunction): Deleted.
* Modules/indexeddb/IDBCursor.h:
* Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::add): Deleted.
(WebCore::IDBObjectStore::putOrAdd): Deleted.
* Modules/indexeddb/IDBObjectStore.h:
* bindings/scripts/CodeGeneratorJS.pm:

(WillConvertUndefinedToDefaultParameterValue):
Fix optimization for optional DOMString attributes whose default value
is the string &quot;undefined&quot;. I also added bindings test coverage for it.

(GenerateParametersCheck):
(CanUseWTFOptionalForParameter): Deleted.
* bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
(webkit_dom_test_obj_method_with_optional_string_is_undefined):
(webkit_dom_test_obj_method_with_optional_any):
* bindings/scripts/test/GObject/WebKitDOMTestObj.h:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
(WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAny):
* bindings/scripts/test/ObjC/DOMTestObj.h:
* bindings/scripts/test/ObjC/DOMTestObj.mm:
(-[DOMTestObj methodWithOptionalStringIsUndefined:]):
(-[DOMTestObj methodWithOptionalAny:]):
* bindings/scripts/test/TestObj.idl:
* testing/Internals.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorcpp">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorh">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h</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="#trunkSourceWebCorebindingsjsJSIDBObjectStoreCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp</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="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/ChangeLog        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2016-04-29  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [Web IDL] Drop 'any' type handling from CanUseWTFOptionalForParameter()
+        https://bugs.webkit.org/show_bug.cgi?id=157152
+
+        Reviewed by Darin Adler.
+
+        Drop 'any' type handling from CanUseWTFOptionalForParameter(). Always
+        use undefined as default value for parameters of type 'any' unless
+        specified otherwise.
+
+        * Modules/indexeddb/IDBCursor.cpp:
+        (WebCore::IDBCursor::continueFunction): Deleted.
+        * Modules/indexeddb/IDBCursor.h:
+        * Modules/indexeddb/IDBObjectStore.cpp:
+        (WebCore::IDBObjectStore::add): Deleted.
+        (WebCore::IDBObjectStore::putOrAdd): Deleted.
+        * Modules/indexeddb/IDBObjectStore.h:
+        * bindings/scripts/CodeGeneratorJS.pm:
+
+        (WillConvertUndefinedToDefaultParameterValue):
+        Fix optimization for optional DOMString attributes whose default value
+        is the string &quot;undefined&quot;. I also added bindings test coverage for it.
+
+        (GenerateParametersCheck):
+        (CanUseWTFOptionalForParameter): Deleted.
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
+        (webkit_dom_test_obj_method_with_optional_string_is_undefined):
+        (webkit_dom_test_obj_method_with_optional_any):
+        * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined):
+        (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAny):
+        * bindings/scripts/test/ObjC/DOMTestObj.h:
+        * bindings/scripts/test/ObjC/DOMTestObj.mm:
+        (-[DOMTestObj methodWithOptionalStringIsUndefined:]):
+        (-[DOMTestObj methodWithOptionalAny:]):
+        * bindings/scripts/test/TestObj.idl:
+        * testing/Internals.h:
+
</ins><span class="cx"> 2016-04-29  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: [ATK] Expose elements with ARIA's &quot;text&quot; role
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.cpp        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -255,11 +255,6 @@
</span><span class="cx">     uncheckedIterateCursor(IDBKeyData(), count);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBCursor::continueFunction(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp; ec)
-{
-    continueFunction(IDBKeyData(), ec);
-}
-
</del><span class="cx"> void IDBCursor::continueFunction(ScriptExecutionContext&amp; context, JSValue keyValue, ExceptionCodeWithMessage&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;IDBKey&gt; key;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -64,7 +64,6 @@
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; update(JSC::ExecState&amp;, JSC::JSValue, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     void advance(unsigned, ExceptionCodeWithMessage&amp;);
</span><del>-    void continueFunction(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
</del><span class="cx">     void continueFunction(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</span><span class="cx">     RefPtr&lt;IDBRequest&gt; deleteFunction(ScriptExecutionContext&amp;, ExceptionCodeWithMessage&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStorecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -203,11 +203,6 @@
</span><span class="cx">     return WTFMove(request);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::add(ExecState&amp; state, JSValue value, ExceptionCodeWithMessage&amp; ec)
-{
-    return putOrAdd(state, value, nullptr, IndexedDB::ObjectStoreOverwriteMode::NoOverwrite, InlineKeyCheck::Perform, ec);
-}
-
</del><span class="cx"> RefPtr&lt;IDBRequest&gt; IDBObjectStore::add(ExecState&amp; execState, JSValue value, JSValue key, ExceptionCodeWithMessage&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     RefPtr&lt;IDBKey&gt; idbKey;
</span><span class="lines">@@ -224,11 +219,6 @@
</span><span class="cx">     return putOrAdd(execState, value, idbKey, IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::Perform, ec);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBRequest&gt; IDBObjectStore::put(ExecState&amp; state, JSValue value, ExceptionCodeWithMessage&amp; ec)
-{
-    return putOrAdd(state, value, nullptr, IndexedDB::ObjectStoreOverwriteMode::Overwrite, InlineKeyCheck::Perform, ec);
-}
-
</del><span class="cx"> RefPtr&lt;IDBRequest&gt; IDBObjectStore::putForCursorUpdate(ExecState&amp; state, JSValue value, JSValue key, ExceptionCodeWithMessage&amp; ec)
</span><span class="cx"> {
</span><span class="cx">     return putOrAdd(state, value, scriptValueToIDBKey(state, key), IndexedDB::ObjectStoreOverwriteMode::OverwriteForCursor, InlineKeyCheck::DoNotPerform, ec);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBObjectStoreh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBObjectStore.h        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -62,8 +62,6 @@
</span><span class="cx">     RefPtr&lt;IDBTransaction&gt; transaction();
</span><span class="cx">     bool autoIncrement() const;
</span><span class="cx"> 
</span><del>-    RefPtr&lt;IDBRequest&gt; add(JSC::ExecState&amp;, JSC::JSValue, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBRequest&gt; put(JSC::ExecState&amp;, JSC::JSValue, ExceptionCodeWithMessage&amp;);
</del><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">     RefPtr&lt;IDBRequest&gt; get(ScriptExecutionContext&amp;, JSC::JSValue key, ExceptionCodeWithMessage&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBObjectStoreCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/bindings/js/JSIDBObjectStoreCustom.cpp        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -66,19 +66,7 @@
</span><span class="cx"> 
</span><span class="cx">     ExceptionCodeWithMessage ec;
</span><span class="cx">     auto value = state.uncheckedArgument(0);
</span><del>-
-    if (argsCount == 1) {
-        JSValue result;
-        if (overwrite)
-            result = toJS(&amp;state, castedThis-&gt;globalObject(), wrapped.put(state, value, ec).get());
-        else
-            result = toJS(&amp;state, castedThis-&gt;globalObject(), wrapped.add(state, value, ec).get());
-
-        setDOMException(&amp;state, ec);
-        return result;
-    }
-
-    auto key = state.uncheckedArgument(1);
</del><ins>+    auto key = state.argument(1);
</ins><span class="cx">     JSValue result;
</span><span class="cx">     if (overwrite)
</span><span class="cx">         result = toJS(&amp;state, castedThis-&gt;globalObject(), wrapped.put(state, value, key, ec).get());
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -3381,7 +3381,6 @@
</span><span class="cx">     return 0 if $codeGenerator-&gt;IsCallbackInterface($type);
</span><span class="cx">     return 0 if $codeGenerator-&gt;IsEnumType($type);
</span><span class="cx">     return 0 if $codeGenerator-&gt;IsWrapperType($type);
</span><del>-    return 0 if $type eq &quot;any&quot;;
</del><span class="cx"> 
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="lines">@@ -3400,8 +3399,10 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     # toString() will convert undefined to the string &quot;undefined&quot;;
</span><del>-    return 1 if $parameterType eq &quot;DOMString&quot; and $defaultValue eq &quot;undefined&quot;;
</del><ins>+    return 1 if $parameterType eq &quot;DOMString&quot; and $defaultValue eq &quot;\&quot;undefined\&quot;&quot;;
</ins><span class="cx"> 
</span><ins>+    return 1 if $parameterType eq &quot;any&quot; and $defaultValue eq &quot;undefined&quot;;
+
</ins><span class="cx">     # JSValue::toBoolean() will convert undefined to false.
</span><span class="cx">     return 1 if $parameterType eq &quot;boolean&quot; and $defaultValue eq &quot;false&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -3474,6 +3475,9 @@
</span><span class="cx">         # We use the null string as default value for non-nullable parameters of type DOMString unless specified otherwise.
</span><span class="cx">         $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);
</span><span class="cx"> 
</span><ins>+        # 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;);
+
</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 class="lines">@@ -3643,6 +3647,7 @@
</span><span class="cx">                         $defaultValue = &quot;nullptr&quot; if $defaultValue eq &quot;null&quot;;
</span><span class="cx">                         $defaultValue = &quot;PNaN&quot; if $defaultValue eq &quot;NaN&quot;;
</span><span class="cx">                         $defaultValue = &quot;$nativeType()&quot; if $defaultValue eq &quot;[]&quot;;
</span><ins>+                        $defaultValue = &quot;JSValue::JSUndefined&quot; if $defaultValue eq &quot;undefined&quot;;
</ins><span class="cx">                     }
</span><span class="cx"> 
</span><span class="cx">                     $outer = &quot;state-&gt;argument($argsIndex).isUndefined() ? $defaultValue : &quot;;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -1636,6 +1636,16 @@
</span><span class="cx">     item-&gt;methodWithOptionalStringIsNull(convertedStr);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void webkit_dom_test_obj_method_with_optional_string_is_undefined(WebKitDOMTestObj* self, const gchar* str)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    g_return_if_fail(str);
+    WebCore::TestObj* item = WebKit::core(self);
+    WTF::String convertedStr = WTF::String::fromUTF8(str);
+    item-&gt;methodWithOptionalStringIsUndefined(convertedStr);
+}
+
</ins><span class="cx"> void webkit_dom_test_obj_method_with_optional_atomic_string_is_null(WebKitDOMTestObj* self, const gchar* str)
</span><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span><span class="lines">@@ -1750,6 +1760,16 @@
</span><span class="cx">     item-&gt;methodWithOptionalBooleanIsFalse(b);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void webkit_dom_test_obj_method_with_optional_any(WebKitDOMTestObj* self, WebKitDOMany* a)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    g_return_if_fail(WEBKIT_DOM_IS_ANY(a));
+    WebCore::TestObj* item = WebKit::core(self);
+    WebCore::any* convertedA = WebKit::core(a);
+    item-&gt;methodWithOptionalAny(convertedA);
+}
+
</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 (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -559,6 +559,16 @@
</span><span class="cx"> webkit_dom_test_obj_method_with_optional_string_is_null(WebKitDOMTestObj* self, const gchar* str);
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * webkit_dom_test_obj_method_with_optional_string_is_undefined:
+ * @self: A #WebKitDOMTestObj
+ * @str: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_string_is_undefined(WebKitDOMTestObj* self, const gchar* str);
+
+/**
</ins><span class="cx">  * webkit_dom_test_obj_method_with_optional_atomic_string_is_null:
</span><span class="cx">  * @self: A #WebKitDOMTestObj
</span><span class="cx">  * @str: A #gchar
</span><span class="lines">@@ -689,6 +699,16 @@
</span><span class="cx"> webkit_dom_test_obj_method_with_optional_boolean_is_false(WebKitDOMTestObj* self, gboolean b);
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * webkit_dom_test_obj_method_with_optional_any:
+ * @self: A #WebKitDOMTestObj
+ * @a: A #WebKitDOMany
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_any(WebKitDOMTestObj* self, WebKitDOMany* a);
+
+/**
</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 (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -142,6 +142,7 @@
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValue(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull(JSC::ExecState*);
</span><ins>+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined(JSC::ExecState*);
</ins><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyString(JSC::ExecState*);
</span><span class="lines">@@ -156,6 +157,7 @@
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArrayIsEmpty(JSC::ExecState*);
</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><ins>+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAny(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">@@ -716,6 +718,7 @@
</span><span class="cx">     { &quot;methodWithOptionalStringAndDefaultValue&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalStringAndDefaultValue), (intptr_t) (0) } },
</span><span class="cx">     { &quot;methodWithOptionalAtomicStringAndDefaultValue&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringAndDefaultValue), (intptr_t) (0) } },
</span><span class="cx">     { &quot;methodWithOptionalStringIsNull&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalStringIsNull), (intptr_t) (0) } },
</span><ins>+    { &quot;methodWithOptionalStringIsUndefined&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined), (intptr_t) (0) } },
</ins><span class="cx">     { &quot;methodWithOptionalAtomicStringIsNull&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull), (intptr_t) (0) } },
</span><span class="cx">     { &quot;methodWithOptionalStringIsEmptyString&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalStringIsEmptyString), (intptr_t) (0) } },
</span><span class="cx">     { &quot;methodWithOptionalAtomicStringIsEmptyString&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyString), (intptr_t) (0) } },
</span><span class="lines">@@ -730,6 +733,7 @@
</span><span class="cx">     { &quot;methodWithOptionalArrayIsEmpty&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalArrayIsEmpty), (intptr_t) (0) } },
</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><ins>+    { &quot;methodWithOptionalAny&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalAny), (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">@@ -4199,6 +4203,21 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalStringIsUndefined(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalStringIsUndefined&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    String str = state-&gt;argument(0).toString(state)-&gt;value(state);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.methodWithOptionalStringIsUndefined(str);
+    return JSValue::encode(jsUndefined());
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNull(ExecState* state)
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span><span class="lines">@@ -4409,6 +4428,21 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalAny(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalAny&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    JSC::JSValue a = state-&gt;argument(0);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.methodWithOptionalAny(a);
+    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></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -181,6 +181,7 @@
</span><span class="cx"> - (void)methodWithOptionalStringAndDefaultValue:(NSString *)str;
</span><span class="cx"> - (void)methodWithOptionalAtomicStringAndDefaultValue:(NSString *)str;
</span><span class="cx"> - (void)methodWithOptionalStringIsNull:(NSString *)str;
</span><ins>+- (void)methodWithOptionalStringIsUndefined:(NSString *)str;
</ins><span class="cx"> - (void)methodWithOptionalAtomicStringIsNull:(NSString *)str;
</span><span class="cx"> - (void)methodWithOptionalStringIsEmptyString:(NSString *)str;
</span><span class="cx"> - (void)methodWithOptionalAtomicStringIsEmptyString:(NSString *)str;
</span><span class="lines">@@ -192,6 +193,7 @@
</span><span class="cx"> - (void)methodWithOptionalUnsignedLongLongIsZero:(unsigned long long)number;
</span><span class="cx"> - (void)methodWithOptionalBoolean:(BOOL)b;
</span><span class="cx"> - (void)methodWithOptionalBooleanIsFalse:(BOOL)b;
</span><ins>+- (void)methodWithOptionalAny:(DOMany *)a;
</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 (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -1310,6 +1310,12 @@
</span><span class="cx">     IMPL-&gt;methodWithOptionalStringIsNull(str);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)methodWithOptionalStringIsUndefined:(NSString *)str
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;methodWithOptionalStringIsUndefined(str);
+}
+
</ins><span class="cx"> - (void)methodWithOptionalAtomicStringIsNull:(NSString *)str
</span><span class="cx"> {
</span><span class="cx">     WebCore::JSMainThreadNullState state;
</span><span class="lines">@@ -1376,7 +1382,13 @@
</span><span class="cx">     IMPL-&gt;methodWithOptionalBooleanIsFalse(b);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)methodWithOptionalAny:(DOMany *)a
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;methodWithOptionalAny(core(a));
+}
</ins><span class="cx"> 
</span><ins>+
</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 (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -185,6 +185,7 @@
</span><span class="cx">     void    methodWithOptionalStringAndDefaultValue(optional DOMString str = &quot;foo&quot;);
</span><span class="cx">     void    methodWithOptionalAtomicStringAndDefaultValue([AtomicString] optional DOMString str = &quot;foo&quot;);
</span><span class="cx">     void    methodWithOptionalStringIsNull(optional DOMString str = null);
</span><ins>+    void    methodWithOptionalStringIsUndefined(optional DOMString str = &quot;undefined&quot;);
</ins><span class="cx">     void    methodWithOptionalAtomicStringIsNull([AtomicString] optional DOMString str = null);
</span><span class="cx">     void    methodWithOptionalStringIsEmptyString(optional DOMString str = &quot;&quot;);
</span><span class="cx">     void    methodWithOptionalAtomicStringIsEmptyString([AtomicString] optional DOMString str = &quot;&quot;);
</span><span class="lines">@@ -199,6 +200,7 @@
</span><span class="cx">     void    methodWithOptionalArrayIsEmpty(optional DOMString[] array = []);
</span><span class="cx">     void    methodWithOptionalBoolean(optional boolean b);
</span><span class="cx">     void    methodWithOptionalBooleanIsFalse(optional boolean b = false);
</span><ins>+    void    methodWithOptionalAny(optional any a);
</ins><span class="cx"> 
</span><span class="cx"> #if defined(TESTING_JS)
</span><span class="cx">     // Callback interface parameters.
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (200241 => 200242)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2016-04-29 13:10:04 UTC (rev 200241)
+++ trunk/Source/WebCore/testing/Internals.h        2016-04-29 16:08:00 UTC (rev 200242)
</span><span class="lines">@@ -200,7 +200,7 @@
</span><span class="cx">     RefPtr&lt;NodeList&gt; nodesFromRect(Document&amp;, int x, int y, unsigned topPadding, unsigned rightPadding,
</span><span class="cx">         unsigned bottomPadding, unsigned leftPadding, bool ignoreClipping, bool allowShadowContent, bool allowChildFrameContent, ExceptionCode&amp;) const;
</span><span class="cx"> 
</span><del>-    String parserMetaData(JSC::JSValue = { });
</del><ins>+    String parserMetaData(JSC::JSValue = JSC::JSValue::JSUndefined);
</ins><span class="cx"> 
</span><span class="cx">     void updateEditorUINowIfScheduled();
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>