<!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>[200299] 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/200299">200299</a></dd>
<dt>Author</dt> <dd>darin@apple.com</dd>
<dt>Date</dt> <dd>2016-04-30 21:17:54 -0700 (Sat, 30 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Streamline and remove unused bindings generation code
https://bugs.webkit.org/show_bug.cgi?id=157237

Reviewed by Chris Dumez.

Source/WebCore:

* Modules/notifications/NotificationCenter.idl: Replace non-standard &quot;int&quot;
with standard &quot;long&quot;, which means the same thing.

* bindings/scripts/CodeGenerator.pm:
(UpdateFile): Use a better perl idiom for open.
(IsTypedArrayType): Use a hash instead of a list of checks in the code.
(IsRefPtrType): Use GetArrayOrSequenceType. Add handling for &quot;any&quot;, which
is not a &quot;RefPtr&quot; type.
(IsWrapperType): Build on top of IsRefPtr type so we don't have to repeat
the list.
(getInterfaceExtendedAttributesFromName): Added a FIXME about why this is no good.
(ComputeIsCallbackInterface): Renamed.
(IsCallbackInterface): Added a cache so we don't keep reading the same file
over and over again. Added a FIXME about why this is no good.
(ComputeIsFunctionOnlyCallbackInterface): Ditto.
(IsFunctionOnlyCallbackInterface): Ditto.

* bindings/scripts/CodeGeneratorJS.pm:
(AddIncludesForType): Use GetArrayOrSequenceType.
(IsScriptProfileType): Deleted.
(AddTypedefForScriptProfileType): Deleted.
(AddClassForwardIfNeeded): Streamlined the code and made the ScriptProfileNode
special case easier to read.
(GenerateParametersCheckExpression): Use GetArrayOrSequenceType.
(GetFunctionLength): Tweaked formatting and argument names.
(GenerateImplementation): Merged a couple checks into a single if statement.
(WillConvertUndefinedToDefaultParameterValue): Streamlined the function by
using a hash instead of a sequence of if statements for most cases.
(GetNativeType): Use GetArrayOrSequenceType.
(JSValueToNative): Do the integer conversion based on a hash rather than
with lots of separate lines of code. Moved more of the simple names down to
the bottom of the function and streamlined the logic. Removed unnecessary
includes of the DOM headers directly, since our header file includes those.
(NativeToJSValue): Factored out the global object handling so it works across
more cases. Simplified the logic for dates. Use IsNumericType instead of
IsPrimitiveType to guard code that is right only for the numeric types.
Removed code to handle &quot;Symbol&quot; since we don't ever use that.

* bindings/scripts/test/JS/JSTestCallback.cpp:
* bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
* bindings/scripts/test/JS/JSTestInterface.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
Regenerated.

* bindings/scripts/test/TestObj.idl: Removed test coverage for Symbol, which
we never use anywhere.

* html/canvas/EXTBlendMinMax.idl: Replace non-standard &quot;int&quot; with standard
&quot;long&quot;, which means the same thing.
* html/canvas/EXTTextureFilterAnisotropic.idl: Ditto.
* html/canvas/EXTsRGB.idl: Ditto.
* html/canvas/OESStandardDerivatives.idl: Ditto.
* html/canvas/OESVertexArrayObject.idl: Ditto.
* html/canvas/WebGLCompressedTextureATC.idl: Ditto.
* html/canvas/WebGLCompressedTexturePVRTC.idl: Ditto.
* html/canvas/WebGLCompressedTextureS3TC.idl: Ditto.
* html/canvas/WebGLDebugRendererInfo.idl: Ditto.
* html/canvas/WebGLDepthTexture.idl: Ditto.

Tools:

* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
Replace non-standard &quot;int&quot; with standard &quot;long&quot;, which means the same thing.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesnotificationsNotificationCenteridl">trunk/Source/WebCore/Modules/notifications/NotificationCenter.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorpm">trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctioncpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasEXTBlendMinMaxidl">trunk/Source/WebCore/html/canvas/EXTBlendMinMax.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasEXTTextureFilterAnisotropicidl">trunk/Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasEXTsRGBidl">trunk/Source/WebCore/html/canvas/EXTsRGB.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasOESStandardDerivativesidl">trunk/Source/WebCore/html/canvas/OESStandardDerivatives.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasOESVertexArrayObjectidl">trunk/Source/WebCore/html/canvas/OESVertexArrayObject.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLCompressedTextureATCidl">trunk/Source/WebCore/html/canvas/WebGLCompressedTextureATC.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLCompressedTexturePVRTCidl">trunk/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLCompressedTextureS3TCidl">trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLDebugRendererInfoidl">trunk/Source/WebCore/html/canvas/WebGLDebugRendererInfo.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlcanvasWebGLDepthTextureidl">trunk/Source/WebCore/html/canvas/WebGLDepthTexture.idl</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityControlleridl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/ChangeLog        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -1,3 +1,70 @@
</span><ins>+2016-04-30  Darin Adler  &lt;darin@apple.com&gt;
+
+        Streamline and remove unused bindings generation code
+        https://bugs.webkit.org/show_bug.cgi?id=157237
+
+        Reviewed by Chris Dumez.
+
+        * Modules/notifications/NotificationCenter.idl: Replace non-standard &quot;int&quot;
+        with standard &quot;long&quot;, which means the same thing.
+
+        * bindings/scripts/CodeGenerator.pm:
+        (UpdateFile): Use a better perl idiom for open.
+        (IsTypedArrayType): Use a hash instead of a list of checks in the code.
+        (IsRefPtrType): Use GetArrayOrSequenceType. Add handling for &quot;any&quot;, which
+        is not a &quot;RefPtr&quot; type.
+        (IsWrapperType): Build on top of IsRefPtr type so we don't have to repeat
+        the list.
+        (getInterfaceExtendedAttributesFromName): Added a FIXME about why this is no good.
+        (ComputeIsCallbackInterface): Renamed.
+        (IsCallbackInterface): Added a cache so we don't keep reading the same file
+        over and over again. Added a FIXME about why this is no good.
+        (ComputeIsFunctionOnlyCallbackInterface): Ditto.
+        (IsFunctionOnlyCallbackInterface): Ditto.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (AddIncludesForType): Use GetArrayOrSequenceType.
+        (IsScriptProfileType): Deleted.
+        (AddTypedefForScriptProfileType): Deleted.
+        (AddClassForwardIfNeeded): Streamlined the code and made the ScriptProfileNode
+        special case easier to read.
+        (GenerateParametersCheckExpression): Use GetArrayOrSequenceType.
+        (GetFunctionLength): Tweaked formatting and argument names.
+        (GenerateImplementation): Merged a couple checks into a single if statement.
+        (WillConvertUndefinedToDefaultParameterValue): Streamlined the function by
+        using a hash instead of a sequence of if statements for most cases.
+        (GetNativeType): Use GetArrayOrSequenceType.
+        (JSValueToNative): Do the integer conversion based on a hash rather than
+        with lots of separate lines of code. Moved more of the simple names down to
+        the bottom of the function and streamlined the logic. Removed unnecessary
+        includes of the DOM headers directly, since our header file includes those.
+        (NativeToJSValue): Factored out the global object handling so it works across
+        more cases. Simplified the logic for dates. Use IsNumericType instead of
+        IsPrimitiveType to guard code that is right only for the numeric types.
+        Removed code to handle &quot;Symbol&quot; since we don't ever use that.
+
+        * bindings/scripts/test/JS/JSTestCallback.cpp:
+        * bindings/scripts/test/JS/JSTestCallbackFunction.cpp:
+        * bindings/scripts/test/JS/JSTestInterface.cpp:
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
+        Regenerated.
+
+        * bindings/scripts/test/TestObj.idl: Removed test coverage for Symbol, which
+        we never use anywhere.
+
+        * html/canvas/EXTBlendMinMax.idl: Replace non-standard &quot;int&quot; with standard
+        &quot;long&quot;, which means the same thing.
+        * html/canvas/EXTTextureFilterAnisotropic.idl: Ditto.
+        * html/canvas/EXTsRGB.idl: Ditto.
+        * html/canvas/OESStandardDerivatives.idl: Ditto.
+        * html/canvas/OESVertexArrayObject.idl: Ditto.
+        * html/canvas/WebGLCompressedTextureATC.idl: Ditto.
+        * html/canvas/WebGLCompressedTexturePVRTC.idl: Ditto.
+        * html/canvas/WebGLCompressedTextureS3TC.idl: Ditto.
+        * html/canvas/WebGLDebugRendererInfo.idl: Ditto.
+        * html/canvas/WebGLDepthTexture.idl: Ditto.
+
</ins><span class="cx"> 2016-04-30  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Web IDL] Pass even more types by reference
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesnotificationsNotificationCenteridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/notifications/NotificationCenter.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/notifications/NotificationCenter.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/Modules/notifications/NotificationCenter.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -30,13 +30,12 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    NoInterfaceObject,
-    Conditional=LEGACY_NOTIFICATIONS,
</del><span class="cx">     ActiveDOMObject,
</span><ins>+    Conditional=LEGACY_NOTIFICATIONS,
+    NoInterfaceObject,
</ins><span class="cx"> ] interface NotificationCenter {
</span><span class="cx">    [RaisesException] Notification createNotification(DOMString iconUrl, DOMString title, DOMString body);
</span><span class="cx"> 
</span><del>-   int checkPermission();
</del><ins>+   long checkPermission();
</ins><span class="cx">    void requestPermission(optional VoidCallback? callback);
</span><span class="cx"> };
</span><del>-
</del></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -71,6 +71,21 @@
</span><span class="cx"> 
</span><span class="cx"> my %enumTypeHash = ();
</span><span class="cx"> 
</span><ins>+my %typedArrayTypes = (
+    &quot;ArrayBuffer&quot; =&gt; 1,
+    &quot;ArrayBufferView&quot; =&gt; 1,
+    &quot;DataView&quot; =&gt; 1,
+    &quot;Float32Array&quot; =&gt; 1,
+    &quot;Float64Array&quot; =&gt; 1,
+    &quot;Int16Array&quot; =&gt; 1,
+    &quot;Int32Array&quot; =&gt; 1,
+    &quot;Int8Array&quot; =&gt; 1,
+    &quot;Uint16Array&quot; =&gt; 1,
+    &quot;Uint32Array&quot; =&gt; 1,
+    &quot;Uint8Array&quot; =&gt; 1,
+    &quot;Uint8ClampedArray&quot; =&gt; 1,
+);
+
</ins><span class="cx"> my %nonPointerTypeHash = ( &quot;DOMTimeStamp&quot; =&gt; 1 );
</span><span class="cx"> 
</span><span class="cx"> my %svgAttributesInHTMLHash = (
</span><span class="lines">@@ -204,7 +219,7 @@
</span><span class="cx">     my $fileName = shift;
</span><span class="cx">     my $contents = shift;
</span><span class="cx"> 
</span><del>-    open FH, &quot;&gt; $fileName&quot; or die &quot;Couldn't open $fileName: $!\n&quot;;
</del><ins>+    open FH, &quot;&gt;&quot;, $fileName or die &quot;Couldn't open $fileName: $!\n&quot;;
</ins><span class="cx">     print FH $contents;
</span><span class="cx">     close FH;
</span><span class="cx"> }
</span><span class="lines">@@ -434,10 +449,8 @@
</span><span class="cx"> {
</span><span class="cx">     my $object = shift;
</span><span class="cx">     my $type = shift;
</span><del>-    return 1 if (($type eq &quot;ArrayBuffer&quot;) or ($type eq &quot;ArrayBufferView&quot;));
-    return 1 if (($type eq &quot;Uint8Array&quot;) or ($type eq &quot;Uint8ClampedArray&quot;) or ($type eq &quot;Uint16Array&quot;) or ($type eq &quot;Uint32Array&quot;));
-    return 1 if (($type eq &quot;Int8Array&quot;) or ($type eq &quot;Int16Array&quot;) or ($type eq &quot;Int32Array&quot;));
-    return 1 if (($type eq &quot;Float32Array&quot;) or ($type eq &quot;Float64Array&quot;) or ($type eq &quot;DataView&quot;));
</del><ins>+
+    return 1 if $typedArrayTypes{$type};
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -447,10 +460,10 @@
</span><span class="cx">     my $type = shift;
</span><span class="cx"> 
</span><span class="cx">     return 0 if $object-&gt;IsPrimitiveType($type);
</span><del>-    return 0 if $object-&gt;GetArrayType($type);
-    return 0 if $object-&gt;GetSequenceType($type);
</del><ins>+    return 0 if $object-&gt;GetArrayOrSequenceType($type);
+    return 0 if $object-&gt;IsEnumType($type);
</ins><span class="cx">     return 0 if $type eq &quot;DOMString&quot;;
</span><del>-    return 0 if $object-&gt;IsEnumType($type);
</del><ins>+    return 0 if $type eq &quot;any&quot;;
</ins><span class="cx"> 
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="lines">@@ -696,27 +709,24 @@
</span><span class="cx">     my $object = shift;
</span><span class="cx">     my $type = shift;
</span><span class="cx"> 
</span><del>-    return 0 if $object-&gt;IsPrimitiveType($type);
-    return 0 if $object-&gt;GetArrayType($type);
-    return 0 if $object-&gt;GetSequenceType($type);
-    return 0 if $object-&gt;IsEnumType($type);
-    return 0 if $object-&gt;IsStringType($type);
</del><ins>+    return 0 if !$object-&gt;IsRefPtrType($type);
</ins><span class="cx">     return 0 if $object-&gt;IsTypedArrayType($type);
</span><span class="cx">     return 0 if $webCoreTypeHash{$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="cx"> 
</span><span class="cx"> sub getInterfaceExtendedAttributesFromName
</span><span class="cx"> {
</span><ins>+    # FIXME: It's bad to have a function like this that opens another IDL file to answer a question.
+    # Overusing this kind of function can make things really slow. Lets avoid these if we can.
+
</ins><span class="cx">     my $object = shift;
</span><span class="cx">     my $interfaceName = shift;
</span><span class="cx"> 
</span><del>-    my $idlFile = $object-&gt;IDLFileForInterface($interfaceName)
-      or die(&quot;Could NOT find IDL file for interface \&quot;$interfaceName\&quot;!\n&quot;);
</del><ins>+    my $idlFile = $object-&gt;IDLFileForInterface($interfaceName) or die(&quot;Could NOT find IDL file for interface \&quot;$interfaceName\&quot;!\n&quot;);
</ins><span class="cx"> 
</span><del>-    open FILE, &quot;&lt;&quot;, $idlFile;
</del><ins>+    open FILE, &quot;&lt;&quot;, $idlFile or die;
</ins><span class="cx">     my @lines = &lt;FILE&gt;;
</span><span class="cx">     close FILE;
</span><span class="cx"> 
</span><span class="lines">@@ -739,17 +749,16 @@
</span><span class="cx">     return $extendedAttributes;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub IsCallbackInterface
</del><ins>+sub ComputeIsCallbackInterface
</ins><span class="cx"> {
</span><span class="cx">   my $object = shift;
</span><span class="cx">   my $type = shift;
</span><span class="cx"> 
</span><span class="cx">   return 0 unless $object-&gt;IsWrapperType($type);
</span><span class="cx"> 
</span><del>-  my $idlFile = $object-&gt;IDLFileForInterface($type)
-      or die(&quot;Could NOT find IDL file for interface \&quot;$type\&quot;!\n&quot;);
</del><ins>+  my $idlFile = $object-&gt;IDLFileForInterface($type) or die(&quot;Could NOT find IDL file for interface \&quot;$type\&quot;!\n&quot;);
</ins><span class="cx"> 
</span><del>-  open FILE, &quot;&lt;&quot;, $idlFile;
</del><ins>+  open FILE, &quot;&lt;&quot;, $idlFile or die;
</ins><span class="cx">   my @lines = &lt;FILE&gt;;
</span><span class="cx">   close FILE;
</span><span class="cx"> 
</span><span class="lines">@@ -757,20 +766,35 @@
</span><span class="cx">   return ($fileContents =~ /callback\s+interface\s+(\w+)/gs);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+my %isCallbackInterface = ();
+
+sub IsCallbackInterface
+{
+    # FIXME: It's bad to have a function like this that opens another IDL file to answer a question.
+    # Overusing this kind of function can make things really slow. Lets avoid these if we can.
+    # To mitigate that, lets cache what we learn in a hash so we don't open the same file over and over.
+
+    my ($object, $type) = @_;
+
+    return $isCallbackInterface{$type} if exists $isCallbackInterface{$type};
+    my $result = ComputeIsCallbackInterface($object, $type);
+    $isCallbackInterface{$type} = $result;
+    return $result;
+}
+
</ins><span class="cx"> # Callback interface with [Callback=FunctionOnly].
</span><span class="cx"> # FIXME: This should be a callback function:
</span><span class="cx"> # https://heycam.github.io/webidl/#idl-callback-functions
</span><del>-sub IsFunctionOnlyCallbackInterface
</del><ins>+sub ComputeIsFunctionOnlyCallbackInterface
</ins><span class="cx"> {
</span><span class="cx">   my $object = shift;
</span><span class="cx">   my $type = shift;
</span><span class="cx"> 
</span><span class="cx">   return 0 unless $object-&gt;IsCallbackInterface($type);
</span><span class="cx"> 
</span><del>-  my $idlFile = $object-&gt;IDLFileForInterface($type)
-      or die(&quot;Could NOT find IDL file for interface \&quot;$type\&quot;!\n&quot;);
</del><ins>+  my $idlFile = $object-&gt;IDLFileForInterface($type) or die(&quot;Could NOT find IDL file for interface \&quot;$type\&quot;!\n&quot;);
</ins><span class="cx"> 
</span><del>-  open FILE, &quot;&lt;&quot;, $idlFile;
</del><ins>+  open FILE, &quot;&lt;&quot;, $idlFile or die;
</ins><span class="cx">   my @lines = &lt;FILE&gt;;
</span><span class="cx">   close FILE;
</span><span class="cx"> 
</span><span class="lines">@@ -791,6 +815,22 @@
</span><span class="cx">   return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+my %isFunctionOnlyCallbackInterface = ();
+
+sub IsFunctionOnlyCallbackInterface
+{
+    # FIXME: It's bad to have a function like this that opens another IDL file to answer a question.
+    # Overusing this kind of function can make things really slow. Lets avoid these if we can.
+    # To mitigate that, lets cache what we learn in a hash so we don't open the same file over and over.
+
+    my ($object, $type) = @_;
+
+    return $isFunctionOnlyCallbackInterface{$type} if exists $isFunctionOnlyCallbackInterface{$type};
+    my $result = ComputeIsFunctionOnlyCallbackInterface($object, $type);
+    $isFunctionOnlyCallbackInterface{$type} = $result;
+    return $result;
+}
+
</ins><span class="cx"> sub GenerateConditionalString
</span><span class="cx"> {
</span><span class="cx">     my $generator = shift;
</span><span class="lines">@@ -933,6 +973,7 @@
</span><span class="cx">     return 0 if $parameter-&gt;isNullable;
</span><span class="cx">     return 0 if !$object-&gt;IsWrapperType($parameter-&gt;type) &amp;&amp; !$object-&gt;IsTypedArrayType($parameter-&gt;type);
</span><span class="cx">     return 0 if $object-&gt;IsSVGTypeNeedingTearOff($parameter-&gt;type);
</span><ins>+
</ins><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -239,18 +239,15 @@
</span><span class="cx"> 
</span><span class="cx">     return if SkipIncludeHeader($type);
</span><span class="cx">     
</span><del>-    # When we're finished with the one-file-per-class
-    # reorganization, we won't need these special cases.
</del><ins>+    # When we're finished with the one-file-per-class reorganization, we won't need these special cases.
</ins><span class="cx">     if ($type eq &quot;XPathNSResolver&quot;) {
</span><span class="cx">         $includesRef-&gt;{&quot;JSXPathNSResolver.h&quot;} = 1;
</span><span class="cx">         $includesRef-&gt;{&quot;JSCustomXPathNSResolver.h&quot;} = 1;
</span><span class="cx">     } elsif ($isCallback &amp;&amp; $codeGenerator-&gt;IsWrapperType($type)) {
</span><span class="cx">         $includesRef-&gt;{&quot;JS${type}.h&quot;} = 1;
</span><del>-    } elsif ($codeGenerator-&gt;GetSequenceType($type) or $codeGenerator-&gt;GetArrayType($type)) {
</del><ins>+    } elsif ($codeGenerator-&gt;GetArrayOrSequenceType($type)) {
</ins><span class="cx">         my $arrayType = $codeGenerator-&gt;GetArrayType($type);
</span><del>-        my $sequenceType = $codeGenerator-&gt;GetSequenceType($type);
-        my $arrayOrSequenceType = $arrayType || $sequenceType;
-
</del><ins>+        my $arrayOrSequenceType = $arrayType || $codeGenerator-&gt;GetSequenceType($type);
</ins><span class="cx">         if ($arrayType eq &quot;DOMString&quot;) {
</span><span class="cx">             $includesRef-&gt;{&quot;JSDOMStringList.h&quot;} = 1;
</span><span class="cx">             $includesRef-&gt;{&quot;DOMStringList.h&quot;} = 1;
</span><span class="lines">@@ -280,39 +277,28 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub IsScriptProfileType
-{
-    my $type = shift;
-    return 1 if ($type eq &quot;ScriptProfileNode&quot;);
-    return 0;
-}
-
</del><span class="cx"> sub IsReadonly
</span><span class="cx"> {
</span><span class="cx">     my $attribute = shift;
</span><span class="cx">     return $attribute-&gt;isReadOnly &amp;&amp; !$attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Replaceable&quot;} &amp;&amp; !$attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;PutForwards&quot;};
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub AddTypedefForScriptProfileType
-{
-    my $type = shift;
-    (my $jscType = $type) =~ s/Script//;
-
-    push(@headerContent, &quot;typedef JSC::$jscType $type;\n\n&quot;);
-}
-
</del><span class="cx"> sub AddClassForwardIfNeeded
</span><span class="cx"> {
</span><span class="cx">     my $interfaceName = shift;
</span><span class="cx"> 
</span><del>-    # SVGAnimatedLength/Number/etc. are typedefs to SVGAnimatedTemplate, so don't use class forwards for them!
-    unless ($codeGenerator-&gt;IsSVGAnimatedType($interfaceName) or IsScriptProfileType($interfaceName) or $codeGenerator-&gt;IsTypedArrayType($interfaceName)) {
-        push(@headerContent, &quot;class $interfaceName;\n\n&quot;);
-    # ScriptProfile and ScriptProfileNode are typedefs to JSC::Profile and JSC::ProfileNode.
-    } elsif (IsScriptProfileType($interfaceName)) {
</del><ins>+    if ($interfaceName eq &quot;ScriptProfileNode&quot;) {
</ins><span class="cx">         $headerIncludes{&quot;&lt;profiler/ProfileNode.h&gt;&quot;} = 1;
</span><del>-        AddTypedefForScriptProfileType($interfaceName);
</del><ins>+        push(@headerContent, &quot;typedef JSC::ProfileNode ScriptProfileNode;\n\n&quot;);
+        return;
</ins><span class="cx">     }
</span><ins>+
+    # SVGAnimatedLength/Number/etc. are typedefs and should not be forward-declared as classes.
+    return if $codeGenerator-&gt;IsSVGAnimatedType($interfaceName);
+
+    return if $codeGenerator-&gt;IsTypedArrayType($interfaceName);
+
+    push(@headerContent, &quot;class $interfaceName;\n\n&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetGenerateIsReachable
</span><span class="lines">@@ -472,7 +458,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($interface) = @_;
</span><span class="cx"> 
</span><del>-    return 0 if ($interface-&gt;extendedAttributes-&gt;{&quot;JSBuiltin&quot;});
</del><ins>+    return 0 if $interface-&gt;extendedAttributes-&gt;{&quot;JSBuiltin&quot;};
</ins><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -679,8 +665,7 @@
</span><span class="cx">     # FIXME: The bindings generator does not support putting runtime-enabled operations on the instance yet (except for global objects).
</span><span class="cx">     return 0 if $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;EnabledAtRuntime&quot;};
</span><span class="cx"> 
</span><del>-    # [Unforgeable] operations should be on the instance.
-    # https://heycam.github.io/webidl/#Unforgeable
</del><ins>+    # [Unforgeable] operations should be on the instance. https://heycam.github.io/webidl/#Unforgeable
</ins><span class="cx">     return 1 if IsUnforgeable($interface, $function);
</span><span class="cx"> 
</span><span class="cx">     return 0;
</span><span class="lines">@@ -781,7 +766,6 @@
</span><span class="cx">         || $hasNamedGetter;
</span><span class="cx"> 
</span><span class="cx">     return $numInstanceProperties &gt; 0 || $hasComplexGetter;
</span><del>-
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub PrototypeOverridesGetOwnPropertySlot
</span><span class="lines">@@ -829,12 +813,14 @@
</span><span class="cx">     return $name;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub GetEnumerationClassName {
</del><ins>+sub GetEnumerationClassName
+{
</ins><span class="cx">     my ($name) = @_;
</span><span class="cx">     return $codeGenerator-&gt;WK_ucfirst($name);
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-sub GetEnumerationValueName {
</del><ins>+sub GetEnumerationValueName
+{
</ins><span class="cx">     my ($name) = @_;
</span><span class="cx">     return &quot;EmptyString&quot; if $name eq &quot;&quot;;
</span><span class="cx">     $name = join(&quot;&quot;, map { $codeGenerator-&gt;WK_ucfirst($_) } split(&quot;-&quot;, $name));
</span><span class="lines">@@ -1577,7 +1563,7 @@
</span><span class="cx">             # http://heycam.github.io/webidl/#es-nullable-type
</span><span class="cx">             $condition .= &quot;${value}.isNull() || &quot; if $parameter-&gt;isNullable;
</span><span class="cx"> 
</span><del>-            if ($codeGenerator-&gt;GetArrayType($type) || $codeGenerator-&gt;GetSequenceType($type)) {
</del><ins>+            if ($codeGenerator-&gt;GetArrayOrSequenceType($type)) {
</ins><span class="cx">                 # FIXME: Add proper support for T[], T[]?, sequence&lt;T&gt;.
</span><span class="cx">                 $condition .= &quot;(${value}.isObject() &amp;&amp; isJSArray(${value}))&quot;;
</span><span class="cx">             } else {
</span><span class="lines">@@ -1593,20 +1579,19 @@
</span><span class="cx">     return ($res, sort {$a &lt;=&gt; $b} (keys %usedArguments));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-# As per Web IDL specification, the length of a function Object is
-# its number of mandatory parameters.
</del><ins>+# As per Web IDL specification, the length of a function Object is its number of mandatory parameters.
</ins><span class="cx"> sub GetFunctionLength
</span><span class="cx"> {
</span><del>-  my $function = shift;
</del><ins>+    my $function = shift;
</ins><span class="cx"> 
</span><del>-  my $numMandatoryParams = 0;
-  foreach my $parameter (@{$function-&gt;parameters}) {
-    # Abort as soon as we find the first optional parameter as no mandatory
-    # parameter can follow an optional one.
-    last if $parameter-&gt;isOptional || $parameter-&gt;isVariadic;
-    $numMandatoryParams++;
-  }
-  return $numMandatoryParams;
</del><ins>+    my $length = 0;
+    foreach my $parameter (@{$function-&gt;parameters}) {
+        # Abort as soon as we find the first optional parameter as no mandatory
+        # parameter can follow an optional one.
+        last if $parameter-&gt;isOptional || $parameter-&gt;isVariadic;
+        $length++;
+    }
+    return $length;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GenerateFunctionParametersCheck
</span><span class="lines">@@ -2844,15 +2829,12 @@
</span><span class="cx">                 # is thrown rather than silently passing NULL to the C++ code.
</span><span class="cx">                 # Per the Web IDL and ECMAScript specifications, incoming values can always be converted to
</span><span class="cx">                 # both strings and numbers, so do not throw TypeError if the attribute is of these types.
</span><del>-                if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;StrictTypeChecking&quot;}) {
</del><ins>+                if ($codeGenerator-&gt;IsWrapperType($type) &amp;&amp; $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;StrictTypeChecking&quot;}) {
</ins><span class="cx">                     $implIncludes{&quot;&lt;runtime/Error.h&gt;&quot;} = 1;
</span><del>-
-                    if ($codeGenerator-&gt;IsWrapperType($type)) {
-                        push(@implContent, &quot;    if (UNLIKELY(!value.isUndefinedOrNull() &amp;&amp; !value.inherits(JS${type}::info()))) {\n&quot;);
-                        push(@implContent, &quot;        throwAttributeTypeError(*state, \&quot;$interfaceName\&quot;, \&quot;$name\&quot;, \&quot;$type\&quot;);\n&quot;);
-                        push(@implContent, &quot;        return false;\n&quot;);
-                        push(@implContent, &quot;    };\n&quot;);
-                    }
</del><ins>+                    push(@implContent, &quot;    if (UNLIKELY(!value.isUndefinedOrNull() &amp;&amp; !value.inherits(JS${type}::info()))) {\n&quot;);
+                    push(@implContent, &quot;        throwAttributeTypeError(*state, \&quot;$interfaceName\&quot;, \&quot;$name\&quot;, \&quot;$type\&quot;);\n&quot;);
+                    push(@implContent, &quot;        return false;\n&quot;);
+                    push(@implContent, &quot;    };\n&quot;);
</ins><span class="cx">                 }
</span><span class="cx"> 
</span><span class="cx">                 push(@implContent, &quot;    &quot; . GetNativeTypeFromSignature($attribute-&gt;signature) . &quot; nativeValue = &quot; . JSValueToNative($attribute-&gt;signature, &quot;value&quot;, $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;}) . &quot;;\n&quot;);
</span><span class="lines">@@ -3475,43 +3457,49 @@
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub WillConvertUndefinedToDefaultParameterValue
-{
-    my $parameterType = shift;
-    my $defaultValue = shift;
</del><ins>+my %automaticallyGeneratedDefaultValues = (
+    &quot;any&quot; =&gt; &quot;undefined&quot;,
</ins><span class="cx"> 
</span><del>-    if ($defaultValue eq &quot;[]&quot;) {
-        # Dictionary(state, undefined) will construct an empty Dictionary.
-        return 1 if $parameterType eq &quot;Dictionary&quot;;
-
-        # toRefPtrNativeArray() will convert undefined to an empty Vector.
-        return 1 if $codeGenerator-&gt;GetArrayType($parameterType) or $codeGenerator-&gt;GetSequenceType($parameterType);
-    }
-
</del><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;\&quot;undefined\&quot;&quot;;
</del><ins>+    # (note that this optimizes a behavior that is almost never useful)
+    &quot;DOMString&quot; =&gt; &quot;\&quot;undefined\&quot;&quot;,
</ins><span class="cx"> 
</span><del>-    return 1 if $parameterType eq &quot;any&quot; and $defaultValue eq &quot;undefined&quot;;
</del><ins>+    # Dictionary(state, undefined) will construct an empty Dictionary.
+    &quot;Dictionary&quot; =&gt; &quot;[]&quot;,
</ins><span class="cx"> 
</span><span class="cx">     # JSValue::toBoolean() will convert undefined to false.
</span><del>-    return 1 if $parameterType eq &quot;boolean&quot; and $defaultValue eq &quot;false&quot;;
</del><ins>+    &quot;boolean&quot; =&gt; &quot;false&quot;,
</ins><span class="cx"> 
</span><span class="cx">     # JSValue::toInt*() / JSValue::toUint*() will convert undefined to 0.
</span><del>-    if ($defaultValue eq &quot;0&quot;) {
-        return 1 if $parameterType eq &quot;byte&quot; or $parameterType eq &quot;octet&quot;;
-        return 1 if $parameterType eq &quot;short&quot; or $parameterType eq &quot;unsigned short&quot;;
-        return 1 if $parameterType eq &quot;long&quot; or $parameterType eq &quot;unsigned long&quot;;
-        return 1 if $parameterType eq &quot;long long&quot; or $parameterType eq &quot;unsigned long long&quot;;
-    }
</del><ins>+    &quot;byte&quot; =&gt; &quot;0&quot;,
+    &quot;long long&quot; =&gt; &quot;0&quot;,
+    &quot;long&quot; =&gt; &quot;0&quot;,
+    &quot;octet&quot; =&gt; &quot;0&quot;,
+    &quot;short&quot; =&gt; &quot;0&quot;,
+    &quot;unsigned long long&quot; =&gt; &quot;0&quot;,
+    &quot;unsigned long&quot; =&gt; &quot;0&quot;,
+    &quot;unsigned short&quot; =&gt; &quot;0&quot;,
</ins><span class="cx"> 
</span><del>-    if ($defaultValue eq &quot;NaN&quot;) {
-        # toNumber() / toFloat() convert undefined to NaN.
-        return 1 if $parameterType eq &quot;double&quot; or $parameterType eq &quot;unrestricted double&quot;;
-        return 1 if $parameterType eq &quot;float&quot; or $parameterType eq &quot;unrestricted float&quot;;
-    }
</del><ins>+    # toNumber() / toFloat() convert undefined to NaN.
+    &quot;double&quot; =&gt; &quot;NaN&quot;,
+    &quot;float&quot; =&gt; &quot;NaN&quot;,
+    &quot;unrestricted double&quot; =&gt; &quot;NaN&quot;,
+    &quot;unrestricted float&quot; =&gt; &quot;NaN&quot;,
+);
</ins><span class="cx"> 
</span><del>-    return 1 if $codeGenerator-&gt;IsWrapperType($parameterType) and $defaultValue eq &quot;null&quot;;
</del><ins>+sub WillConvertUndefinedToDefaultParameterValue
+{
+    my $parameterType = shift;
+    my $defaultValue = shift;
</ins><span class="cx"> 
</span><ins>+    my $automaticallyGeneratedDefaultValue = $automaticallyGeneratedDefaultValues{$parameterType};
+    return 1 if defined $automaticallyGeneratedDefaultValue &amp;&amp; $automaticallyGeneratedDefaultValue eq $defaultValue;
+
+    # toRefPtrNativeArray() will convert undefined to an empty Vector.
+    return 1 if $defaultValue eq &quot;[]&quot; &amp;&amp; $codeGenerator-&gt;GetArrayOrSequenceType($parameterType);
+
+    return 1 if $defaultValue eq &quot;null&quot; &amp;&amp; $codeGenerator-&gt;IsWrapperType($parameterType);
+
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4265,26 +4253,25 @@
</span><span class="cx"> 
</span><span class="cx"> my %nativeType = (
</span><span class="cx">     &quot;DOMString&quot; =&gt; &quot;String&quot;,
</span><del>-    &quot;NodeFilter&quot; =&gt; &quot;RefPtr&lt;NodeFilter&gt;&quot;,
-    &quot;SerializedScriptValue&quot; =&gt; &quot;RefPtr&lt;SerializedScriptValue&gt;&quot;,
</del><ins>+    &quot;DOMTimeStamp&quot; =&gt; &quot;DOMTimeStamp&quot;,
</ins><span class="cx">     &quot;Date&quot; =&gt; &quot;double&quot;,
</span><span class="cx">     &quot;Dictionary&quot; =&gt; &quot;Dictionary&quot;,
</span><ins>+    &quot;NodeFilter&quot; =&gt; &quot;RefPtr&lt;NodeFilter&gt;&quot;,
+    &quot;SerializedScriptValue&quot; =&gt; &quot;RefPtr&lt;SerializedScriptValue&gt;&quot;,
</ins><span class="cx">     &quot;any&quot; =&gt; &quot;JSC::JSValue&quot;,
</span><span class="cx">     &quot;boolean&quot; =&gt; &quot;bool&quot;,
</span><ins>+    &quot;byte&quot; =&gt; &quot;int8_t&quot;,
</ins><span class="cx">     &quot;double&quot; =&gt; &quot;double&quot;,
</span><span class="cx">     &quot;float&quot; =&gt; &quot;float&quot;,
</span><ins>+    &quot;long long&quot; =&gt; &quot;long long&quot;,
+    &quot;long&quot; =&gt; &quot;int&quot;,
+    &quot;octet&quot; =&gt; &quot;uint8_t&quot;,
+    &quot;short&quot; =&gt; &quot;int16_t&quot;,
</ins><span class="cx">     &quot;unrestricted double&quot; =&gt; &quot;double&quot;,
</span><span class="cx">     &quot;unrestricted float&quot; =&gt; &quot;float&quot;,
</span><del>-    &quot;short&quot; =&gt; &quot;int16_t&quot;,
-    &quot;long&quot; =&gt; &quot;int&quot;,
</del><ins>+    &quot;unsigned long long&quot; =&gt; &quot;unsigned long long&quot;,
</ins><span class="cx">     &quot;unsigned long&quot; =&gt; &quot;unsigned&quot;,
</span><span class="cx">     &quot;unsigned short&quot; =&gt; &quot;uint16_t&quot;,
</span><del>-    &quot;long long&quot; =&gt; &quot;long long&quot;,
-    &quot;unsigned long long&quot; =&gt; &quot;unsigned long long&quot;,
-    &quot;byte&quot; =&gt; &quot;int8_t&quot;,
-    &quot;octet&quot; =&gt; &quot;uint8_t&quot;,
-    &quot;DOMTimeStamp&quot; =&gt; &quot;DOMTimeStamp&quot;,
-    &quot;Symbol&quot; =&gt; &quot;PrivateName&quot;
</del><span class="cx"> );
</span><span class="cx"> 
</span><span class="cx"> sub GetNativeType
</span><span class="lines">@@ -4299,9 +4286,7 @@
</span><span class="cx">     return &quot;RefPtr&lt;${type}&gt;&quot; if $codeGenerator-&gt;IsTypedArrayType($type) and not $type eq &quot;ArrayBuffer&quot;;
</span><span class="cx">     return $nativeType{$type} if exists $nativeType{$type};
</span><span class="cx"> 
</span><del>-    my $arrayType = $codeGenerator-&gt;GetArrayType($type);
-    my $sequenceType = $codeGenerator-&gt;GetSequenceType($type);
-    my $arrayOrSequenceType = $arrayType || $sequenceType;
</del><ins>+    my $arrayOrSequenceType = $codeGenerator-&gt;GetArrayOrSequenceType($type);
</ins><span class="cx"> 
</span><span class="cx">     return &quot;Vector&lt;&quot; . GetNativeVectorInnerType($arrayOrSequenceType) . &quot;&gt;&quot; if $arrayOrSequenceType;
</span><span class="cx">     return &quot;String&quot; if $codeGenerator-&gt;IsStringBasedEnumType($type);
</span><span class="lines">@@ -4391,6 +4376,17 @@
</span><span class="cx">     return exists $nativeType{$type};
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+my %integerConversionFunction = (
+    &quot;byte&quot; =&gt; &quot;toInt8&quot;,
+    &quot;long long&quot; =&gt; &quot;toInt64&quot;,
+    &quot;long&quot; =&gt; &quot;toInt32&quot;,
+    &quot;octet&quot; =&gt; &quot;toUInt8&quot;,
+    &quot;short&quot; =&gt; &quot;toInt16&quot;,
+    &quot;unsigned long long&quot; =&gt; &quot;toUInt64&quot;,
+    &quot;unsigned long&quot; =&gt; &quot;toUInt32&quot;,
+    &quot;unsigned short&quot; =&gt; &quot;toUInt16&quot;,
+);
+
</ins><span class="cx"> sub JSValueToNative
</span><span class="cx"> {
</span><span class="cx">     my $signature = shift;
</span><span class="lines">@@ -4399,24 +4395,14 @@
</span><span class="cx"> 
</span><span class="cx">     my $type = $signature-&gt;type;
</span><span class="cx"> 
</span><del>-    return &quot;$value.toBoolean(state)&quot; if $type eq &quot;boolean&quot;;
-    return &quot;$value.toNumber(state)&quot; if $type eq &quot;double&quot; or $type eq &quot;unrestricted double&quot; ;
-    return &quot;$value.toFloat(state)&quot; if $type eq &quot;float&quot; or $type eq &quot;unrestricted float&quot; ;
</del><ins>+    my $function = $integerConversionFunction{$type};
+    if ($function) {
+        my $conversionType = &quot;NormalConversion&quot;;
+        $conversionType = &quot;EnforceRange&quot; if $signature-&gt;extendedAttributes-&gt;{&quot;EnforceRange&quot;};
+        $conversionType = &quot;Clamp&quot; if $signature-&gt;extendedAttributes-&gt;{&quot;Clamp&quot;};
+        return &quot;$function(state, $value, $conversionType)&quot;;
+    }
</ins><span class="cx"> 
</span><del>-    my $intConversion = &quot;NormalConversion&quot;;
-    $intConversion = &quot;EnforceRange&quot; if $signature-&gt;extendedAttributes-&gt;{&quot;EnforceRange&quot;};
-    $intConversion = &quot;Clamp&quot; if $signature-&gt;extendedAttributes-&gt;{&quot;Clamp&quot;};
-    return &quot;toInt8(state, $value, $intConversion)&quot; if $type eq &quot;byte&quot;;
-    return &quot;toUInt8(state, $value, $intConversion)&quot; if $type eq &quot;octet&quot;;
-    return &quot;toInt16(state, $value, $intConversion)&quot; if $type eq &quot;short&quot;;
-    return &quot;toUInt16(state, $value, $intConversion)&quot; if $type eq &quot;unsigned short&quot;;
-    return &quot;toInt32(state, $value, $intConversion)&quot; if $type eq &quot;long&quot;;
-    return &quot;toUInt32(state, $value, $intConversion)&quot; if $type eq &quot;unsigned long&quot;;
-    return &quot;toInt64(state, $value, $intConversion)&quot; if $type eq &quot;long long&quot;;
-    return &quot;toUInt64(state, $value, $intConversion)&quot; if $type eq &quot;unsigned long long&quot;;
-
-    return &quot;valueToDate(state, $value)&quot; if $type eq &quot;Date&quot;;
-
</del><span class="cx">     if ($type eq &quot;DOMString&quot;) {
</span><span class="cx">         if ($signature-&gt;extendedAttributes-&gt;{&quot;TreatNullAs&quot;}) {
</span><span class="cx">             return &quot;valueToStringTreatingNullAsEmptyString(state, $value)&quot; if $signature-&gt;extendedAttributes-&gt;{&quot;TreatNullAs&quot;} eq &quot;EmptyString&quot;;
</span><span class="lines">@@ -4424,19 +4410,9 @@
</span><span class="cx">         }
</span><span class="cx">         return &quot;valueToStringWithUndefinedOrNullCheck(state, $value)&quot; if $signature-&gt;isNullable;
</span><span class="cx">         return &quot;$value.toString(state)-&gt;toAtomicString(state)&quot; if $signature-&gt;extendedAttributes-&gt;{&quot;AtomicString&quot;};
</span><del>-
</del><span class="cx">         return &quot;$value.toWTFString(state)&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($type eq &quot;any&quot;) {
-        return $value;
-    }
-
-    if ($type eq &quot;NodeFilter&quot;) {
-        AddToImplIncludes(&quot;JS$type.h&quot;, $conditional);
-        return &quot;JS${type}::toWrapped(state-&gt;vm(), $value)&quot;;
-    }
-
</del><span class="cx">     if ($type eq &quot;SerializedScriptValue&quot;) {
</span><span class="cx">         AddToImplIncludes(&quot;SerializedScriptValue.h&quot;, $conditional);
</span><span class="cx">         return &quot;SerializedScriptValue::create(state, $value, 0, 0)&quot;;
</span><span class="lines">@@ -4447,22 +4423,7 @@
</span><span class="cx">         return &quot;{ state, $value }&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($type eq &quot;DOMStringList&quot; ) {
-        AddToImplIncludes(&quot;JSDOMStringList.h&quot;, $conditional);
-        return &quot;toDOMStringList(state, $value)&quot;;
-    }
-    
-    if ($codeGenerator-&gt;IsTypedArrayType($type)) {
-        return &quot;to$type($value)&quot;;
-    }
-
-    AddToImplIncludes(&quot;HTMLOptionElement.h&quot;, $conditional) if $type eq &quot;HTMLOptionElement&quot;;
-    AddToImplIncludes(&quot;Event.h&quot;, $conditional) if $type eq &quot;Event&quot;;
-
-    my $arrayType = $codeGenerator-&gt;GetArrayType($type);
-    my $sequenceType = $codeGenerator-&gt;GetSequenceType($type);
-    my $arrayOrSequenceType = $arrayType || $sequenceType;
-
</del><ins>+    my $arrayOrSequenceType = $codeGenerator-&gt;GetArrayOrSequenceType($type);
</ins><span class="cx">     if ($arrayOrSequenceType) {
</span><span class="cx">         if ($codeGenerator-&gt;IsRefPtrType($arrayOrSequenceType)) {
</span><span class="cx">             AddToImplIncludes(&quot;JS${arrayOrSequenceType}.h&quot;);
</span><span class="lines">@@ -4471,15 +4432,22 @@
</span><span class="cx">         return &quot;toNativeArray&lt;&quot; . GetNativeVectorInnerType($arrayOrSequenceType) . &quot;&gt;(state, $value)&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return &quot;$value.toWTFString(state)&quot; if $codeGenerator-&gt;IsStringBasedEnumType($type);
</del><ins>+    return $value if $type eq &quot;any&quot;;
</ins><span class="cx"> 
</span><del>-    if ($codeGenerator-&gt;IsEnumType($type)) {
-        my $className = GetEnumerationClassName($type);
-        return &quot;parse$className(*state, $value)&quot;;
-    }
</del><ins>+    return &quot;$value.toBoolean(state)&quot; if $type eq &quot;boolean&quot;;
+    return &quot;$value.toNumber(state)&quot; if $type eq &quot;double&quot; or $type eq &quot;unrestricted double&quot;;
+    return &quot;$value.toFloat(state)&quot; if $type eq &quot;float&quot; or $type eq &quot;unrestricted float&quot;;
+    return &quot;valueToDate(state, $value)&quot; if $type eq &quot;Date&quot;;
</ins><span class="cx"> 
</span><del>-    # Default, assume autogenerated type conversion routines
</del><ins>+    return &quot;to$type($value)&quot; if $codeGenerator-&gt;IsTypedArrayType($type);
+    return &quot;$value.toWTFString(state)&quot; if $codeGenerator-&gt;IsStringBasedEnumType($type);
+    return &quot;parse&quot; . GetEnumerationClassName($type) . &quot;(*state, $value)&quot; if $codeGenerator-&gt;IsEnumType($type);
+
</ins><span class="cx">     AddToImplIncludes(&quot;JS$type.h&quot;, $conditional);
</span><ins>+
+    return &quot;toDOMStringList(state, $value)&quot; if $type eq &quot;DOMStringList&quot;;
+    return &quot;JSNodeFilter::toWrapped(state-&gt;vm(), $value)&quot; if $type eq &quot;NodeFilter&quot;;
+
</ins><span class="cx">     return &quot;JS${type}::toWrapped($value)&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4494,32 +4462,24 @@
</span><span class="cx">     my $conditional = $signature-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;};
</span><span class="cx">     my $type = $signature-&gt;type;
</span><span class="cx"> 
</span><ins>+    my $globalObject = $thisValue ? &quot;$thisValue-&gt;globalObject()&quot; : &quot;jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject())&quot;;
+
</ins><span class="cx">     return &quot;jsBoolean($value)&quot; if $type eq &quot;boolean&quot;;
</span><span class="cx"> 
</span><del>-    # Need to check Date type before IsPrimitiveType().
</del><span class="cx">     if ($type eq &quot;Date&quot;) {
</span><del>-        my $conv = $signature-&gt;extendedAttributes-&gt;{&quot;TreatReturnedNaNDateAs&quot;};
-        if (defined $conv) {
-            return &quot;jsDateOrNull(state, $value)&quot; if $conv eq &quot;Null&quot;;
-            return &quot;jsDateOrNaN(state, $value)&quot; if $conv eq &quot;NaN&quot;;
-            
-            die &quot;Unknown value for TreatReturnedNaNDateAs extended attribute&quot;;
-        }
-        return &quot;jsDateOrNull(state, $value)&quot;;
</del><ins>+        my $handlingForNaN = $signature-&gt;extendedAttributes-&gt;{&quot;TreatReturnedNaNDateAs&quot;};
+        return &quot;jsDateOrNull(state, $value)&quot; if !defined $handlingForNaN || $handlingForNaN eq &quot;Null&quot;;
+        return &quot;jsDateOrNaN(state, $value)&quot; if $handlingForNaN eq &quot;NaN&quot;;
+        die &quot;Unknown value for TreatReturnedNaNDateAs extended attribute&quot;;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($type eq &quot;Symbol&quot;) {
-        AddToImplIncludes(&quot;&lt;runtime/Symbol.h&gt;&quot;, $conditional);
-        return &quot;Symbol::create(state-&gt;vm(), *($value).uid())&quot;;
-    }
-
-    if ($codeGenerator-&gt;IsPrimitiveType($type) or $type eq &quot;DOMTimeStamp&quot;) {
</del><ins>+    if ($codeGenerator-&gt;IsNumericType($type) or $type eq &quot;DOMTimeStamp&quot;) {
</ins><span class="cx">         # We could instead overload a function to work with optional as well as non-optional numbers, but this
</span><span class="cx">         # is slightly better because it guarantees we will fail to compile if the IDL file doesn't match the C++.
</span><span class="cx">         my $function = $signature-&gt;isNullable ? &quot;toNullableJSNumber&quot; : &quot;jsNumber&quot;;
</span><span class="cx">         if ($signature-&gt;extendedAttributes-&gt;{&quot;Reflect&quot;} and ($type eq &quot;unsigned long&quot; or $type eq &quot;unsigned short&quot;)) {
</span><span class="cx">             $value =~ s/getUnsignedIntegralAttribute/getIntegralAttribute/g;
</span><del>-            return &quot;$function(std::max(0, &quot; . $value . &quot;))&quot;;
</del><ins>+            $value = &quot;std::max(0, $value)&quot;;
</ins><span class="cx">         }
</span><span class="cx">         return &quot;$function($value)&quot;;
</span><span class="cx">     }
</span><span class="lines">@@ -4536,34 +4496,16 @@
</span><span class="cx">         return &quot;jsStringWithCache(state, $value)&quot;;
</span><span class="cx">     }
</span><span class="cx">     
</span><del>-    my $globalObject;
-    if ($thisValue) {
-        $globalObject = &quot;$thisValue-&gt;globalObject()&quot;;
-    }
-
-    if ($type eq &quot;CSSStyleDeclaration&quot;) {
-        AddToImplIncludes(&quot;StyleProperties.h&quot;, $conditional);
-    }
-
-    if ($type eq &quot;NodeList&quot;) {
-        AddToImplIncludes(&quot;NameNodeList.h&quot;, $conditional);
-    }
-
</del><span class="cx">     my $arrayType = $codeGenerator-&gt;GetArrayType($type);
</span><del>-    my $sequenceType = $codeGenerator-&gt;GetSequenceType($type);
-    my $arrayOrSequenceType = $arrayType || $sequenceType;
</del><ins>+    my $arrayOrSequenceType = $arrayType || $codeGenerator-&gt;GetSequenceType($type);
</ins><span class="cx"> 
</span><span class="cx">     if ($arrayOrSequenceType) {
</span><span class="cx">         if ($arrayType eq &quot;DOMString&quot;) {
</span><span class="cx">             AddToImplIncludes(&quot;JSDOMStringList.h&quot;, $conditional);
</span><del>-            AddToImplIncludes(&quot;DOMStringList.h&quot;, $conditional);
-
</del><span class="cx">         } elsif ($codeGenerator-&gt;IsRefPtrType($arrayOrSequenceType)) {
</span><span class="cx">             AddToImplIncludes(&quot;JS${arrayOrSequenceType}.h&quot;, $conditional);
</span><del>-            AddToImplIncludes(&quot;${arrayOrSequenceType}.h&quot;, $conditional);
</del><span class="cx">         }
</span><span class="cx">         AddToImplIncludes(&quot;&lt;runtime/JSArray.h&gt;&quot;, $conditional);
</span><del>-
</del><span class="cx">         return &quot;jsArray(state, $globalObject, $value)&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -4572,35 +4514,30 @@
</span><span class="cx">         if (defined $returnType and ($returnType eq &quot;IDBKeyPath&quot; or $returnType eq &quot;IDBKey&quot;)) {
</span><span class="cx">             AddToImplIncludes(&quot;IDBBindingUtilities.h&quot;, $conditional);
</span><span class="cx">             return &quot;toJS(*state, *$globalObject, $value)&quot;;
</span><del>-        } else {
-            return $value;
</del><span class="cx">         }
</span><del>-    } elsif ($type eq &quot;SerializedScriptValue&quot;) {
</del><ins>+        return $value;
+    }
+
+    if ($type eq &quot;SerializedScriptValue&quot;) {
</ins><span class="cx">         AddToImplIncludes(&quot;SerializedScriptValue.h&quot;, $conditional);
</span><span class="cx">         return &quot;$value ? $value-&gt;deserialize(state, castedThis-&gt;globalObject(), 0) : jsNull()&quot;;
</span><del>-    } elsif ($codeGenerator-&gt;IsTypedArrayType($type)) {
-        # Do nothing - all headers are already included.
-    } else {
-        # Default, include header with same name.
-        AddToImplIncludes(&quot;JS$type.h&quot;, $conditional);
-        AddToImplIncludes(&quot;$type.h&quot;, $conditional) if not $codeGenerator-&gt;SkipIncludeHeader($type);
</del><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    AddToImplIncludes(&quot;StyleProperties.h&quot;, $conditional) if $type eq &quot;CSSStyleDeclaration&quot;;
+    AddToImplIncludes(&quot;NameNodeList.h&quot;, $conditional) if $type eq &quot;NodeList&quot;;
+    AddToImplIncludes(&quot;JS$type.h&quot;, $conditional) if !$codeGenerator-&gt;IsTypedArrayType($type);
+
</ins><span class="cx">     return $value if $codeGenerator-&gt;IsSVGAnimatedType($type);
</span><span class="cx"> 
</span><del>-    if ($signature-&gt;extendedAttributes-&gt;{&quot;NewObject&quot;}) {
-        return &quot;toJSNewlyCreated(state, $globalObject, WTF::getPtr($value))&quot;;
-    }
-
</del><span class="cx">     if ($codeGenerator-&gt;IsSVGAnimatedType($interfaceName) or ($interfaceName eq &quot;SVGViewSpec&quot; and $type eq &quot;SVGTransformList&quot;)) {
</span><span class="cx">         # Convert from abstract RefPtr&lt;ListProperty&gt; to real type, so the right toJS() method can be invoked.
</span><del>-        $value = &quot;static_cast&lt;&quot; . GetNativeType($type) . &quot;&gt;($value&quot; . &quot;.get())&quot;;
</del><ins>+        $value = &quot;static_cast&lt;&quot; . GetNativeType($type) . &quot;&gt;($value.get())&quot;;
</ins><span class="cx">     } elsif ($interfaceName eq &quot;SVGViewSpec&quot;) {
</span><span class="cx">         # Convert from abstract SVGProperty to real type, so the right toJS() method can be invoked.
</span><span class="cx">         $value = &quot;static_cast&lt;&quot; . GetNativeType($type) . &quot;&gt;($value)&quot;;
</span><span class="cx">     } elsif ($codeGenerator-&gt;IsSVGTypeNeedingTearOff($type) and not $interfaceName =~ /List$/) {
</span><span class="cx">         my $tearOffType = $codeGenerator-&gt;GetSVGTypeNeedingTearOff($type);
</span><del>-        if ($codeGenerator-&gt;IsSVGTypeWithWritablePropertiesNeedingTearOff($type) and $inFunctionCall eq 0 and not defined $signature-&gt;extendedAttributes-&gt;{&quot;Immutable&quot;}) {
</del><ins>+        if ($codeGenerator-&gt;IsSVGTypeWithWritablePropertiesNeedingTearOff($type) and !$inFunctionCall and not defined $signature-&gt;extendedAttributes-&gt;{&quot;Immutable&quot;}) {
</ins><span class="cx">             my $getter = $value;
</span><span class="cx">             $getter =~ s/impl\.//;
</span><span class="cx">             $getter =~ s/impl-&gt;//;
</span><span class="lines">@@ -4609,8 +4546,8 @@
</span><span class="cx"> 
</span><span class="cx">             my $selfIsTearOffType = $codeGenerator-&gt;IsSVGTypeNeedingTearOff($interfaceName);
</span><span class="cx">             if ($selfIsTearOffType) {
</span><ins>+                # FIXME: Why SVGMatrix specifically?
</ins><span class="cx">                 AddToImplIncludes(&quot;SVGMatrixTearOff.h&quot;, $conditional);
</span><del>-                # FIXME: Blink: Don't create a new one everytime we access the matrix property. This means, e.g, === won't work.
</del><span class="cx">                 $value = &quot;SVGMatrixTearOff::create(castedThis-&gt;wrapped(), $value)&quot;;
</span><span class="cx">             } else {
</span><span class="cx">                 AddToImplIncludes(&quot;SVGStaticPropertyTearOff.h&quot;, $conditional);
</span><span class="lines">@@ -4623,11 +4560,10 @@
</span><span class="cx">             $value = &quot;${tearOffType}::create($value)&quot;;
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    if ($globalObject) {
-        return &quot;toJS(state, $globalObject, WTF::getPtr($value))&quot;;
-    } else {
-        return &quot;toJS(state, jsCast&lt;JSDOMGlobalObject*&gt;(state-&gt;lexicalGlobalObject()), WTF::getPtr($value))&quot;;
-    }
</del><ins>+
+    my $function = $signature-&gt;extendedAttributes-&gt;{&quot;NewObject&quot;} ? &quot;toJSNewlyCreated&quot; : &quot;toJS&quot;;
+
+    return &quot;$function(state, $globalObject, WTF::getPtr($value))&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub ceilingToPowerOf2
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallback.cpp        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,13 +24,11 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;JSTestCallback.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;DOMStringList.h&quot;
</del><span class="cx"> #include &quot;JSDOMConstructor.h&quot;
</span><span class="cx"> #include &quot;JSDOMStringList.h&quot;
</span><span class="cx"> #include &quot;JSTestNode.h&quot;
</span><span class="cx"> #include &quot;ScriptExecutionContext.h&quot;
</span><span class="cx"> #include &quot;SerializedScriptValue.h&quot;
</span><del>-#include &quot;TestNode.h&quot;
</del><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &lt;runtime/FunctionPrototype.h&gt;
</span><span class="cx"> #include &lt;runtime/JSLock.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestCallbackFunctioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestCallbackFunction.cpp        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,12 +24,10 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;JSTestCallbackFunction.h&quot;
</span><span class="cx"> 
</span><del>-#include &quot;DOMStringList.h&quot;
</del><span class="cx"> #include &quot;JSDOMStringList.h&quot;
</span><span class="cx"> #include &quot;JSTestNode.h&quot;
</span><span class="cx"> #include &quot;ScriptExecutionContext.h&quot;
</span><span class="cx"> #include &quot;SerializedScriptValue.h&quot;
</span><del>-#include &quot;TestNode.h&quot;
</del><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &lt;runtime/JSLock.h&gt;
</span><span class="cx"> #include &lt;runtime/JSString.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -40,7 +40,6 @@
</span><span class="cx"> #if ENABLE(Condition11) || ENABLE(Condition12) || ENABLE(Condition22) || ENABLE(Condition23)
</span><span class="cx"> #include &quot;JSNode.h&quot;
</span><span class="cx"> #include &quot;JSTestObj.h&quot;
</span><del>-#include &quot;Node.h&quot;
</del><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &lt;runtime/JSString.h&gt;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -54,7 +54,6 @@
</span><span class="cx"> #include &quot;ScriptProfile.h&quot;
</span><span class="cx"> #include &quot;SerializedScriptValue.h&quot;
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><del>-#include &quot;TestNode.h&quot;
</del><span class="cx"> #include &quot;TestObj.h&quot;
</span><span class="cx"> #include &quot;URL.h&quot;
</span><span class="cx"> #include &quot;WebCoreJSClientData.h&quot;
</span><span class="lines">@@ -66,7 +65,6 @@
</span><span class="cx"> #include &lt;runtime/JSArray.h&gt;
</span><span class="cx"> #include &lt;runtime/JSString.h&gt;
</span><span class="cx"> #include &lt;runtime/PropertyNameArray.h&gt;
</span><del>-#include &lt;runtime/Symbol.h&gt;
</del><span class="cx"> #include &lt;wtf/GetPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(Condition1)
</span><span class="lines">@@ -441,8 +439,6 @@
</span><span class="cx"> bool setJSTestObjXMLObjAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjCreate(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> bool setJSTestObjCreate(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</span><del>-JSC::EncodedJSValue jsTestObjReadOnlySymbolAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
-JSC::EncodedJSValue jsTestObjConstructorStaticReadOnlySymbolAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
</del><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="cx"> bool setJSTestObjReflectedStringAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::EncodedJSValue);
</span><span class="cx"> JSC::EncodedJSValue jsTestObjReflectedIntegralAttr(JSC::ExecState*, JSC::EncodedJSValue, JSC::PropertyName);
</span><span class="lines">@@ -665,7 +661,6 @@
</span><span class="cx">     { &quot;staticReadOnlyLongAttr&quot;, DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjConstructorStaticReadOnlyLongAttr), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(0) } },
</span><span class="cx">     { &quot;staticStringAttr&quot;, DontDelete, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjConstructorStaticStringAttr), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjConstructorStaticStringAttr) } },
</span><span class="cx">     { &quot;TestSubObj&quot;, DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjConstructorTestSubObj), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(0) } },
</span><del>-    { &quot;staticReadOnlySymbolAttr&quot;, DontDelete | ReadOnly, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjConstructorStaticReadOnlySymbolAttr), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(0) } },
</del><span class="cx">     { &quot;nullableStringStaticMethod&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjConstructorFunctionNullableStringStaticMethod), (intptr_t) (0) } },
</span><span class="cx">     { &quot;staticMethodWithCallbackAndOptionalArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjConstructorFunctionStaticMethodWithCallbackAndOptionalArg), (intptr_t) (0) } },
</span><span class="cx">     { &quot;staticMethodWithCallbackArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjConstructorFunctionStaticMethodWithCallbackArg), (intptr_t) (1) } },
</span><span class="lines">@@ -752,7 +747,6 @@
</span><span class="cx">     { &quot;stringAttrTreatingNullAsEmptyString&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjStringAttrTreatingNullAsEmptyString), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjStringAttrTreatingNullAsEmptyString) } },
</span><span class="cx">     { &quot;XMLObjAttr&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjXMLObjAttr), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjXMLObjAttr) } },
</span><span class="cx">     { &quot;create&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjCreate), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjCreate) } },
</span><del>-    { &quot;readOnlySymbolAttr&quot;, ReadOnly | CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjReadOnlySymbolAttr), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(0) } },
</del><span class="cx">     { &quot;reflectedStringAttr&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjReflectedStringAttr), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjReflectedStringAttr) } },
</span><span class="cx">     { &quot;reflectedIntegralAttr&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjReflectedIntegralAttr), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjReflectedIntegralAttr) } },
</span><span class="cx">     { &quot;reflectedUnsignedIntegralAttr&quot;, CustomAccessor, NoIntrinsic, { (intptr_t)static_cast&lt;PropertySlot::GetValueFunc&gt;(jsTestObjReflectedUnsignedIntegralAttr), (intptr_t) static_cast&lt;PutPropertySlot::PutValueFunc&gt;(setJSTestObjReflectedUnsignedIntegralAttr) } },
</span><span class="lines">@@ -1410,30 +1404,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-EncodedJSValue jsTestObjReadOnlySymbolAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
-{
-    UNUSED_PARAM(state);
-    UNUSED_PARAM(thisValue);
-    JSValue decodedThisValue = JSValue::decode(thisValue);
-    auto* castedThis = jsDynamicCast&lt;JSTestObj*&gt;(decodedThisValue);
-    if (UNLIKELY(!castedThis)) {
-        return throwGetterTypeError(*state, &quot;TestObj&quot;, &quot;readOnlySymbolAttr&quot;);
-    }
-    auto&amp; impl = castedThis-&gt;wrapped();
-    JSValue result = Symbol::create(state-&gt;vm(), *(impl.readOnlySymbolAttr()).uid());
-    return JSValue::encode(result);
-}
-
-
-EncodedJSValue jsTestObjConstructorStaticReadOnlySymbolAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
-{
-    UNUSED_PARAM(state);
-    UNUSED_PARAM(thisValue);
-    JSValue result = Symbol::create(state-&gt;vm(), *(TestObj::staticReadOnlySymbolAttr()).uid());
-    return JSValue::encode(result);
-}
-
-
</del><span class="cx"> EncodedJSValue jsTestObjReflectedStringAttr(ExecState* state, EncodedJSValue thisValue, PropertyName)
</span><span class="cx"> {
</span><span class="cx">     UNUSED_PARAM(state);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestSerializedScriptValueInterfacecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -27,7 +27,6 @@
</span><span class="cx"> #include &quot;JSDOMBinding.h&quot;
</span><span class="cx"> #include &quot;JSDOMConstructor.h&quot;
</span><span class="cx"> #include &quot;JSMessagePort.h&quot;
</span><del>-#include &quot;MessagePort.h&quot;
</del><span class="cx"> #include &quot;SerializedScriptValue.h&quot;
</span><span class="cx"> #include &lt;runtime/FunctionPrototype.h&gt;
</span><span class="cx"> #include &lt;runtime/JSArray.h&gt;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -71,10 +71,6 @@
</span><span class="cx">     attribute TestObj                  XMLObjAttr;
</span><span class="cx">     attribute boolean                  create;
</span><span class="cx"> 
</span><del>-    // Readonly Symbol typed attributes.
-    readonly attribute Symbol readOnlySymbolAttr;
-    static readonly attribute Symbol staticReadOnlySymbolAttr;
-
</del><span class="cx">     // Reflected DOM attributes
</span><span class="cx">     [Reflect] attribute DOMString reflectedStringAttr;
</span><span class="cx">     [Reflect] attribute long reflectedIntegralAttr;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasEXTBlendMinMaxidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/EXTBlendMinMax.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/EXTBlendMinMax.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/html/canvas/EXTBlendMinMax.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,10 +24,10 @@
</span><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx"> [
</span><ins>+    Conditional=WEBGL,
+    GenerateIsReachable=ImplWebGLRenderingContext,
</ins><span class="cx">     NoInterfaceObject,
</span><del>-    Conditional=WEBGL,
-    GenerateIsReachable=ImplWebGLRenderingContext
</del><span class="cx"> ] interface EXTBlendMinMax {
</span><del>-    const unsigned int MIN_EXT = 0x8007;
-    const unsigned int MAX_EXT = 0x8008;
</del><ins>+    const unsigned long MIN_EXT = 0x8007;
+    const unsigned long MAX_EXT = 0x8008;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasEXTTextureFilterAnisotropicidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/html/canvas/EXTTextureFilterAnisotropic.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,11 +24,10 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    NoInterfaceObject,
</del><span class="cx">     Conditional=WEBGL,
</span><span class="cx">     GenerateIsReachable=ImplWebGLRenderingContext,
</span><del>-    DoNotCheckConstants
</del><ins>+    NoInterfaceObject,
</ins><span class="cx"> ] interface EXTTextureFilterAnisotropic {
</span><del>-    const unsigned int TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
-    const unsigned int MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
</del><ins>+    const unsigned long TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE;
+    const unsigned long MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasEXTsRGBidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/EXTsRGB.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/EXTsRGB.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/html/canvas/EXTsRGB.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,12 +24,12 @@
</span><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx"> [
</span><ins>+    Conditional=WEBGL,
+    GenerateIsReachable=ImplWebGLRenderingContext,
</ins><span class="cx">     NoInterfaceObject,
</span><del>-    Conditional=WEBGL,
-    GenerateIsReachable=ImplWebGLRenderingContext
</del><span class="cx"> ] interface EXTsRGB {
</span><del>-    const unsigned int SRGB_EXT                                     = 0x8C40;
-    const unsigned int SRGB_ALPHA_EXT                               = 0x8C42;
-    const unsigned int SRGB8_ALPHA8_EXT                             = 0x8C43;
-    const unsigned int FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT    = 0x8210;
</del><ins>+    const unsigned long SRGB_EXT = 0x8C40;
+    const unsigned long SRGB_ALPHA_EXT = 0x8C42;
+    const unsigned long SRGB8_ALPHA8_EXT = 0x8C43;
+    const unsigned long FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasOESStandardDerivativesidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/OESStandardDerivatives.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/OESStandardDerivatives.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/html/canvas/OESStandardDerivatives.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,10 +24,10 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    NoInterfaceObject,
</del><span class="cx">     Conditional=WEBGL,
</span><ins>+    DoNotCheckConstants,
</ins><span class="cx">     GenerateIsReachable=ImplWebGLRenderingContext,
</span><del>-    DoNotCheckConstants
</del><ins>+    NoInterfaceObject,
</ins><span class="cx"> ] interface OESStandardDerivatives {
</span><del>-    const unsigned int FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
</del><ins>+    const unsigned long FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasOESVertexArrayObjectidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/OESVertexArrayObject.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/OESVertexArrayObject.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/html/canvas/OESVertexArrayObject.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -29,8 +29,8 @@
</span><span class="cx">     GenerateIsReachable=ImplWebGLRenderingContext,
</span><span class="cx">     NoInterfaceObject,
</span><span class="cx"> ] interface OESVertexArrayObject {
</span><del>-    const unsigned int VERTEX_ARRAY_BINDING_OES = 0x85B5;
-    
</del><ins>+    const unsigned long VERTEX_ARRAY_BINDING_OES = 0x85B5;
+
</ins><span class="cx">     [StrictTypeChecking] WebGLVertexArrayObjectOES createVertexArrayOES();
</span><span class="cx">     [StrictTypeChecking] void deleteVertexArrayOES(optional WebGLVertexArrayObjectOES? arrayObject = null);
</span><span class="cx">     [StrictTypeChecking] boolean isVertexArrayOES(optional WebGLVertexArrayObjectOES? arrayObject = null);
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLCompressedTextureATCidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLCompressedTextureATC.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLCompressedTextureATC.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/html/canvas/WebGLCompressedTextureATC.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,13 +24,12 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    NoInterfaceObject,
</del><span class="cx">     Conditional=WEBGL,
</span><ins>+    DoNotCheckConstants,
</ins><span class="cx">     GenerateIsReachable=ImplWebGLRenderingContext,
</span><del>-    DoNotCheckConstants
</del><ins>+    NoInterfaceObject,
</ins><span class="cx"> ] interface WebGLCompressedTextureATC {
</span><del>-    /* Compressed Texture Formats */
-    const unsigned int COMPRESSED_RGB_ATC_WEBGL                     = 0x8C92;
-    const unsigned int COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL     = 0x8C93;
-    const unsigned int COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE;
</del><ins>+    const unsigned long COMPRESSED_RGB_ATC_WEBGL = 0x8C92;
+    const unsigned long COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL = 0x8C93;
+    const unsigned long COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL = 0x87EE;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLCompressedTexturePVRTCidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/html/canvas/WebGLCompressedTexturePVRTC.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,14 +24,13 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    NoInterfaceObject,
</del><span class="cx">     Conditional=WEBGL,
</span><ins>+    DoNotCheckConstants,
</ins><span class="cx">     GenerateIsReachable=ImplWebGLRenderingContext,
</span><del>-    DoNotCheckConstants
</del><ins>+    NoInterfaceObject,
</ins><span class="cx"> ] interface WebGLCompressedTexturePVRTC {
</span><del>-    /* Compressed Texture Formats */
-    const unsigned int COMPRESSED_RGB_PVRTC_4BPPV1_IMG  = 0x8C00;
-    const unsigned int COMPRESSED_RGB_PVRTC_2BPPV1_IMG  = 0x8C01;
-    const unsigned int COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02;
-    const unsigned int COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03;
</del><ins>+    const unsigned long COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00;
+    const unsigned long COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01;
+    const unsigned long COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02;
+    const unsigned long COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLCompressedTextureS3TCidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/html/canvas/WebGLCompressedTextureS3TC.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,14 +24,13 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    NoInterfaceObject,
</del><span class="cx">     Conditional=WEBGL,
</span><ins>+    DoNotCheckConstants,
</ins><span class="cx">     GenerateIsReachable=ImplWebGLRenderingContext,
</span><del>-    DoNotCheckConstants
</del><ins>+    NoInterfaceObject,
</ins><span class="cx"> ] interface WebGLCompressedTextureS3TC {
</span><del>-    /* Compressed Texture Formats */
-    const unsigned int COMPRESSED_RGB_S3TC_DXT1_EXT        = 0x83F0;
-    const unsigned int COMPRESSED_RGBA_S3TC_DXT1_EXT       = 0x83F1;
-    const unsigned int COMPRESSED_RGBA_S3TC_DXT3_EXT       = 0x83F2;
-    const unsigned int COMPRESSED_RGBA_S3TC_DXT5_EXT       = 0x83F3;
</del><ins>+    const unsigned long COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0;
+    const unsigned long COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1;
+    const unsigned long COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2;
+    const unsigned long COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLDebugRendererInfoidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLDebugRendererInfo.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLDebugRendererInfo.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/html/canvas/WebGLDebugRendererInfo.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,11 +24,11 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    NoInterfaceObject,
</del><span class="cx">     Conditional=WEBGL,
</span><ins>+    DoNotCheckConstants,
</ins><span class="cx">     GenerateIsReachable=ImplWebGLRenderingContext,
</span><del>-    DoNotCheckConstants
</del><ins>+    NoInterfaceObject,
</ins><span class="cx"> ] interface WebGLDebugRendererInfo {
</span><del>-    const unsigned int UNMASKED_VENDOR_WEBGL = 0x9245;
-    const unsigned int UNMASKED_RENDERER_WEBGL = 0x9246;
</del><ins>+    const unsigned long UNMASKED_VENDOR_WEBGL = 0x9245;
+    const unsigned long UNMASKED_RENDERER_WEBGL = 0x9246;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlcanvasWebGLDepthTextureidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/canvas/WebGLDepthTexture.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/canvas/WebGLDepthTexture.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Source/WebCore/html/canvas/WebGLDepthTexture.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -24,10 +24,10 @@
</span><span class="cx">  */
</span><span class="cx"> 
</span><span class="cx"> [
</span><del>-    NoInterfaceObject,
</del><span class="cx">     Conditional=WEBGL,
</span><ins>+    DoNotCheckConstants,
</ins><span class="cx">     GenerateIsReachable=ImplWebGLRenderingContext,
</span><del>-    DoNotCheckConstants
</del><ins>+    NoInterfaceObject,
</ins><span class="cx"> ] interface WebGLDepthTexture {
</span><del>-    const unsigned int UNSIGNED_INT_24_8_WEBGL = 0x84FA;
</del><ins>+    const unsigned long UNSIGNED_INT_24_8_WEBGL = 0x84FA;
</ins><span class="cx"> };
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Tools/ChangeLog        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -1,5 +1,17 @@
</span><span class="cx"> 2016-04-30  Darin Adler  &lt;darin@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Streamline and remove unused bindings generation code
+        https://bugs.webkit.org/show_bug.cgi?id=157237
+
+        Reviewed by Chris Dumez.
+
+        * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl:
+        * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
+        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+        Replace non-standard &quot;int&quot; with standard &quot;long&quot;, which means the same thing.
+
+2016-04-30  Darin Adler  &lt;darin@apple.com&gt;
+
</ins><span class="cx">         Next batch of conversions to use C++ enum class instead of strings for enumerations
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=157232
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityControlleridl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityController.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx">     readonly attribute DOMString platformName;
</span><span class="cx">     readonly attribute AccessibilityUIElement rootElement;
</span><span class="cx">     readonly attribute AccessibilityUIElement focusedElement;
</span><del>-    AccessibilityUIElement elementAtPoint(int x, int y);
</del><ins>+    AccessibilityUIElement elementAtPoint(long x, long y);
</ins><span class="cx">     AccessibilityUIElement accessibleElementById(DOMString id);
</span><span class="cx">     
</span><span class="cx">     boolean addNotificationListener(object functionCallback);
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsAccessibilityUIElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">     readonly attribute DOMString documentURI;
</span><span class="cx"> 
</span><span class="cx">     // Element access.
</span><del>-    AccessibilityUIElement elementAtPoint(int x, int y);
</del><ins>+    AccessibilityUIElement elementAtPoint(long x, long y);
</ins><span class="cx">     AccessibilityUIElement childAtIndex(unsigned long index);
</span><span class="cx">     unsigned long indexOfChild(AccessibilityUIElement child);
</span><span class="cx">     AccessibilityUIElement linkedUIElementAtIndex(unsigned long index);
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">     readonly attribute DOMString url;
</span><span class="cx">     readonly attribute DOMString speak;
</span><span class="cx">     readonly attribute DOMString orientation;
</span><del>-    readonly attribute int insertionPointLineNumber;
</del><ins>+    readonly attribute long insertionPointLineNumber;
</ins><span class="cx">     readonly attribute DOMString selectedTextRange;
</span><span class="cx"> 
</span><span class="cx">     DOMString stringAttributeValue(DOMString attr);
</span><span class="lines">@@ -70,9 +70,9 @@
</span><span class="cx">     boolean isDecrementActionSupported();
</span><span class="cx"> 
</span><span class="cx">     readonly attribute DOMString stringValue;
</span><del>-    readonly attribute int intValue;
-    readonly attribute int minValue;
-    readonly attribute int maxValue;
</del><ins>+    readonly attribute long intValue;
+    readonly attribute long minValue;
+    readonly attribute long maxValue;
</ins><span class="cx">     
</span><span class="cx">     readonly attribute boolean isEnabled;
</span><span class="cx">     readonly attribute boolean isRequired;
</span><span class="lines">@@ -91,22 +91,22 @@
</span><span class="cx">     readonly attribute boolean isIgnored;
</span><span class="cx">     readonly attribute boolean isOffScreen;
</span><span class="cx">     readonly attribute boolean isValid;
</span><del>-    readonly attribute int hierarchicalLevel;
</del><ins>+    readonly attribute long hierarchicalLevel;
</ins><span class="cx">     readonly attribute boolean ariaIsGrabbed;
</span><span class="cx">     readonly attribute DOMString ariaDropEffects;
</span><span class="cx">     readonly attribute DOMString classList;
</span><span class="cx"> 
</span><del>-    readonly attribute int x;
-    readonly attribute int y;
-    readonly attribute int width;
-    readonly attribute int height;
-    readonly attribute int clickPointX;
-    readonly attribute int clickPointY;
</del><ins>+    readonly attribute long x;
+    readonly attribute long y;
+    readonly attribute long width;
+    readonly attribute long height;
+    readonly attribute long clickPointX;
+    readonly attribute long clickPointY;
</ins><span class="cx"> 
</span><del>-    readonly attribute int childrenCount;
-    readonly attribute int selectedChildrenCount;
-    readonly attribute int rowCount;
-    readonly attribute int columnCount;
</del><ins>+    readonly attribute long childrenCount;
+    readonly attribute long selectedChildrenCount;
+    readonly attribute long rowCount;
+    readonly attribute long columnCount;
</ins><span class="cx"> 
</span><span class="cx">     // Actions.
</span><span class="cx">     void increment();
</span><span class="lines">@@ -121,10 +121,10 @@
</span><span class="cx">     DOMString attributesOfDocumentLinks();
</span><span class="cx"> 
</span><span class="cx">     // Text info.
</span><del>-    DOMString characterAtOffset(int offset);
-    DOMString wordAtOffset(int offset);
-    DOMString lineAtOffset(int offset);
-    DOMString sentenceAtOffset(int offset);
</del><ins>+    DOMString characterAtOffset(long offset);
+    DOMString wordAtOffset(long offset);
+    DOMString lineAtOffset(long offset);
+    DOMString sentenceAtOffset(long offset);
</ins><span class="cx">     
</span><span class="cx">     // Table info.
</span><span class="cx">     DOMString attributesOfColumnHeaders();
</span><span class="lines">@@ -138,11 +138,11 @@
</span><span class="cx">     AccessibilityUIElement disclosedByRow();
</span><span class="cx">     AccessibilityUIElement disclosedRowAtIndex(unsigned long index);
</span><span class="cx">     AccessibilityUIElement rowAtIndex(unsigned long index);
</span><del>-    int indexInTable();
</del><ins>+    long indexInTable();
</ins><span class="cx">     DOMString rowIndexRange();
</span><span class="cx">     DOMString columnIndexRange();
</span><del>-    int rowCount();
-    int columnCount();
</del><ins>+    long rowCount();
+    long columnCount();
</ins><span class="cx">     object columnHeaders();
</span><span class="cx">     object rowHeaders();
</span><span class="cx"> 
</span><span class="lines">@@ -152,14 +152,14 @@
</span><span class="cx"> 
</span><span class="cx">     // Paramaterized attributes.
</span><span class="cx">     DOMString parameterizedAttributeNames();
</span><del>-    int lineForIndex(int index);
-    DOMString rangeForLine(int index);
-    DOMString rangeForPosition(int x, int y);
</del><ins>+    long lineForIndex(long index);
+    DOMString rangeForLine(long index);
+    DOMString rangeForPosition(long x, long y);
</ins><span class="cx">     DOMString boundsForRange(unsigned long location, unsigned long length);
</span><span class="cx">     DOMString stringForRange(unsigned long location, unsigned long length);
</span><span class="cx">     DOMString attributedStringForRange(unsigned long location, unsigned long length);
</span><span class="cx">     boolean attributedStringRangeIsMisspelled(unsigned long location, unsigned long length);
</span><del>-    [PassContext] unsigned int uiElementCountForSearchPredicate(AccessibilityUIElement startElement, boolean isDirectionNext, object searchKey, DOMString searchText, boolean visibleOnly, boolean immediateDescendantsOnly);
</del><ins>+    [PassContext] unsigned long uiElementCountForSearchPredicate(AccessibilityUIElement startElement, boolean isDirectionNext, object searchKey, DOMString searchText, boolean visibleOnly, boolean immediateDescendantsOnly);
</ins><span class="cx">     [PassContext] AccessibilityUIElement uiElementForSearchPredicate(AccessibilityUIElement startElement, boolean isDirectionNext, object searchKey, DOMString searchText, boolean visibleOnly, boolean immediateDescendantsOnly);
</span><span class="cx">     [PassContext] DOMString selectTextWithCriteria(DOMString ambiguityResolution, object searchStrings, DOMString replacementString, DOMString activity);
</span><span class="cx">     boolean setSelectedTextRange(unsigned long location, unsigned long length);
</span><span class="lines">@@ -169,8 +169,8 @@
</span><span class="cx">     readonly attribute AccessibilityUIElement verticalScrollbar;
</span><span class="cx"> 
</span><span class="cx">     void scrollToMakeVisible();
</span><del>-    void scrollToGlobalPoint(int x, int y);
-    void scrollToMakeVisibleWithSubFocus(int x, int y, int width, int height);
</del><ins>+    void scrollToGlobalPoint(long x, long y);
+    void scrollToMakeVisibleWithSubFocus(long x, long y, long width, long height);
</ins><span class="cx"> 
</span><span class="cx">     void takeFocus();
</span><span class="cx">     boolean scrollPageDown();
</span><span class="lines">@@ -186,18 +186,18 @@
</span><span class="cx">     void resetSelectedTextMarkerRange();
</span><span class="cx">     AccessibilityTextMarker startTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange range);
</span><span class="cx">     AccessibilityTextMarker endTextMarkerForTextMarkerRange(AccessibilityTextMarkerRange range);
</span><del>-    AccessibilityTextMarker endTextMarkerForBounds(int x, int y, int width, int height);
-    AccessibilityTextMarker startTextMarkerForBounds(int x, int y, int width, int height);
-    AccessibilityTextMarker textMarkerForPoint(int x, int y);
</del><ins>+    AccessibilityTextMarker endTextMarkerForBounds(long x, long y, long width, long height);
+    AccessibilityTextMarker startTextMarkerForBounds(long x, long y, long width, long height);
+    AccessibilityTextMarker textMarkerForPoint(long x, long y);
</ins><span class="cx">     AccessibilityTextMarker previousTextMarker(AccessibilityTextMarker marker);
</span><span class="cx">     AccessibilityTextMarker nextTextMarker(AccessibilityTextMarker marker);
</span><span class="cx">     AccessibilityUIElement accessibilityElementForTextMarker(AccessibilityTextMarker marker);
</span><span class="cx">     DOMString stringForTextMarkerRange(AccessibilityTextMarkerRange range);
</span><del>-    int textMarkerRangeLength(AccessibilityTextMarkerRange range);
</del><ins>+    long textMarkerRangeLength(AccessibilityTextMarkerRange range);
</ins><span class="cx">     boolean attributedStringForTextMarkerRangeContainsAttribute(DOMString attr, AccessibilityTextMarkerRange range);
</span><del>-    int indexForTextMarker(AccessibilityTextMarker marker);
</del><ins>+    long indexForTextMarker(AccessibilityTextMarker marker);
</ins><span class="cx">     boolean isTextMarkerValid(AccessibilityTextMarker marker);
</span><del>-    AccessibilityTextMarker textMarkerForIndex(int textIndex);
</del><ins>+    AccessibilityTextMarker textMarkerForIndex(long textIndex);
</ins><span class="cx">     readonly attribute AccessibilityTextMarker startTextMarker;
</span><span class="cx">     readonly attribute AccessibilityTextMarker endTextMarker;
</span><span class="cx">     boolean setSelectedVisibleTextRange(AccessibilityTextMarkerRange range);
</span><span class="lines">@@ -222,8 +222,8 @@
</span><span class="cx">     // iOS specific accessibility methods.
</span><span class="cx">     readonly attribute DOMString identifier;
</span><span class="cx">     readonly attribute DOMString traits;
</span><del>-    readonly attribute int elementTextPosition;
-    readonly attribute int elementTextLength;
</del><ins>+    readonly attribute long elementTextPosition;
+    readonly attribute long elementTextLength;
</ins><span class="cx">     readonly attribute DOMString stringForSelection;
</span><span class="cx">     object elementsForRange(unsigned long location, unsigned long length);
</span><span class="cx">     void increaseTextSelection();
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsTestRunneridl"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (200298 => 200299)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl        2016-04-30 22:06:21 UTC (rev 200298)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl        2016-05-01 04:17:54 UTC (rev 200299)
</span><span class="lines">@@ -74,7 +74,7 @@
</span><span class="cx">     void setTabKeyCyclesThroughElements(boolean enabled);
</span><span class="cx">     void setSerializeHTTPLoads();
</span><span class="cx">     void dispatchPendingLoadRequests();
</span><del>-    void setCacheModel(int model);
</del><ins>+    void setCacheModel(long model);
</ins><span class="cx">     void setAsynchronousSpellCheckingEnabled(boolean value);
</span><span class="cx">     void setPrinting();
</span><span class="cx">     void setShouldDecideNavigationPolicyAfterDelay(boolean value);
</span><span class="lines">@@ -95,7 +95,7 @@
</span><span class="cx">     void display();
</span><span class="cx"> 
</span><span class="cx">     // Printing
</span><del>-    boolean isPageBoxVisible(int pageIndex);
</del><ins>+    boolean isPageBoxVisible(long pageIndex);
</ins><span class="cx"> 
</span><span class="cx">     [PassContext] void setValueForUser(object element, DOMString value);
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>