<!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>[208066] 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/208066">208066</a></dd>
<dt>Author</dt> <dd>weinig@apple.com</dd>
<dt>Date</dt> <dd>2016-10-28 13:53:03 -0700 (Fri, 28 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebIDL] Update parser and code generators to only access type information through the type property
https://bugs.webkit.org/show_bug.cgi?id=164141

Reviewed by Anders Carlsson.

Source/WebCore:

Update IDLParser structs:
- domSignature: Rename idlType to type. Specify that type is a domType.
- domInterface: Remove name and parent. Specify that type and parentType are a domTypes.
- domFunction: Specify that signature is a domSignature.
- domAttribute: Remove unused type. Specify that signature is a domSignature.
- domIterable: Remove idlKeyType and valueKeyType. Specify that keyType and valueType are a domTypes
- domConstant: Specify that type is a domType.
- domEnum: Specify that type is a domType.
- domDictionary: Remove name and parent. Specify that type and parentType are a domTypes.
- Typedef: Rename idlType to type and specify that it is a domType.

* bindings/scripts/IDLParser.pm:
Remove redundant properties and specify type info in structs where possible.

* bindings/scripts/CodeGenerator.pm:
(IsSVGTypeNeedingTearOffForType): Renamed to remove ForType suffix.
(IsSVGTypeWithWritablePropertiesNeedingTearOffForType): Renamed to remove ForType suffix.
(GetSVGTypeNeedingTearOffForType): Renamed to remove ForType suffix.
(GetSVGWrappedTypeNeedingTearOffForType): Renamed to remove ForType suffix.

Update to always access type information through type accessors. Remove use of removed
properties.

* bindings/scripts/CodeGeneratorJS.pm:
(IsNullableType): Deleted.
(StripNullable): Deleted.
Remove unused functions.

Update to always access type information through type accessors. Remove use of removed
properties.

* bindings/scripts/generate-bindings.pl:
Update to always access type information through type accessors. Remove use of removed
properties.

Tools:

* DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
* WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
Update to always access type information through type accessors. Remove use of removed
properties.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</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="#trunkSourceWebCorebindingsscriptsIDLParserpm">trunk/Source/WebCore/bindings/scripts/IDLParser.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsgeneratebindingspl">trunk/Source/WebCore/bindings/scripts/generate-bindings.pl</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsDumpRenderTreeBindingsCodeGeneratorDumpRenderTreepm">trunk/Tools/DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm</a></li>
<li><a href="#trunkToolsWebKitTestRunnerInjectedBundleBindingsCodeGeneratorTestRunnerpm">trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (208065 => 208066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-28 20:45:22 UTC (rev 208065)
+++ trunk/Source/WebCore/ChangeLog        2016-10-28 20:53:03 UTC (rev 208066)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2016-10-28  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        [WebIDL] Update parser and code generators to only access type information through the type property
+        https://bugs.webkit.org/show_bug.cgi?id=164141
+
+        Reviewed by Anders Carlsson.
+
+        Update IDLParser structs:
+        - domSignature: Rename idlType to type. Specify that type is a domType.
+        - domInterface: Remove name and parent. Specify that type and parentType are a domTypes.
+        - domFunction: Specify that signature is a domSignature.
+        - domAttribute: Remove unused type. Specify that signature is a domSignature.
+        - domIterable: Remove idlKeyType and valueKeyType. Specify that keyType and valueType are a domTypes
+        - domConstant: Specify that type is a domType.
+        - domEnum: Specify that type is a domType.
+        - domDictionary: Remove name and parent. Specify that type and parentType are a domTypes.
+        - Typedef: Rename idlType to type and specify that it is a domType.
+
+        * bindings/scripts/IDLParser.pm:
+        Remove redundant properties and specify type info in structs where possible.
+
+        * bindings/scripts/CodeGenerator.pm:
+        (IsSVGTypeNeedingTearOffForType): Renamed to remove ForType suffix.
+        (IsSVGTypeWithWritablePropertiesNeedingTearOffForType): Renamed to remove ForType suffix.
+        (GetSVGTypeNeedingTearOffForType): Renamed to remove ForType suffix.
+        (GetSVGWrappedTypeNeedingTearOffForType): Renamed to remove ForType suffix.
+
+        Update to always access type information through type accessors. Remove use of removed
+        properties.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (IsNullableType): Deleted.
+        (StripNullable): Deleted.
+        Remove unused functions.
+
+        Update to always access type information through type accessors. Remove use of removed
+        properties.
+
+        * bindings/scripts/generate-bindings.pl:
+        Update to always access type information through type accessors. Remove use of removed
+        properties.
+
</ins><span class="cx"> 2016-10-28  Dave Hyatt  &lt;hyatt@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSS Parser] Support bopomofo Ruby
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (208065 => 208066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-10-28 20:45:22 UTC (rev 208065)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-10-28 20:53:03 UTC (rev 208066)
</span><span class="lines">@@ -180,13 +180,13 @@
</span><span class="cx"> 
</span><span class="cx">     foreach my $dictionary (@{$useDocument-&gt;dictionaries}) {
</span><span class="cx">         if ($dictionary-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;}) {
</span><del>-            $dictionaryTypeImplementationNameOverrides{$dictionary-&gt;name} = $dictionary-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;};
</del><ins>+            $dictionaryTypeImplementationNameOverrides{$dictionary-&gt;type-&gt;name} = $dictionary-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;};
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     foreach my $enumeration (@{$useDocument-&gt;enumerations}) {
</span><span class="cx">         if ($enumeration-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;}) {
</span><del>-            $enumTypeImplementationNameOverrides{$enumeration-&gt;name} = $enumeration-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;};
</del><ins>+            $enumTypeImplementationNameOverrides{$enumeration-&gt;type-&gt;name} = $enumeration-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;};
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -195,7 +195,7 @@
</span><span class="cx">     unless (defined($codeGenerator)) {
</span><span class="cx">         my $interfaces = $useDocument-&gt;interfaces;
</span><span class="cx">         foreach my $interface (@$interfaces) {
</span><del>-            print &quot;Skipping $useGenerator code generation for IDL interface \&quot;&quot; . $interface-&gt;name . &quot;\&quot;.\n&quot; if $verbose;
</del><ins>+            print &quot;Skipping $useGenerator code generation for IDL interface \&quot;&quot; . $interface-&gt;type-&gt;name . &quot;\&quot;.\n&quot; if $verbose;
</ins><span class="cx">         }
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -205,7 +205,7 @@
</span><span class="cx">         die &quot;Multiple interfaces per document are not supported&quot; if @$interfaces &gt; 1;
</span><span class="cx"> 
</span><span class="cx">         my $interface = @$interfaces[0];
</span><del>-        print &quot;Generating $useGenerator bindings code for IDL interface \&quot;&quot; . $interface-&gt;name . &quot;\&quot;...\n&quot; if $verbose;
</del><ins>+        print &quot;Generating $useGenerator bindings code for IDL interface \&quot;&quot; . $interface-&gt;type-&gt;name . &quot;\&quot;...\n&quot; if $verbose;
</ins><span class="cx">         $codeGenerator-&gt;GenerateInterface($interface, $defines, $useDocument-&gt;enumerations, $useDocument-&gt;dictionaries);
</span><span class="cx">         $codeGenerator-&gt;WriteData($interface, $useOutputDir, $useOutputHeadersDir);
</span><span class="cx">         return;
</span><span class="lines">@@ -216,7 +216,7 @@
</span><span class="cx">         die &quot;Multiple standalone dictionaries per document are not supported&quot; if @$dictionaries &gt; 1;
</span><span class="cx"> 
</span><span class="cx">         my $dictionary = @$dictionaries[0];
</span><del>-        print &quot;Generating $useGenerator bindings code for IDL dictionary \&quot;&quot; . $dictionary-&gt;name . &quot;\&quot;...\n&quot; if $verbose;
</del><ins>+        print &quot;Generating $useGenerator bindings code for IDL dictionary \&quot;&quot; . $dictionary-&gt;type-&gt;name . &quot;\&quot;...\n&quot; if $verbose;
</ins><span class="cx">         $codeGenerator-&gt;GenerateDictionary($dictionary, $useDocument-&gt;enumerations);
</span><span class="cx">         $codeGenerator-&gt;WriteData($dictionary, $useOutputDir, $useOutputHeadersDir);
</span><span class="cx">         return;
</span><span class="lines">@@ -227,7 +227,7 @@
</span><span class="cx">         die &quot;Multiple standalone enumerations per document are not supported&quot; if @$enumerations &gt; 1;
</span><span class="cx"> 
</span><span class="cx">         my $enumeration = @$enumerations[0];
</span><del>-        print &quot;Generating $useGenerator bindings code for IDL enumeration \&quot;&quot; . $enumeration-&gt;name . &quot;\&quot;...\n&quot; if $verbose;
</del><ins>+        print &quot;Generating $useGenerator bindings code for IDL enumeration \&quot;&quot; . $enumeration-&gt;type-&gt;name . &quot;\&quot;...\n&quot; if $verbose;
</ins><span class="cx">         $codeGenerator-&gt;GenerateEnumeration($enumeration);
</span><span class="cx">         $codeGenerator-&gt;WriteData($enumeration, $useOutputDir, $useOutputHeadersDir);
</span><span class="cx">         return;
</span><span class="lines">@@ -352,7 +352,7 @@
</span><span class="cx"> 
</span><span class="cx">     # Step #1: Find the IDL file associated with 'interface'
</span><span class="cx">     my $filename = $object-&gt;IDLFileForInterface($interfaceName)
</span><del>-        or assert(&quot;Could NOT find IDL file for interface \&quot;$interfaceName\&quot;, reachable from \&quot;&quot; . $outerInterface-&gt;name . &quot;\&quot;!\n&quot;);
</del><ins>+        or assert(&quot;Could NOT find IDL file for interface \&quot;$interfaceName\&quot;, reachable from \&quot;&quot; . $outerInterface-&gt;type-&gt;name . &quot;\&quot;!\n&quot;);
</ins><span class="cx"> 
</span><span class="cx">     print &quot;  |  |&gt;  Parsing parent IDL \&quot;$filename\&quot; for interface \&quot;$interfaceName\&quot;\n&quot; if $verbose;
</span><span class="cx"> 
</span><span class="lines">@@ -361,7 +361,7 @@
</span><span class="cx">     my $document = $parser-&gt;Parse($filename, $defines, $preprocessor);
</span><span class="cx"> 
</span><span class="cx">     foreach my $interface (@{$document-&gt;interfaces}) {
</span><del>-        if ($interface-&gt;name eq $interfaceName) {
</del><ins>+        if ($interface-&gt;type-&gt;name eq $interfaceName) {
</ins><span class="cx">             $cachedInterfaces-&gt;{$interfaceName} = $interface;
</span><span class="cx">             return $interface;
</span><span class="cx">         }
</span><span class="lines">@@ -476,7 +476,7 @@
</span><span class="cx">     die &quot;GetEnumByName() was called with an undefined enumeration name&quot; unless defined($name);
</span><span class="cx"> 
</span><span class="cx">     for my $enumeration (@{$useDocument-&gt;enumerations}) {
</span><del>-        return $enumeration if $enumeration-&gt;name eq $name;
</del><ins>+        return $enumeration if $enumeration-&gt;type-&gt;name eq $name;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return $cachedExternalEnumerations-&gt;{$name} if exists($cachedExternalEnumerations-&gt;{$name});
</span><span class="lines">@@ -493,11 +493,11 @@
</span><span class="cx">         my $document = $parser-&gt;Parse($filename, $defines, $preprocessor);
</span><span class="cx"> 
</span><span class="cx">         foreach my $enumeration (@{$document-&gt;enumerations}) {
</span><del>-            next unless $enumeration-&gt;name eq $name;
</del><ins>+            next unless $enumeration-&gt;type-&gt;name eq $name;
</ins><span class="cx"> 
</span><span class="cx">             $cachedExternalEnumerations-&gt;{$name} = $enumeration;
</span><span class="cx">             my $implementedAs = $enumeration-&gt;extendedAttributes-&gt;{ImplementedAs};
</span><del>-            $enumTypeImplementationNameOverrides{$enumeration-&gt;name} = $implementedAs if $implementedAs;
</del><ins>+            $enumTypeImplementationNameOverrides{$enumeration-&gt;type-&gt;name} = $implementedAs if $implementedAs;
</ins><span class="cx">             return $enumeration;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -544,7 +544,7 @@
</span><span class="cx">     die &quot;GetDictionaryByType() was called with an undefined dictionary name&quot; unless defined($name);
</span><span class="cx"> 
</span><span class="cx">     for my $dictionary (@{$useDocument-&gt;dictionaries}) {
</span><del>-        return $dictionary if $dictionary-&gt;name eq $name;
</del><ins>+        return $dictionary if $dictionary-&gt;type-&gt;name eq $name;
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     return $cachedExternalDictionaries-&gt;{$name} if exists($cachedExternalDictionaries-&gt;{$name});
</span><span class="lines">@@ -561,11 +561,11 @@
</span><span class="cx">         my $document = $parser-&gt;Parse($filename, $defines, $preprocessor);
</span><span class="cx"> 
</span><span class="cx">         foreach my $dictionary (@{$document-&gt;dictionaries}) {
</span><del>-            next unless $dictionary-&gt;name eq $name;
</del><ins>+            next unless $dictionary-&gt;type-&gt;name eq $name;
</ins><span class="cx"> 
</span><span class="cx">             $cachedExternalDictionaries-&gt;{$name} = $dictionary;
</span><span class="cx">             my $implementedAs = $dictionary-&gt;extendedAttributes-&gt;{ImplementedAs};
</span><del>-            $dictionaryTypeImplementationNameOverrides{$dictionary-&gt;name} = $implementedAs if $implementedAs;
</del><ins>+            $dictionaryTypeImplementationNameOverrides{$dictionary-&gt;type-&gt;name} = $implementedAs if $implementedAs;
</ins><span class="cx">             return $dictionary;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -621,7 +621,7 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub IsSVGTypeNeedingTearOffForType
</del><ins>+sub IsSVGTypeNeedingTearOff
</ins><span class="cx"> {
</span><span class="cx">     my ($object, $type) = @_;
</span><span class="cx"> 
</span><span class="lines">@@ -631,7 +631,7 @@
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub IsSVGTypeWithWritablePropertiesNeedingTearOffForType
</del><ins>+sub IsSVGTypeWithWritablePropertiesNeedingTearOff
</ins><span class="cx"> {
</span><span class="cx">     my ($object, $type) = @_;
</span><span class="cx"> 
</span><span class="lines">@@ -667,7 +667,7 @@
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub GetSVGTypeNeedingTearOffForType
</del><ins>+sub GetSVGTypeNeedingTearOff
</ins><span class="cx"> {
</span><span class="cx">     my ($object, $type) = @_;
</span><span class="cx"> 
</span><span class="lines">@@ -677,13 +677,13 @@
</span><span class="cx">     return undef;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub GetSVGWrappedTypeNeedingTearOffForType
</del><ins>+sub GetSVGWrappedTypeNeedingTearOff
</ins><span class="cx"> {
</span><span class="cx">     my ($object, $type) = @_;
</span><span class="cx"> 
</span><span class="cx">     assert(&quot;Not a type&quot;) if ref($type) ne &quot;domType&quot;;
</span><span class="cx"> 
</span><del>-    my $svgTypeNeedingTearOff = $object-&gt;GetSVGTypeNeedingTearOffForType($type);
</del><ins>+    my $svgTypeNeedingTearOff = $object-&gt;GetSVGTypeNeedingTearOff($type);
</ins><span class="cx">     return $svgTypeNeedingTearOff if not $svgTypeNeedingTearOff;
</span><span class="cx"> 
</span><span class="cx">     if ($svgTypeNeedingTearOff =~ /SVGPropertyTearOff/) {
</span><span class="lines">@@ -749,7 +749,6 @@
</span><span class="cx"> 
</span><span class="cx">     assert(&quot;Not a type&quot;) if ref($type) ne &quot;domType&quot;;
</span><span class="cx"> 
</span><del>-    # FIXME: Update parser to make this just 'FrozenArray'
</del><span class="cx">     return $type-&gt;name eq &quot;FrozenArray&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -877,7 +876,7 @@
</span><span class="cx">     if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;}) {
</span><span class="cx">         $attributeName = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;ImplementedAs&quot;};
</span><span class="cx">     }
</span><del>-    my $attributeType = $attribute-&gt;signature-&gt;idlType;
</del><ins>+    my $attributeType = $attribute-&gt;signature-&gt;type;
</ins><span class="cx"> 
</span><span class="cx">     # SVG animated types need to use a special attribute name.
</span><span class="cx">     # The rest of the special casing for SVG animated types is handled in the language-specific code generators.
</span><span class="lines">@@ -911,7 +910,7 @@
</span><span class="cx">         return ($generator-&gt;WK_lcfirst($generator-&gt;AttributeNameForGetterAndSetter($attribute)));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    my $attributeType = $attribute-&gt;signature-&gt;idlType;
</del><ins>+    my $attributeType = $attribute-&gt;signature-&gt;type;
</ins><span class="cx"> 
</span><span class="cx">     my $functionName;
</span><span class="cx">     if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;URL&quot;}) {
</span><span class="lines">@@ -949,7 +948,7 @@
</span><span class="cx">         return (&quot;set&quot; . $generator-&gt;WK_ucfirst($generator-&gt;AttributeNameForGetterAndSetter($attribute)));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    my $attributeType = $attribute-&gt;signature-&gt;idlType;
</del><ins>+    my $attributeType = $attribute-&gt;signature-&gt;type;
</ins><span class="cx"> 
</span><span class="cx">     my $functionName;
</span><span class="cx">     if ($attributeType-&gt;name eq &quot;boolean&quot;) {
</span><span class="lines">@@ -1150,7 +1149,7 @@
</span><span class="cx"> 
</span><span class="cx">     my @checks = ();
</span><span class="cx">     foreach my $constant (@{$interface-&gt;constants}) {
</span><del>-        my $className = $constant-&gt;extendedAttributes-&gt;{&quot;ImplementedBy&quot;} || $interface-&gt;name;
</del><ins>+        my $className = $constant-&gt;extendedAttributes-&gt;{&quot;ImplementedBy&quot;} || $interface-&gt;type-&gt;name;
</ins><span class="cx">         my $name = $constant-&gt;extendedAttributes-&gt;{&quot;Reflect&quot;} || $constant-&gt;name;
</span><span class="cx">         my $value = $constant-&gt;value;
</span><span class="cx">         my $conditional = $constant-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;};
</span><span class="lines">@@ -1180,7 +1179,7 @@
</span><span class="cx">     my ($object, $interface) = @_;
</span><span class="cx"> 
</span><span class="cx">     my $interfaceName = $interface-&gt;extendedAttributes-&gt;{&quot;InterfaceName&quot;};
</span><del>-    return $interfaceName ? $interfaceName : $interface-&gt;name;
</del><ins>+    return $interfaceName ? $interfaceName : $interface-&gt;type-&gt;name;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub InheritsInterface
</span><span class="lines">@@ -1187,12 +1186,12 @@
</span><span class="cx"> {
</span><span class="cx">     my ($object, $interface, $interfaceName) = @_;
</span><span class="cx"> 
</span><del>-    return 1 if $interfaceName eq $interface-&gt;name;
</del><ins>+    return 1 if $interfaceName eq $interface-&gt;type-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">     my $found = 0;
</span><span class="cx">     $object-&gt;ForAllParents($interface, sub {
</span><span class="cx">         my $currentInterface = shift;
</span><del>-        if ($currentInterface-&gt;name eq $interfaceName) {
</del><ins>+        if ($currentInterface-&gt;type-&gt;name eq $interfaceName) {
</ins><span class="cx">             $found = 1;
</span><span class="cx">         }
</span><span class="cx">         return 1 if $found;
</span><span class="lines">@@ -1224,9 +1223,9 @@
</span><span class="cx">     my ($object, $parameter, $interface) = @_;
</span><span class="cx"> 
</span><span class="cx">     return 0 if $parameter-&gt;isVariadic;
</span><del>-    return 0 if $parameter-&gt;isNullable;
-    return 0 if !$object-&gt;IsWrapperType($parameter-&gt;idlType) &amp;&amp; !$object-&gt;IsTypedArrayType($parameter-&gt;idlType);
-    return 0 if $object-&gt;IsSVGTypeNeedingTearOffForType($parameter-&gt;idlType);
</del><ins>+    return 0 if $parameter-&gt;type-&gt;isNullable;
+    return 0 if !$object-&gt;IsWrapperType($parameter-&gt;type) &amp;&amp; !$object-&gt;IsTypedArrayType($parameter-&gt;type);
+    return 0 if $object-&gt;IsSVGTypeNeedingTearOff($parameter-&gt;type);
</ins><span class="cx"> 
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (208065 => 208066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-28 20:45:22 UTC (rev 208065)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-28 20:53:03 UTC (rev 208066)
</span><span class="lines">@@ -179,13 +179,13 @@
</span><span class="cx">         $extendedAttributeList-&gt;{ImplementedAs} = $attribute-&gt;signature-&gt;name;
</span><span class="cx">         $stringifier-&gt;signature-&gt;extendedAttributes($extendedAttributeList);
</span><span class="cx">         $stringifier-&gt;signature-&gt;name(&quot;toString&quot;);
</span><del>-        die &quot;stringifier can only be used on attributes of String types&quot; unless $codeGenerator-&gt;IsStringType($attribute-&gt;signature-&gt;idlType);
</del><ins>+        die &quot;stringifier can only be used on attributes of String types&quot; unless $codeGenerator-&gt;IsStringType($attribute-&gt;signature-&gt;type);
</ins><span class="cx">         
</span><span class="cx">         # FIXME: This should use IDLParser's cloneType.
</span><span class="cx">         my $type = domType-&gt;new();
</span><del>-        $type-&gt;name($attribute-&gt;signature-&gt;idlType-&gt;name);
</del><ins>+        $type-&gt;name($attribute-&gt;signature-&gt;type-&gt;name);
</ins><span class="cx"> 
</span><del>-        $stringifier-&gt;signature-&gt;idlType($type);
</del><ins>+        $stringifier-&gt;signature-&gt;type($type);
</ins><span class="cx"> 
</span><span class="cx">         push(@{$interface-&gt;functions}, $stringifier);
</span><span class="cx">         last;
</span><span class="lines">@@ -209,8 +209,8 @@
</span><span class="cx"> 
</span><span class="cx">     return $interface-&gt;extendedAttributes-&gt;{JSLegacyParent} if $interface-&gt;extendedAttributes-&gt;{JSLegacyParent};
</span><span class="cx">     return &quot;JSDOMObject&quot; unless NeedsImplementationClass($interface);
</span><del>-    return &quot;JSDOMWrapper&lt;&quot; . GetImplClassName($interface) . &quot;&gt;&quot; unless $interface-&gt;parent;
-    return &quot;JS&quot; . $interface-&gt;parent;
</del><ins>+    return &quot;JSDOMWrapper&lt;&quot; . GetImplClassName($interface) . &quot;&gt;&quot; unless $interface-&gt;parentType;
+    return &quot;JS&quot; . $interface-&gt;parentType-&gt;name;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetCallbackClassName
</span><span class="lines">@@ -260,14 +260,18 @@
</span><span class="cx"> 
</span><span class="cx"> sub AddToImplIncludesForIDLType
</span><span class="cx"> {
</span><del>-    my ($idlType, $conditional) = @_;
</del><ins>+    my ($type, $conditional) = @_;
+    
+    return if $codeGenerator-&gt;IsPrimitiveType($type);
+    return if $codeGenerator-&gt;IsStringType($type);
+    return if $codeGenerator-&gt;IsTypedArrayType($type);
+    return if $type-&gt;name eq &quot;BufferSource&quot;;
+    return if $type-&gt;name eq &quot;any&quot;;
</ins><span class="cx"> 
</span><del>-    return if $codeGenerator-&gt;SkipIncludeHeader($idlType-&gt;name);
-
-    if ($idlType-&gt;isUnion) {
</del><ins>+    if ($type-&gt;isUnion) {
</ins><span class="cx">         AddToImplIncludes(&quot;&lt;wtf/Variant.h&gt;&quot;, $conditional);
</span><span class="cx"> 
</span><del>-        foreach my $memberType (@{$idlType-&gt;subtypes}) {
</del><ins>+        foreach my $memberType (@{$type-&gt;subtypes}) {
</ins><span class="cx">             AddToImplIncludesForIDLType($memberType, $conditional);
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -274,14 +278,14 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($codeGenerator-&gt;IsSequenceOrFrozenArrayType($idlType)) {
</del><ins>+    if ($codeGenerator-&gt;IsSequenceOrFrozenArrayType($type)) {
</ins><span class="cx">         AddToImplIncludes(&quot;&lt;runtime/JSArray.h&gt;&quot;, $conditional);
</span><del>-        AddToImplIncludesForIDLType(@{$idlType-&gt;subtypes}[0], $conditional);
</del><ins>+        AddToImplIncludesForIDLType(@{$type-&gt;subtypes}[0], $conditional);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($codeGenerator-&gt;IsWrapperType($idlType) || $codeGenerator-&gt;IsExternalDictionaryType($idlType) || $codeGenerator-&gt;IsExternalEnumType($idlType)) {
-        AddToImplIncludes(&quot;JS&quot; . $idlType-&gt;name . &quot;.h&quot;, $conditional);
</del><ins>+    if ($codeGenerator-&gt;IsWrapperType($type) || $codeGenerator-&gt;IsExternalDictionaryType($type) || $codeGenerator-&gt;IsExternalEnumType($type)) {
+        AddToImplIncludes(&quot;JS&quot; . $type-&gt;name . &quot;.h&quot;, $conditional);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -334,7 +338,7 @@
</span><span class="cx"> sub IsDOMGlobalObject
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><del>-    return $interface-&gt;name eq &quot;DOMWindow&quot; || $codeGenerator-&gt;InheritsInterface($interface, &quot;WorkerGlobalScope&quot;) || $interface-&gt;name eq &quot;TestGlobalObject&quot;;
</del><ins>+    return $interface-&gt;type-&gt;name eq &quot;DOMWindow&quot; || $codeGenerator-&gt;InheritsInterface($interface, &quot;WorkerGlobalScope&quot;) || $interface-&gt;type-&gt;name eq &quot;TestGlobalObject&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub ShouldUseGlobalObjectPrototype
</span><span class="lines">@@ -342,7 +346,7 @@
</span><span class="cx">     my $interface = shift;
</span><span class="cx"> 
</span><span class="cx">     # For workers, the global object is a DedicatedWorkerGlobalScope.
</span><del>-    return 0 if $interface-&gt;name eq &quot;WorkerGlobalScope&quot;;
</del><ins>+    return 0 if $interface-&gt;type-&gt;name eq &quot;WorkerGlobalScope&quot;;
</ins><span class="cx"> 
</span><span class="cx">     return IsDOMGlobalObject($interface);
</span><span class="cx"> }
</span><span class="lines">@@ -378,7 +382,7 @@
</span><span class="cx">         # where the index is out of range.
</span><span class="cx">         
</span><span class="cx">         # FIXME: Should this work for all string types?
</span><del>-        if ($indexedGetterFunction-&gt;signature-&gt;idlType-&gt;name eq &quot;DOMString&quot;) {
</del><ins>+        if ($indexedGetterFunction-&gt;signature-&gt;type-&gt;name eq &quot;DOMString&quot;) {
</ins><span class="cx">             push(@getOwnPropertySlotImpl, &quot;    if (optionalIndex) {\n&quot;);
</span><span class="cx">         } else {
</span><span class="cx">             push(@getOwnPropertySlotImpl, &quot;    if (optionalIndex &amp;&amp; optionalIndex.value() &lt; thisObject-&gt;wrapped().length()) {\n&quot;);
</span><span class="lines">@@ -441,7 +445,7 @@
</span><span class="cx"> sub GenerateHeaderContentHeader
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><del>-    my $className = &quot;JS&quot; . $interface-&gt;name;
</del><ins>+    my $className = &quot;JS&quot; . $interface-&gt;type-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">     my @headerContentHeader;
</span><span class="cx">     if ($interface-&gt;extendedAttributes-&gt;{AppleCopyright}) {
</span><span class="lines">@@ -460,7 +464,7 @@
</span><span class="cx"> sub GenerateImplementationContentHeader
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><del>-    my $className = &quot;JS&quot; . $interface-&gt;name;
</del><ins>+    my $className = &quot;JS&quot; . $interface-&gt;type-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">     my @implContentHeader;
</span><span class="cx">     if ($interface-&gt;extendedAttributes-&gt;{AppleCopyright}) {
</span><span class="lines">@@ -490,7 +494,7 @@
</span><span class="cx"> 
</span><span class="cx">     return 0 if not NeedsImplementationClass($interface);
</span><span class="cx">     return 1 if !$hasParent or $interface-&gt;extendedAttributes-&gt;{JSGenerateToNativeObject};
</span><del>-    return 1 if $interface-&gt;parent &amp;&amp; $interface-&gt;parent eq &quot;EventTarget&quot;;
</del><ins>+    return 1 if $interface-&gt;parentType &amp;&amp; $interface-&gt;parentType-&gt;name eq &quot;EventTarget&quot;;
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -515,7 +519,7 @@
</span><span class="cx">     return 0 if not NeedsImplementationClass($interface);
</span><span class="cx">     return 0 if $interface-&gt;extendedAttributes-&gt;{CustomProxyToJSObject};
</span><span class="cx">     return 1 if (!$hasParent or $interface-&gt;extendedAttributes-&gt;{JSGenerateToJSObject} or $interface-&gt;extendedAttributes-&gt;{CustomToJSObject});
</span><del>-    return 1 if $interface-&gt;parent &amp;&amp; $interface-&gt;parent eq &quot;EventTarget&quot;;
</del><ins>+    return 1 if $interface-&gt;parentType &amp;&amp; $interface-&gt;parentType-&gt;name eq &quot;EventTarget&quot;;
</ins><span class="cx">     return 1 if $interface-&gt;extendedAttributes-&gt;{Constructor} or $interface-&gt;extendedAttributes-&gt;{NamedConstructor};
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -535,7 +539,7 @@
</span><span class="cx"> 
</span><span class="cx">     return $codeGenerator-&gt;WK_lcfirst($className) . &quot;Constructor&quot; . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name) if $attribute-&gt;isStatic;
</span><span class="cx">     return GetJSBuiltinFunctionName($className, $attribute) if IsJSBuiltin($interface, $attribute);
</span><del>-    return &quot;js&quot; . $interface-&gt;name . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name) . ($codeGenerator-&gt;IsConstructorType($attribute-&gt;signature-&gt;idlType) ? &quot;Constructor&quot; : &quot;&quot;);
</del><ins>+    return &quot;js&quot; . $interface-&gt;type-&gt;name . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name) . ($codeGenerator-&gt;IsConstructorType($attribute-&gt;signature-&gt;type) ? &quot;Constructor&quot; : &quot;&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetAttributeSetterName
</span><span class="lines">@@ -544,7 +548,7 @@
</span><span class="cx"> 
</span><span class="cx">     return &quot;set&quot; . $codeGenerator-&gt;WK_ucfirst($className) . &quot;Constructor&quot; . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name) if $attribute-&gt;isStatic;
</span><span class="cx">     return &quot;set&quot; . $codeGenerator-&gt;WK_ucfirst(GetJSBuiltinFunctionName($className, $attribute)) if IsJSBuiltin($interface, $attribute);
</span><del>-    return &quot;setJS&quot; . $interface-&gt;name . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name) . ($codeGenerator-&gt;IsConstructorType($attribute-&gt;signature-&gt;idlType) ? &quot;Constructor&quot; : &quot;&quot;);
</del><ins>+    return &quot;setJS&quot; . $interface-&gt;type-&gt;name . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name) . ($codeGenerator-&gt;IsConstructorType($attribute-&gt;signature-&gt;type) ? &quot;Constructor&quot; : &quot;&quot;);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetFunctionName
</span><span class="lines">@@ -571,7 +575,7 @@
</span><span class="cx">         my $specials = $function-&gt;signature-&gt;specials;
</span><span class="cx">         my $specialExists = grep { $_ eq $special } @$specials;
</span><span class="cx">         my $parameters = $function-&gt;parameters;
</span><del>-        if ($specialExists and scalar(@$parameters) == $numberOfParameters and $parameters-&gt;[0]-&gt;idlType-&gt;name eq $firstParameterType) {
</del><ins>+        if ($specialExists and scalar(@$parameters) == $numberOfParameters and $parameters-&gt;[0]-&gt;type-&gt;name eq $firstParameterType) {
</ins><span class="cx">             return $function;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -590,7 +594,7 @@
</span><span class="cx"> sub InterfaceRequiresAttributesOnInstance
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">     # FIXME: All these return 1 if ... should ideally be removed.
</span><span class="cx">     # Some of them are unavoidable due to DOM weirdness, in which case we should
</span><span class="lines">@@ -600,7 +604,7 @@
</span><span class="cx">     return 1 if $interface-&gt;isException;
</span><span class="cx"> 
</span><span class="cx">     # FIXME: Add support for [PrimaryGlobal] / [Global].
</span><del>-    return 1 if IsDOMGlobalObject($interface) &amp;&amp; $interface-&gt;name ne &quot;WorkerGlobalScope&quot;;
</del><ins>+    return 1 if IsDOMGlobalObject($interface) &amp;&amp; $interface-&gt;type-&gt;name ne &quot;WorkerGlobalScope&quot;;
</ins><span class="cx"> 
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -614,7 +618,7 @@
</span><span class="cx">     return 0 if $attribute-&gt;signature-&gt;extendedAttributes-&gt;{EnabledAtRuntime} &amp;&amp; !IsDOMGlobalObject($interface);
</span><span class="cx"> 
</span><span class="cx">     return 1 if InterfaceRequiresAttributesOnInstance($interface);
</span><del>-    return 1 if $codeGenerator-&gt;IsConstructorType($attribute-&gt;signature-&gt;idlType);
</del><ins>+    return 1 if $codeGenerator-&gt;IsConstructorType($attribute-&gt;signature-&gt;type);
</ins><span class="cx"> 
</span><span class="cx">     # [Unforgeable] attributes should be on the instance.
</span><span class="cx">     # https://heycam.github.io/webidl/#Unforgeable
</span><span class="lines">@@ -636,7 +640,7 @@
</span><span class="cx">     my $function = shift;
</span><span class="cx"> 
</span><span class="cx">     # FIXME: Add support for [PrimaryGlobal] / [Global].
</span><del>-    return 1 if IsDOMGlobalObject($interface) &amp;&amp; $interface-&gt;name ne &quot;WorkerGlobalScope&quot;;
</del><ins>+    return 1 if IsDOMGlobalObject($interface) &amp;&amp; $interface-&gt;type-&gt;name ne &quot;WorkerGlobalScope&quot;;
</ins><span class="cx"> 
</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;{EnabledAtRuntime};
</span><span class="lines">@@ -656,10 +660,10 @@
</span><span class="cx">     push(@specials, &quot;DontDelete&quot;) if IsUnforgeable($interface, $attribute);
</span><span class="cx"> 
</span><span class="cx">     # As per Web IDL specification, constructor properties on the ECMAScript global object should not be enumerable.
</span><del>-    my $is_global_constructor = $attribute-&gt;signature-&gt;idlType-&gt;name =~ /Constructor$/;
-    push(@specials, &quot;DontEnum&quot;) if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{NotEnumerable} || $is_global_constructor);
</del><ins>+    my $isGlobalConstructor = $codeGenerator-&gt;IsConstructorType($attribute-&gt;signature-&gt;type);
+    push(@specials, &quot;DontEnum&quot;) if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{NotEnumerable} || $isGlobalConstructor);
</ins><span class="cx">     push(@specials, &quot;ReadOnly&quot;) if IsReadonly($attribute);
</span><del>-    push(@specials, &quot;CustomAccessor&quot;) unless $is_global_constructor or IsJSBuiltin($interface, $attribute);
</del><ins>+    push(@specials, &quot;CustomAccessor&quot;) unless $isGlobalConstructor or IsJSBuiltin($interface, $attribute);
</ins><span class="cx">     push(@specials, &quot;DOMJITAttribute&quot;) if $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;DOMJIT&quot;};
</span><span class="cx">     push(@specials, &quot;Accessor | Builtin&quot;) if  IsJSBuiltin($interface, $attribute);
</span><span class="cx">     return (@specials &gt; 0) ? join(&quot; | &quot;, @specials) : &quot;0&quot;;
</span><span class="lines">@@ -764,7 +768,7 @@
</span><span class="cx">     my $interface = shift;
</span><span class="cx">     return $interface-&gt;extendedAttributes-&gt;{JSCustomMarkFunction}
</span><span class="cx">         || $codeGenerator-&gt;InheritsInterface($interface, &quot;EventTarget&quot;)
</span><del>-        || $interface-&gt;name eq &quot;EventTarget&quot;
</del><ins>+        || $interface-&gt;type-&gt;name eq &quot;EventTarget&quot;
</ins><span class="cx">         || $interface-&gt;extendedAttributes-&gt;{ReportExtraMemoryCost}
</span><span class="cx">         || IsJSBuiltinConstructor($interface)
</span><span class="cx"> }
</span><span class="lines">@@ -782,7 +786,7 @@
</span><span class="cx">     my ($svgPropertyType, $svgListPropertyType, $svgNativeType) = GetSVGPropertyTypes($interface);
</span><span class="cx">     return $svgNativeType if $svgNativeType;
</span><span class="cx"> 
</span><del>-    return $interface-&gt;name;
</del><ins>+    return $interface-&gt;type-&gt;name;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub IsClassNameWordBoundary
</span><span class="lines">@@ -1044,23 +1048,23 @@
</span><span class="cx"> 
</span><span class="cx">     my $defaultValue = $signature-&gt;default;
</span><span class="cx"> 
</span><del>-    if ($codeGenerator-&gt;IsEnumType($signature-&gt;idlType)) {
</del><ins>+    if ($codeGenerator-&gt;IsEnumType($signature-&gt;type)) {
</ins><span class="cx">         # FIXME: Would be nice to report an error if the value does not have quote marks around it.
</span><span class="cx">         # FIXME: Would be nice to report an error if the value is not one of the enumeration values.
</span><del>-        my $className = GetEnumerationClassName($signature-&gt;idlType, $interface);
</del><ins>+        my $className = GetEnumerationClassName($signature-&gt;type, $interface);
</ins><span class="cx">         my $enumerationValueName = GetEnumerationValueName(substr($defaultValue, 1, -1));
</span><span class="cx">         return $className . &quot;::&quot; . $enumerationValueName;
</span><span class="cx">     }
</span><span class="cx">     if ($defaultValue eq &quot;null&quot;) {
</span><del>-        if ($signature-&gt;idlType-&gt;isUnion) {
-            return &quot;Nullopt&quot; if $signature-&gt;idlType-&gt;isNullable;
</del><ins>+        if ($signature-&gt;type-&gt;isUnion) {
+            return &quot;Nullopt&quot; if $signature-&gt;type-&gt;isNullable;
</ins><span class="cx"> 
</span><del>-            my $IDLType = GetIDLType($interface, $signature-&gt;idlType);
</del><ins>+            my $IDLType = GetIDLType($interface, $signature-&gt;type);
</ins><span class="cx">             return &quot;convert&lt;${IDLType}&gt;(state, jsNull());&quot;;
</span><span class="cx">         }
</span><del>-        return &quot;jsNull()&quot; if $signature-&gt;idlType-&gt;name eq &quot;any&quot;;
-        return &quot;nullptr&quot; if $codeGenerator-&gt;IsWrapperType($signature-&gt;idlType) || $codeGenerator-&gt;IsTypedArrayType($signature-&gt;idlType);
-        return &quot;String()&quot; if $codeGenerator-&gt;IsStringType($signature-&gt;idlType);
</del><ins>+        return &quot;jsNull()&quot; if $signature-&gt;type-&gt;name eq &quot;any&quot;;
+        return &quot;nullptr&quot; if $codeGenerator-&gt;IsWrapperType($signature-&gt;type) || $codeGenerator-&gt;IsTypedArrayType($signature-&gt;type);
+        return &quot;String()&quot; if $codeGenerator-&gt;IsStringType($signature-&gt;type);
</ins><span class="cx">         return &quot;Nullopt&quot;;
</span><span class="cx">     }
</span><span class="cx">     if ($defaultValue eq &quot;[]&quot;) {
</span><span class="lines">@@ -1095,7 +1099,7 @@
</span><span class="cx"> 
</span><span class="cx">     my $result = &quot;&quot;;
</span><span class="cx">     foreach my $dictionary (@$allDictionaries) {
</span><del>-        $headerIncludes{$interface-&gt;name . &quot;.h&quot;} = 1;
</del><ins>+        $headerIncludes{$interface-&gt;type-&gt;name . &quot;.h&quot;} = 1;
</ins><span class="cx">         my $className = GetDictionaryClassName($dictionary-&gt;type, $interface);
</span><span class="cx">         my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
</span><span class="cx">         $result .= GenerateDictionaryHeaderContent($dictionary, $className, $conditionalString);
</span><span class="lines">@@ -1109,7 +1113,7 @@
</span><span class="cx"> 
</span><span class="cx">     my $result = &quot;&quot;;
</span><span class="cx"> 
</span><del>-    my $name = $dictionary-&gt;name;
</del><ins>+    my $name = $dictionary-&gt;type-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">     $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
</span><span class="cx"> 
</span><span class="lines">@@ -1159,10 +1163,10 @@
</span><span class="cx">         # For each dictionary member member declared on dictionary, in lexicographical order:
</span><span class="cx">         my @sortedMembers = sort { $a-&gt;name cmp $b-&gt;name } @{$dictionary-&gt;members};
</span><span class="cx">         foreach my $member (@sortedMembers) {
</span><del>-            $member-&gt;default(&quot;undefined&quot;) if $member-&gt;idlType-&gt;name eq &quot;any&quot; and !defined($member-&gt;default); # Use undefined as default value for member of type 'any' unless specified otherwise.
</del><ins>+            $member-&gt;default(&quot;undefined&quot;) if $member-&gt;type-&gt;name eq &quot;any&quot; and !defined($member-&gt;default); # Use undefined as default value for member of type 'any' unless specified otherwise.
</ins><span class="cx"> 
</span><del>-            my $idlType = $member-&gt;idlType;
-            AddToImplIncludesForIDLType($idlType);
</del><ins>+            my $type = $member-&gt;type;
+            AddToImplIncludesForIDLType($type);
</ins><span class="cx"> 
</span><span class="cx">             # 5.1. Let key be the identifier of member.
</span><span class="cx">             my $key = $member-&gt;name;
</span><span class="lines">@@ -1170,7 +1174,7 @@
</span><span class="cx">             # 5.2. Let value be an ECMAScript value, depending on Type(V):
</span><span class="cx">             $result .= &quot;    JSValue ${key}Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, \&quot;${key}\&quot;));\n&quot;;
</span><span class="cx"> 
</span><del>-            my $IDLType = GetIDLType($interface, $idlType);
</del><ins>+            my $IDLType = GetIDLType($interface, $type);
</ins><span class="cx"> 
</span><span class="cx">             # 5.3. If value is not undefined, then:
</span><span class="cx">             $result .= &quot;    if (!${key}Value.isUndefined()) {\n&quot;;
</span><span class="lines">@@ -1185,7 +1189,7 @@
</span><span class="cx">             } elsif (!$member-&gt;isOptional) {
</span><span class="cx">                 # 5.5. Otherwise, if value is undefined and the dictionary member is a required dictionary member, then throw a TypeError.
</span><span class="cx">                 $result .= &quot;    } else {\n&quot;;
</span><del>-                $result .= &quot;        throwRequiredMemberTypeError(state, throwScope, \&quot;&quot;.$member-&gt;name.&quot;\&quot;, \&quot;$name\&quot;, \&quot;&quot;.$idlType-&gt;name.&quot;\&quot;);\n&quot;;
</del><ins>+                $result .= &quot;        throwRequiredMemberTypeError(state, throwScope, \&quot;&quot;. $member-&gt;name .&quot;\&quot;, \&quot;$name\&quot;, \&quot;&quot;. $type-&gt;name .&quot;\&quot;);\n&quot;;
</ins><span class="cx">                 $result .= &quot;        return { };\n&quot;;
</span><span class="cx">                 $result .= &quot;    }\n&quot;;
</span><span class="cx">             } else {
</span><span class="lines">@@ -1252,12 +1256,12 @@
</span><span class="cx"> {
</span><span class="cx">     my ($object, $interface, $enumerations, $dictionaries) = @_;
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $className = &quot;JS$interfaceName&quot;;
</span><span class="cx">     my %structureFlags = ();
</span><span class="cx"> 
</span><span class="cx">     my $hasLegacyParent = $interface-&gt;extendedAttributes-&gt;{JSLegacyParent};
</span><del>-    my $hasRealParent = $interface-&gt;parent;
</del><ins>+    my $hasRealParent = $interface-&gt;parentType;
</ins><span class="cx">     my $hasParent = $hasLegacyParent || $hasRealParent;
</span><span class="cx">     my $parentClassName = GetParentClassName($interface);
</span><span class="cx">     my $needsVisitChildren = InstanceNeedsVisitChildren($interface);
</span><span class="lines">@@ -1311,7 +1315,7 @@
</span><span class="cx">     # Static create methods
</span><span class="cx">     push(@headerContent, &quot;public:\n&quot;);
</span><span class="cx">     push(@headerContent, &quot;    using Base = $parentClassName;\n&quot;);
</span><del>-    push(@headerContent, &quot;    using DOMWrapped = $implType;\n&quot;) if $interface-&gt;parent;
</del><ins>+    push(@headerContent, &quot;    using DOMWrapped = $implType;\n&quot;) if $hasRealParent;
</ins><span class="cx"> 
</span><span class="cx">     if ($interfaceName eq &quot;DOMWindow&quot;) {
</span><span class="cx">         push(@headerContent, &quot;    static $className* create(JSC::VM&amp; vm, JSC::Structure* structure, Ref&lt;$implType&gt;&amp;&amp; impl, JSDOMWindowShell* windowShell)\n&quot;);
</span><span class="lines">@@ -1368,7 +1372,7 @@
</span><span class="cx">     # JSValue to implementation type
</span><span class="cx">     if (ShouldGenerateToWrapped($hasParent, $interface)) {
</span><span class="cx">         my $nativeType = GetNativeType($interface, $interface-&gt;type);
</span><del>-        if ($interface-&gt;name eq &quot;XPathNSResolver&quot;) {
</del><ins>+        if ($interface-&gt;type-&gt;name eq &quot;XPathNSResolver&quot;) {
</ins><span class="cx">             push(@headerContent, &quot;    static $nativeType toWrapped(JSC::ExecState&amp;, JSC::JSValue);\n&quot;);
</span><span class="cx">         } else {
</span><span class="cx">             my $export = &quot;&quot;;
</span><span class="lines">@@ -1734,7 +1738,7 @@
</span><span class="cx">         foreach my $attribute (@{$interface-&gt;attributes}) {
</span><span class="cx">             next unless $attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;DOMJIT&quot;};
</span><span class="cx"> 
</span><del>-            my $interfaceName = $interface-&gt;name;
</del><ins>+            my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">             my $className = $interfaceName . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name);
</span><span class="cx">             my $domJITClassName = $className . &quot;DOMJIT&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -1780,7 +1784,7 @@
</span><span class="cx">         my @ancestors;
</span><span class="cx">         $codeGenerator-&gt;ForAllParents($interface, sub {
</span><span class="cx">             my $currentInterface = shift;
</span><del>-            push(@ancestors, $currentInterface-&gt;name);
</del><ins>+            push(@ancestors, $currentInterface-&gt;type-&gt;name);
</ins><span class="cx">         }, 0);
</span><span class="cx">         for my $dictionary (@$dictionaries) {
</span><span class="cx">             my $parentType = $dictionary-&gt;parentType;
</span><span class="lines">@@ -1801,7 +1805,7 @@
</span><span class="cx">     my ($object, $interface, $isInstance, $hashKeys, $hashSpecials, $hashValue1, $hashValue2, $conditionals, $runtimeEnabledFunctions, $runtimeEnabledAttributes) = @_;
</span><span class="cx"> 
</span><span class="cx">     # FIXME: These should be functions on $interface.
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $className = &quot;JS$interfaceName&quot;;
</span><span class="cx">     
</span><span class="cx">     # - Add all properties in a hashtable definition
</span><span class="lines">@@ -1837,7 +1841,7 @@
</span><span class="cx">         push(@$hashSpecials, $special);
</span><span class="cx"> 
</span><span class="cx">         if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;DOMJIT&quot;}) {
</span><del>-            push(@$hashValue1, &quot;domJITGetterSetterFor&quot; . $interface-&gt;name . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name));
</del><ins>+            push(@$hashValue1, &quot;domJITGetterSetterFor&quot; . $interface-&gt;type-&gt;name . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name));
</ins><span class="cx">             push(@$hashValue2, &quot;0&quot;);
</span><span class="cx">         } else {
</span><span class="cx">             my $getter = GetAttributeGetterName($interface, $className, $attribute);
</span><span class="lines">@@ -1903,21 +1907,6 @@
</span><span class="cx">     return $propertyCount;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub IsNullableType
-{
-    my $type = shift;
-
-    return substr($type, -1) eq &quot;?&quot;;
-}
-
-sub StripNullable
-{
-    my $type = shift;
-
-    chop($type) if IsNullableType($type);
-    return $type;
-}
-
</del><span class="cx"> # This computes an effective overload set for a given operation / constructor,
</span><span class="cx"> # which represents the allowable invocations.This set is used as input for
</span><span class="cx"> # the Web IDL overload resolution algorithm.
</span><span class="lines">@@ -1946,7 +1935,7 @@
</span><span class="cx">         my @o;
</span><span class="cx">         my $isVariadic = 0;
</span><span class="cx">         foreach my $parameter (@{$overload-&gt;parameters}) {
</span><del>-            push(@t, $parameter-&gt;idlType);
</del><ins>+            push(@t, $parameter-&gt;type);
</ins><span class="cx">             if ($parameter-&gt;isOptional) {
</span><span class="cx">                 push(@o, &quot;optional&quot;);
</span><span class="cx">             } elsif ($parameter-&gt;isVariadic) {
</span><span class="lines">@@ -1979,11 +1968,11 @@
</span><span class="cx"> 
</span><span class="cx"> sub IsIDLTypeDistinguishableWithUnionForOverloadResolution
</span><span class="cx"> {
</span><del>-    my ($idlType, $unionSubtypes) = @_;
</del><ins>+    my ($type, $unionSubtypes) = @_;
</ins><span class="cx"> 
</span><del>-    assert(&quot;First type should not be a union&quot;) if $idlType-&gt;isUnion;
</del><ins>+    assert(&quot;First type should not be a union&quot;) if $type-&gt;isUnion;
</ins><span class="cx">     for my $unionSubType (@$unionSubtypes) {
</span><del>-        return 0 unless AreTypesDistinguishableForOverloadResolution($idlType, $unionSubType);
</del><ins>+        return 0 unless AreTypesDistinguishableForOverloadResolution($type, $unionSubType);
</ins><span class="cx">     }
</span><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="lines">@@ -1993,7 +1982,7 @@
</span><span class="cx"> # http://heycam.github.io/webidl/#dfn-distinguishable
</span><span class="cx"> sub AreTypesDistinguishableForOverloadResolution
</span><span class="cx"> {
</span><del>-    my ($idlTypeA, $idlTypeB) = @_;
</del><ins>+    my ($typeA, $typeB) = @_;
</ins><span class="cx"> 
</span><span class="cx">     my $isDictionary = sub {
</span><span class="cx">         my $type = shift;
</span><span class="lines">@@ -2005,33 +1994,33 @@
</span><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     # Two types are distinguishable for overload resolution if at most one of the two includes a nullable type.
</span><del>-    return 0 if $idlTypeA-&gt;isNullable &amp;&amp; $idlTypeB-&gt;isNullable;
</del><ins>+    return 0 if $typeA-&gt;isNullable &amp;&amp; $typeB-&gt;isNullable;
</ins><span class="cx"> 
</span><del>-    # Union types: idlTypeA and idlTypeB  are distinguishable if:
</del><ins>+    # Union types: typeA and typeB  are distinguishable if:
</ins><span class="cx">     # - Both types are either a union type or nullable union type, and each member type of the one is
</span><span class="cx">     #   distinguishable with each member type of the other.
</span><span class="cx">     # - One type is a union type or nullable union type, the other is neither a union type nor a nullable
</span><span class="cx">     #   union type, and each member type of the first is distinguishable with the second.
</span><del>-    if ($idlTypeA-&gt;isUnion &amp;&amp; $idlTypeB-&gt;isUnion) {
-        for my $unionASubType (@{$idlTypeA-&gt;subtypes}) {
-            return 0 unless IsIDLTypeDistinguishableWithUnionForOverloadResolution($unionASubType, $idlTypeB-&gt;subtypes);
</del><ins>+    if ($typeA-&gt;isUnion &amp;&amp; $typeB-&gt;isUnion) {
+        for my $unionASubType (@{$typeA-&gt;subtypes}) {
+            return 0 unless IsIDLTypeDistinguishableWithUnionForOverloadResolution($unionASubType, $typeB-&gt;subtypes);
</ins><span class="cx">         }
</span><span class="cx">         return 1;
</span><del>-    } elsif ($idlTypeA-&gt;isUnion) {
-        return IsIDLTypeDistinguishableWithUnionForOverloadResolution($idlTypeB, $idlTypeA-&gt;subtypes);
-    } elsif ($idlTypeB-&gt;isUnion) {
-        return IsIDLTypeDistinguishableWithUnionForOverloadResolution($idlTypeA, $idlTypeB-&gt;subtypes);
</del><ins>+    } elsif ($typeA-&gt;isUnion) {
+        return IsIDLTypeDistinguishableWithUnionForOverloadResolution($typeB, $typeA-&gt;subtypes);
+    } elsif ($typeB-&gt;isUnion) {
+        return IsIDLTypeDistinguishableWithUnionForOverloadResolution($typeA, $typeB-&gt;subtypes);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return 0 if $idlTypeA-&gt;name eq $idlTypeB-&gt;name;
-    return 0 if $idlTypeA-&gt;name eq &quot;object&quot; or $idlTypeB-&gt;name eq &quot;object&quot;;
-    return 0 if $codeGenerator-&gt;IsNumericType($idlTypeA) &amp;&amp; $codeGenerator-&gt;IsNumericType($idlTypeB);
-    return 0 if $codeGenerator-&gt;IsStringOrEnumType($idlTypeA) &amp;&amp; $codeGenerator-&gt;IsStringOrEnumType($idlTypeB);
-    return 0 if &amp;$isDictionary($idlTypeA) &amp;&amp; &amp;$isDictionary($idlTypeB);
-    return 0 if $codeGenerator-&gt;IsCallbackInterface($idlTypeA) &amp;&amp; $codeGenerator-&gt;IsCallbackInterface($idlTypeB);
-    return 0 if &amp;$isCallbackFunctionOrDictionary($idlTypeA) &amp;&amp; &amp;$isCallbackFunctionOrDictionary($idlTypeB);
-    return 0 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($idlTypeA) &amp;&amp; $codeGenerator-&gt;IsSequenceOrFrozenArrayType($idlTypeB);
-    # FIXME: return 0 if $idlTypeA and $idlTypeB are both exception types.
</del><ins>+    return 0 if $typeA-&gt;name eq $typeB-&gt;name;
+    return 0 if $typeA-&gt;name eq &quot;object&quot; or $typeB-&gt;name eq &quot;object&quot;;
+    return 0 if $codeGenerator-&gt;IsNumericType($typeA) &amp;&amp; $codeGenerator-&gt;IsNumericType($typeB);
+    return 0 if $codeGenerator-&gt;IsStringOrEnumType($typeA) &amp;&amp; $codeGenerator-&gt;IsStringOrEnumType($typeB);
+    return 0 if &amp;$isDictionary($typeA) &amp;&amp; &amp;$isDictionary($typeB);
+    return 0 if $codeGenerator-&gt;IsCallbackInterface($typeA) &amp;&amp; $codeGenerator-&gt;IsCallbackInterface($typeB);
+    return 0 if &amp;$isCallbackFunctionOrDictionary($typeA) &amp;&amp; &amp;$isCallbackFunctionOrDictionary($typeB);
+    return 0 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($typeA) &amp;&amp; $codeGenerator-&gt;IsSequenceOrFrozenArrayType($typeB);
+    # FIXME: return 0 if $typeA and $typeB are both exception types.
</ins><span class="cx">     return 1;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2044,12 +2033,12 @@
</span><span class="cx">     my ($function, $S) = @_;
</span><span class="cx"> 
</span><span class="cx">     # FIXME: Consider all the tuples, not just the 2 first ones?
</span><del>-    my $firstTupleIDLTypes = @{@{$S}[0]}[1];
-    my $secondTupleIDLTypes = @{@{$S}[1]}[1];
-    for (my $index = 0; $index &lt; scalar(@$firstTupleIDLTypes); $index++) {
-        return $index if AreTypesDistinguishableForOverloadResolution(@{$firstTupleIDLTypes}[$index], @{$secondTupleIDLTypes}[$index]);
</del><ins>+    my $firstTupleTypes = @{@{$S}[0]}[1];
+    my $secondTupleTypes = @{@{$S}[1]}[1];
+    for (my $index = 0; $index &lt; scalar(@$firstTupleTypes); $index++) {
+        return $index if AreTypesDistinguishableForOverloadResolution(@{$firstTupleTypes}[$index], @{$secondTupleTypes}[$index]);
</ins><span class="cx">     }
</span><del>-    die &quot;Undistinguishable overloads for operation &quot; . $function-&gt;signature-&gt;name . &quot; with length: &quot; . scalar(@$firstTupleIDLTypes);
</del><ins>+    die &quot;Undistinguishable overloads for operation &quot; . $function-&gt;signature-&gt;name . &quot; with length: &quot; . scalar(@$firstTupleTypes);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetOverloadThatMatches
</span><span class="lines">@@ -2057,14 +2046,14 @@
</span><span class="cx">     my ($S, $parameterIndex, $matches) = @_;
</span><span class="cx"> 
</span><span class="cx">     for my $tuple (@{$S}) {
</span><del>-        my $idlType = @{@{$tuple}[1]}[$parameterIndex];
</del><ins>+        my $type = @{@{$tuple}[1]}[$parameterIndex];
</ins><span class="cx">         my $optionality = @{@{$tuple}[2]}[$parameterIndex];
</span><del>-        if ($idlType-&gt;isUnion) {
-            for my $idlSubtype (GetFlattenedMemberTypes($idlType)) {
-                return @{$tuple}[0] if $matches-&gt;($idlSubtype, $optionality);
</del><ins>+        if ($type-&gt;isUnion) {
+            for my $subtype (GetFlattenedMemberTypes($type)) {
+                return @{$tuple}[0] if $matches-&gt;($subtype, $optionality);
</ins><span class="cx">             }
</span><span class="cx">         } else {
</span><del>-            return @{$tuple}[0] if $matches-&gt;($idlType, $optionality);
</del><ins>+            return @{$tuple}[0] if $matches-&gt;($type, $optionality);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="lines">@@ -2074,9 +2063,9 @@
</span><span class="cx">     my ($S, $parameterIndex, $matches) = @_;
</span><span class="cx"> 
</span><span class="cx">     for my $tuple (@{$S}) {
</span><del>-        my $idlType = @{@{$tuple}[1]}[$parameterIndex];
</del><ins>+        my $type = @{@{$tuple}[1]}[$parameterIndex];
</ins><span class="cx">         my $optionality = @{@{$tuple}[2]}[$parameterIndex];
</span><del>-        return @{$tuple}[0] if $matches-&gt;($idlType, $optionality);
</del><ins>+        return @{$tuple}[0] if $matches-&gt;($type, $optionality);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2102,7 +2091,7 @@
</span><span class="cx">     my ($function, $interface, $isConstructor) = @_;
</span><span class="cx">     my %allSets = ComputeEffectiveOverloadSet($function-&gt;{overloads});
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $className = &quot;JS$interfaceName&quot;;
</span><span class="cx">     my $functionName;
</span><span class="cx">     if ($isConstructor) {
</span><span class="lines">@@ -2122,68 +2111,68 @@
</span><span class="cx">         push(@implContent, &quot;#endif\n&quot;) if $conditionalString;
</span><span class="cx">     };
</span><span class="cx">     my $isOptionalParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
</del><ins>+        my ($type, $optionality) = @_;
</ins><span class="cx">         return $optionality eq &quot;optional&quot;;
</span><span class="cx">     };
</span><span class="cx">     my $isDictionaryParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return $idlType-&gt;name eq &quot;Dictionary&quot; || $codeGenerator-&gt;IsDictionaryType($idlType);
</del><ins>+        my ($type, $optionality) = @_;
+        return $type-&gt;name eq &quot;Dictionary&quot; || $codeGenerator-&gt;IsDictionaryType($type);
</ins><span class="cx">     };
</span><span class="cx">     my $isNullableOrDictionaryParameterOrUnionContainingOne = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return 1 if $idlType-&gt;isNullable;
-        if ($idlType-&gt;isUnion) {
-            for my $idlSubtype (GetFlattenedMemberTypes($idlType)) {
-                return 1 if $idlType-&gt;isNullable || &amp;$isDictionaryParameter($idlSubtype, $optionality);
</del><ins>+        my ($type, $optionality) = @_;
+        return 1 if $type-&gt;isNullable;
+        if ($type-&gt;isUnion) {
+            for my $subtype (GetFlattenedMemberTypes($type)) {
+                return 1 if $type-&gt;isNullable || &amp;$isDictionaryParameter($subtype, $optionality);
</ins><span class="cx">             }
</span><span class="cx">             return 0;
</span><span class="cx">         } else {
</span><del>-            return &amp;$isDictionaryParameter($idlType, $optionality);
</del><ins>+            return &amp;$isDictionaryParameter($type, $optionality);
</ins><span class="cx">         }
</span><span class="cx">     };
</span><span class="cx">     my $isRegExpOrObjectParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return $idlType-&gt;name eq &quot;RegExp&quot; || $idlType-&gt;name eq &quot;object&quot;;
</del><ins>+        my ($type, $optionality) = @_;
+        return $type-&gt;name eq &quot;RegExp&quot; || $type-&gt;name eq &quot;object&quot;;
</ins><span class="cx">     };
</span><span class="cx">     my $isObjectOrErrorParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return $idlType-&gt;name eq &quot;object&quot; || $idlType-&gt;name eq &quot;Error&quot;;
</del><ins>+        my ($type, $optionality) = @_;
+        return $type-&gt;name eq &quot;object&quot; || $type-&gt;name eq &quot;Error&quot;;
</ins><span class="cx">     };
</span><span class="cx">     my $isObjectOrErrorOrDOMExceptionParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return 1 if &amp;$isObjectOrErrorParameter($idlType, $optionality);
-        return $idlType-&gt;name eq &quot;DOMException&quot;;
</del><ins>+        my ($type, $optionality) = @_;
+        return 1 if &amp;$isObjectOrErrorParameter($type, $optionality);
+        return $type-&gt;name eq &quot;DOMException&quot;;
</ins><span class="cx">     };
</span><span class="cx">     my $isObjectOrCallbackFunctionParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return $idlType-&gt;name eq &quot;object&quot; || $codeGenerator-&gt;IsFunctionOnlyCallbackInterface($idlType);
</del><ins>+        my ($type, $optionality) = @_;
+        return $type-&gt;name eq &quot;object&quot; || $codeGenerator-&gt;IsFunctionOnlyCallbackInterface($type);
</ins><span class="cx">     };
</span><span class="cx">     my $isSequenceOrFrozenArrayParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return $codeGenerator-&gt;IsSequenceOrFrozenArrayType($idlType);
</del><ins>+        my ($type, $optionality) = @_;
+        return $codeGenerator-&gt;IsSequenceOrFrozenArrayType($type);
</ins><span class="cx">     };
</span><span class="cx">     my $isDictionaryOrObjectOrCallbackInterfaceParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return 1 if &amp;$isDictionaryParameter($idlType, $optionality);
-        return 1 if $idlType-&gt;name eq &quot;object&quot;;
-        return 1 if $codeGenerator-&gt;IsCallbackInterface($idlType) &amp;&amp; !$codeGenerator-&gt;IsFunctionOnlyCallbackInterface($idlType);
</del><ins>+        my ($type, $optionality) = @_;
+        return 1 if &amp;$isDictionaryParameter($type, $optionality);
+        return 1 if $type-&gt;name eq &quot;object&quot;;
+        return 1 if $codeGenerator-&gt;IsCallbackInterface($type) &amp;&amp; !$codeGenerator-&gt;IsFunctionOnlyCallbackInterface($type);
</ins><span class="cx">         return 0;
</span><span class="cx">     };
</span><span class="cx">     my $isBooleanParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return $idlType-&gt;name eq &quot;boolean&quot;;
</del><ins>+        my ($type, $optionality) = @_;
+        return $type-&gt;name eq &quot;boolean&quot;;
</ins><span class="cx">     };
</span><span class="cx">     my $isNumericParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return $codeGenerator-&gt;IsNumericType($idlType);
</del><ins>+        my ($type, $optionality) = @_;
+        return $codeGenerator-&gt;IsNumericType($type);
</ins><span class="cx">     };
</span><span class="cx">     my $isStringOrEnumParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return $codeGenerator-&gt;IsStringOrEnumType($idlType);
</del><ins>+        my ($type, $optionality) = @_;
+        return $codeGenerator-&gt;IsStringOrEnumType($type);
</ins><span class="cx">     };
</span><span class="cx">     my $isAnyParameter = sub {
</span><del>-        my ($idlType, $optionality) = @_;
-        return $idlType-&gt;name eq &quot;any&quot;;
</del><ins>+        my ($type, $optionality) = @_;
+        return $type-&gt;name eq &quot;any&quot;;
</ins><span class="cx">     };
</span><span class="cx"> 
</span><span class="cx">     my $maxArgCount = LengthOfLongestFunctionParameterList($function-&gt;{overloads});
</span><span class="lines">@@ -2221,16 +2210,16 @@
</span><span class="cx"> 
</span><span class="cx">             for my $tuple (@{$S}) {
</span><span class="cx">                 my $overload = @{$tuple}[0];
</span><del>-                my $idlType = @{@{$tuple}[1]}[$d];
</del><ins>+                my $type = @{@{$tuple}[1]}[$d];
</ins><span class="cx"> 
</span><del>-                my @idlSubtypes = $idlType-&gt;isUnion ? GetFlattenedMemberTypes($idlType) : ( $idlType );
-                for my $idlSubtype (@idlSubtypes) {
-                    if ($codeGenerator-&gt;IsWrapperType($idlSubtype) || $codeGenerator-&gt;IsTypedArrayType($idlSubtype)) {
-                        if ($idlSubtype-&gt;name eq &quot;DOMWindow&quot;) {
</del><ins>+                my @subtypes = $type-&gt;isUnion ? GetFlattenedMemberTypes($type) : ( $type );
+                for my $subtype (@subtypes) {
+                    if ($codeGenerator-&gt;IsWrapperType($subtype) || $codeGenerator-&gt;IsTypedArrayType($subtype)) {
+                        if ($subtype-&gt;name eq &quot;DOMWindow&quot;) {
</ins><span class="cx">                             AddToImplIncludes(&quot;JSDOMWindowShell.h&quot;);
</span><span class="cx">                             &amp;$generateOverloadCallIfNecessary($overload, &quot;distinguishingArg.isObject() &amp;&amp; (asObject(distinguishingArg)-&gt;inherits(JSDOMWindowShell::info()) || asObject(distinguishingArg)-&gt;inherits(JSDOMWindow::info()))&quot;);
</span><span class="cx">                         } else {
</span><del>-                            &amp;$generateOverloadCallIfNecessary($overload, &quot;distinguishingArg.isObject() &amp;&amp; asObject(distinguishingArg)-&gt;inherits(JS&quot; . $idlSubtype-&gt;name . &quot;::info())&quot;);
</del><ins>+                            &amp;$generateOverloadCallIfNecessary($overload, &quot;distinguishingArg.isObject() &amp;&amp; asObject(distinguishingArg)-&gt;inherits(JS&quot; . $subtype-&gt;name . &quot;::info())&quot;);
</ins><span class="cx">                         }
</span><span class="cx">                     }
</span><span class="cx">                 }
</span><span class="lines">@@ -2332,8 +2321,8 @@
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
-    $interfaceName = $codeGenerator-&gt;GetSVGTypeNeedingTearOffForType($interface-&gt;type) if $codeGenerator-&gt;IsSVGTypeNeedingTearOffForType($interface-&gt;type);
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
+    $interfaceName = $codeGenerator-&gt;GetSVGTypeNeedingTearOff($interface-&gt;type) if $codeGenerator-&gt;IsSVGTypeNeedingTearOff($interface-&gt;type);
</ins><span class="cx">     return $interfaceName;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2484,7 +2473,7 @@
</span><span class="cx"> sub GetCastingHelperForThisObject
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">     return &quot;jsNodeCast&quot; if $interfaceName eq &quot;Node&quot;;
</span><span class="cx">     return &quot;jsElementCast&quot; if $interfaceName eq &quot;Element&quot;;
</span><span class="lines">@@ -2499,7 +2488,7 @@
</span><span class="cx">     my $indexedGetterFunction = shift;
</span><span class="cx">     
</span><span class="cx">     # FIXME: Should this work for all string types?
</span><del>-    return &quot;jsStringOrUndefined(state, thisObject-&gt;wrapped().item(index))&quot; if $indexedGetterFunction-&gt;signature-&gt;idlType-&gt;name eq &quot;DOMString&quot;;
</del><ins>+    return &quot;jsStringOrUndefined(state, thisObject-&gt;wrapped().item(index))&quot; if $indexedGetterFunction-&gt;signature-&gt;type-&gt;name eq &quot;DOMString&quot;;
</ins><span class="cx">     return &quot;toJS(state, thisObject-&gt;globalObject(), thisObject-&gt;wrapped().item(index))&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -2525,8 +2514,9 @@
</span><span class="cx"> sub GetResultTypeFilter
</span><span class="cx"> {
</span><span class="cx">     my ($signature) = @_;
</span><del>-    my $idlType = $signature-&gt;idlType;
</del><span class="cx"> 
</span><ins>+    my $type = $signature-&gt;type;
+
</ins><span class="cx">     my %TypeFilters = (
</span><span class="cx">         &quot;any&quot; =&gt; &quot;SpecHeapTop&quot;,
</span><span class="cx">         &quot;boolean&quot; =&gt; &quot;SpecBoolean&quot;,
</span><span class="lines">@@ -2547,10 +2537,10 @@
</span><span class="cx">         &quot;USVString&quot; =&gt; &quot;SpecString&quot;,
</span><span class="cx">     );
</span><span class="cx"> 
</span><del>-    if (exists $TypeFilters{$idlType-&gt;name}) {
-        my $resultType = &quot;JSC::$TypeFilters{$idlType-&gt;name}&quot;;
-        if ($idlType-&gt;isNullable) {
-            die &quot;\&quot;any\&quot; type must not become nullable.&quot; if $idlType-&gt;name eq &quot;any&quot;;
</del><ins>+    if (exists $TypeFilters{$type-&gt;name}) {
+        my $resultType = &quot;JSC::$TypeFilters{$type-&gt;name}&quot;;
+        if ($type-&gt;isNullable) {
+            die &quot;\&quot;any\&quot; type must not become nullable.&quot; if $type-&gt;name eq &quot;any&quot;;
</ins><span class="cx">             $resultType = &quot;($resultType | JSC::SpecOther)&quot;;
</span><span class="cx">         }
</span><span class="cx">         return $resultType;
</span><span class="lines">@@ -2562,15 +2552,15 @@
</span><span class="cx"> {
</span><span class="cx">     my ($object, $interface, $enumerations, $dictionaries) = @_;
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $className = &quot;JS$interfaceName&quot;;
</span><span class="cx"> 
</span><span class="cx">     my $hasLegacyParent = $interface-&gt;extendedAttributes-&gt;{JSLegacyParent};
</span><del>-    my $hasRealParent = $interface-&gt;parent;
</del><ins>+    my $hasRealParent = $interface-&gt;parentType;
</ins><span class="cx">     my $hasParent = $hasLegacyParent || $hasRealParent;
</span><span class="cx">     my $parentClassName = GetParentClassName($interface);
</span><span class="cx">     my $visibleInterfaceName = $codeGenerator-&gt;GetVisibleInterfaceName($interface);
</span><del>-    my $eventTarget = $codeGenerator-&gt;InheritsInterface($interface, &quot;EventTarget&quot;) &amp;&amp; $interface-&gt;name ne &quot;EventTarget&quot;;
</del><ins>+    my $eventTarget = $codeGenerator-&gt;InheritsInterface($interface, &quot;EventTarget&quot;) &amp;&amp; $interface-&gt;type-&gt;name ne &quot;EventTarget&quot;;
</ins><span class="cx">     my $needsVisitChildren = InstanceNeedsVisitChildren($interface);
</span><span class="cx"> 
</span><span class="cx">     my $namedGetterFunction = GetNamedGetterFunction($interface);
</span><span class="lines">@@ -2728,7 +2718,7 @@
</span><span class="cx">             push(@hashSpecials, $special);
</span><span class="cx"> 
</span><span class="cx">             if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;DOMJIT&quot;}) {
</span><del>-                push(@hashValue1, &quot;domJITGetterSetterFor&quot; . $interface-&gt;name . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name));
</del><ins>+                push(@hashValue1, &quot;domJITGetterSetterFor&quot; . $interface-&gt;type-&gt;name . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name));
</ins><span class="cx">                 push(@hashValue2, &quot;0&quot;);
</span><span class="cx">             } else {
</span><span class="cx">                 my $getter = GetAttributeGetterName($interface, $className, $attribute);
</span><span class="lines">@@ -2991,8 +2981,8 @@
</span><span class="cx">     unless (ShouldUseGlobalObjectPrototype($interface)) {
</span><span class="cx">         push(@implContent, &quot;JSObject* ${className}::createPrototype(VM&amp; vm, JSGlobalObject* globalObject)\n&quot;);
</span><span class="cx">         push(@implContent, &quot;{\n&quot;);
</span><del>-        if ($interface-&gt;parent) {
-            my $parentClassNameForPrototype = &quot;JS&quot; . $interface-&gt;parent;
</del><ins>+        if ($interface-&gt;parentType) {
+            my $parentClassNameForPrototype = &quot;JS&quot; . $interface-&gt;parentType-&gt;name;
</ins><span class="cx">             push(@implContent, &quot;    return ${className}Prototype::create(vm, globalObject, ${className}Prototype::createStructure(vm, globalObject, ${parentClassNameForPrototype}::prototype(vm, globalObject)));\n&quot;);
</span><span class="cx">         } else {
</span><span class="cx">             my $prototype = $interface-&gt;isException ? &quot;errorPrototype&quot; : &quot;objectPrototype&quot;;
</span><span class="lines">@@ -3048,7 +3038,7 @@
</span><span class="cx"> 
</span><span class="cx">             if ($indexedGetterFunction) {
</span><span class="cx">                 # FIXME: Should this work for all string types?
</span><del>-                if ($indexedGetterFunction-&gt;signature-&gt;idlType-&gt;name eq &quot;DOMString&quot;) {
</del><ins>+                if ($indexedGetterFunction-&gt;signature-&gt;type-&gt;name eq &quot;DOMString&quot;) {
</ins><span class="cx">                     push(@implContent, &quot;    if (LIKELY(index &lt;= MAX_ARRAY_INDEX)) {\n&quot;);
</span><span class="cx">                 } else {
</span><span class="cx">                     push(@implContent, &quot;    if (LIKELY(index &lt; thisObject-&gt;wrapped().length())) {\n&quot;);
</span><span class="lines">@@ -3127,7 +3117,7 @@
</span><span class="cx">             next if IsJSBuiltin($interface, $attribute);
</span><span class="cx"> 
</span><span class="cx">             my $name = $attribute-&gt;signature-&gt;name;
</span><del>-            my $idlType = $attribute-&gt;signature-&gt;idlType;
</del><ins>+            my $type = $attribute-&gt;signature-&gt;type;
</ins><span class="cx">             my $getFunctionName = GetAttributeGetterName($interface, $className, $attribute);
</span><span class="cx">             my $implGetterFunctionName = $codeGenerator-&gt;WK_lcfirst($attribute-&gt;signature-&gt;extendedAttributes-&gt;{ImplementedAs} || $name);
</span><span class="cx">             my $getterMayThrowLegacyException = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{GetterMayThrowLegacyException};
</span><span class="lines">@@ -3137,7 +3127,7 @@
</span><span class="cx">             my $attributeConditionalString = $codeGenerator-&gt;GenerateConditionalString($attribute-&gt;signature);
</span><span class="cx">             push(@implContent, &quot;#if ${attributeConditionalString}\n&quot;) if $attributeConditionalString;
</span><span class="cx"> 
</span><del>-            if (!$attribute-&gt;isStatic || $codeGenerator-&gt;IsConstructorType($idlType)) {
</del><ins>+            if (!$attribute-&gt;isStatic || $codeGenerator-&gt;IsConstructorType($type)) {
</ins><span class="cx">                 my $templateParameters = &quot;${getFunctionName}Getter&quot;;
</span><span class="cx">                 if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{LenientThis}) {
</span><span class="cx">                     $templateParameters .= &quot;, CastedThisErrorBehavior::ReturnEarly&quot;;
</span><span class="lines">@@ -3176,7 +3166,7 @@
</span><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             # Global constructors can be disabled at runtime.
</span><del>-            if ($codeGenerator-&gt;IsConstructorType($idlType)) {
</del><ins>+            if ($codeGenerator-&gt;IsConstructorType($type)) {
</ins><span class="cx">                 if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{EnabledBySetting}) {
</span><span class="cx">                     AddToImplIncludes(&quot;Frame.h&quot;);
</span><span class="cx">                     AddToImplIncludes(&quot;Settings.h&quot;);
</span><span class="lines">@@ -3211,8 +3201,8 @@
</span><span class="cx">                 push(@implContent, &quot;    JSGlobalObject* globalObject = state.lexicalGlobalObject();\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;    InputCursor&amp; cursor = globalObject-&gt;inputCursor();\n&quot;);
</span><span class="cx"> 
</span><del>-                my $nativeType = GetNativeType($interface, $idlType);
-                my $memoizedType = GetNativeTypeForMemoization($interface, $idlType);
</del><ins>+                my $nativeType = GetNativeType($interface, $type);
+                my $memoizedType = GetNativeTypeForMemoization($interface, $type);
</ins><span class="cx">                 my $exceptionCode = $getterMayThrowLegacyException ? &quot;ec&quot; : &quot;0&quot;;
</span><span class="cx">                 push(@implContent, &quot;    static NeverDestroyed&lt;const AtomicString&gt; bindingName(\&quot;$interfaceName.$name\&quot;, AtomicString::ConstructFromLiteral);\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;    if (cursor.isCapturing()) {\n&quot;);
</span><span class="lines">@@ -3242,7 +3232,7 @@
</span><span class="cx">                 $implIncludes{&quot;JSDOMBinding.h&quot;} = 1;
</span><span class="cx">                 push(@implContent, &quot;    auto&amp; impl = thisObject.wrapped();\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;    return shouldAllowAccessToNode(&amp;state, impl.&quot; . $attribute-&gt;signature-&gt;name . &quot;()) ? &quot; . NativeToJSValueUsingReferences($attribute-&gt;signature, 0, $interface, &quot;impl.$implGetterFunctionName()&quot;, &quot;thisObject&quot;) . &quot; : jsNull();\n&quot;);
</span><del>-            } elsif ($idlType-&gt;name eq &quot;EventHandler&quot;) {
</del><ins>+            } elsif ($type-&gt;name eq &quot;EventHandler&quot;) {
</ins><span class="cx">                 $implIncludes{&quot;EventNames.h&quot;} = 1;
</span><span class="cx">                 my $getter = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{WindowEventHandler} ? &quot;windowEventHandlerAttribute&quot;
</span><span class="cx">                     : $attribute-&gt;signature-&gt;extendedAttributes-&gt;{DocumentEventHandler} ? &quot;documentEventHandlerAttribute&quot;
</span><span class="lines">@@ -3249,8 +3239,8 @@
</span><span class="cx">                     : &quot;eventHandlerAttribute&quot;;
</span><span class="cx">                 my $eventName = EventHandlerAttributeEventName($attribute);
</span><span class="cx">                 push(@implContent, &quot;    return $getter(thisObject.wrapped(), $eventName);\n&quot;);
</span><del>-            } elsif ($codeGenerator-&gt;IsConstructorType($attribute-&gt;signature-&gt;idlType)) {
-                my $constructorType = $attribute-&gt;signature-&gt;idlType-&gt;name;
</del><ins>+            } elsif ($codeGenerator-&gt;IsConstructorType($attribute-&gt;signature-&gt;type)) {
+                my $constructorType = $attribute-&gt;signature-&gt;type-&gt;name;
</ins><span class="cx">                 $constructorType =~ s/Constructor$//;
</span><span class="cx">                 # When Constructor attribute is used by DOMWindow.idl, it's correct to pass thisObject as the global object
</span><span class="cx">                 # When JSDOMWrappers have a back-pointer to the globalObject we can pass thisObject-&gt;globalObject()
</span><span class="lines">@@ -3299,7 +3289,7 @@
</span><span class="cx">                     unshift(@arguments, @callWithArgs);
</span><span class="cx">                     my $jsType = NativeToJSValueUsingReferences($attribute-&gt;signature, 0, $interface, &quot;${functionName}(&quot; . join(&quot;, &quot;, @arguments) . &quot;)&quot;, &quot;thisObject&quot;);
</span><span class="cx">                     push(@implContent, &quot;    auto&amp; impl = thisObject.wrapped();\n&quot;) if !$attribute-&gt;isStatic;
</span><del>-                    if ($codeGenerator-&gt;IsSVGAnimatedType($idlType)) {
</del><ins>+                    if ($codeGenerator-&gt;IsSVGAnimatedType($type)) {
</ins><span class="cx">                         push(@implContent, &quot;    auto obj = $jsType;\n&quot;);
</span><span class="cx">                         push(@implContent, &quot;    JSValue result = toJS(&amp;state, thisObject.globalObject(), obj.get());\n&quot;);
</span><span class="cx">                     } else {
</span><span class="lines">@@ -3330,7 +3320,7 @@
</span><span class="cx"> 
</span><span class="cx">             if ($attribute-&gt;signature-&gt;extendedAttributes-&gt;{&quot;DOMJIT&quot;}) {
</span><span class="cx">                 $implIncludes{&quot;&lt;wtf/NeverDestroyed.h&gt;&quot;} = 1;
</span><del>-                my $interfaceName = $interface-&gt;name;
</del><ins>+                my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">                 my $attributeName = $attribute-&gt;signature-&gt;name;
</span><span class="cx">                 my $generatorName = $interfaceName . $codeGenerator-&gt;WK_ucfirst($attribute-&gt;signature-&gt;name);
</span><span class="cx">                 my $domJITClassName = $generatorName . &quot;DOMJIT&quot;;
</span><span class="lines">@@ -3447,7 +3437,7 @@
</span><span class="cx">             next if IsJSBuiltin($interface, $attribute);
</span><span class="cx"> 
</span><span class="cx">             my $name = $attribute-&gt;signature-&gt;name;
</span><del>-            my $idlType = $attribute-&gt;signature-&gt;idlType;
</del><ins>+            my $type = $attribute-&gt;signature-&gt;type;
</ins><span class="cx">             my $putFunctionName = GetAttributeSetterName($interface, $className, $attribute);
</span><span class="cx">             my $implSetterFunctionName = $codeGenerator-&gt;WK_ucfirst($name);
</span><span class="cx">             my $setterMayThrowLegacyException = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{SetterMayThrowLegacyException};
</span><span class="lines">@@ -3501,7 +3491,7 @@
</span><span class="cx">             if (HasCustomSetter($attribute-&gt;signature-&gt;extendedAttributes)) {
</span><span class="cx">                 push(@implContent, &quot;    thisObject.set$implSetterFunctionName(state, value);\n&quot;);
</span><span class="cx">                 push(@implContent, &quot;    return true;\n&quot;);
</span><del>-            } elsif ($idlType-&gt;name eq &quot;EventHandler&quot;) {
</del><ins>+            } elsif ($type-&gt;name eq &quot;EventHandler&quot;) {
</ins><span class="cx">                 $implIncludes{&quot;JSEventListener.h&quot;} = 1;
</span><span class="cx">                 my $eventName = EventHandlerAttributeEventName($attribute);
</span><span class="cx">                 # FIXME: Find a way to do this special case without hardcoding the class and attribute names here.
</span><span class="lines">@@ -3516,8 +3506,8 @@
</span><span class="cx">                     push(@implContent, &quot;    $setter(state, thisObject, thisObject.wrapped(), $eventName, value);\n&quot;);
</span><span class="cx">                 }
</span><span class="cx">                 push(@implContent, &quot;    return true;\n&quot;);
</span><del>-            } elsif ($codeGenerator-&gt;IsConstructorType($idlType)) {
-                my $constructorType = $idlType-&gt;name;
</del><ins>+            } elsif ($codeGenerator-&gt;IsConstructorType($type)) {
+                my $constructorType = $type-&gt;name;
</ins><span class="cx">                 $constructorType =~ s/Constructor$//;
</span><span class="cx">                 # $constructorType ~= /Constructor$/ indicates that it is NamedConstructor.
</span><span class="cx">                 # We do not generate the header file for NamedConstructor of class XXXX,
</span><span class="lines">@@ -3539,7 +3529,7 @@
</span><span class="cx">                     my $putForwards = $attribute-&gt;signature-&gt;extendedAttributes-&gt;{PutForwards};
</span><span class="cx">                     if ($putForwards) {
</span><span class="cx">                         my $implGetterFunctionName = $codeGenerator-&gt;WK_lcfirst($attribute-&gt;signature-&gt;extendedAttributes-&gt;{ImplementedAs} || $name);
</span><del>-                        my $forwardedAttribute = $codeGenerator-&gt;GetAttributeFromInterface($interface, $idlType-&gt;name, $putForwards);
</del><ins>+                        my $forwardedAttribute = $codeGenerator-&gt;GetAttributeFromInterface($interface, $type-&gt;name, $putForwards);
</ins><span class="cx"> 
</span><span class="cx">                         if ($forwardedAttribute-&gt;signature-&gt;extendedAttributes-&gt;{CEReactions}) {
</span><span class="cx">                             push(@implContent, &quot;#if ENABLE(CUSTOM_ELEMENTS)\n&quot;);
</span><span class="lines">@@ -3548,19 +3538,18 @@
</span><span class="cx">                             $implIncludes{&quot;CustomElementReactionQueue.h&quot;} = 1;
</span><span class="cx">                         }
</span><span class="cx"> 
</span><del>-                        my $typeName = $idlType-&gt;name;
-                        if ($attribute-&gt;signature-&gt;isNullable) {
-                            push(@implContent, &quot;    RefPtr&lt;${typeName}&gt; forwardedImpl = thisObject.wrapped().${implGetterFunctionName}();\n&quot;);
</del><ins>+                        if ($type-&gt;isNullable) {
+                            push(@implContent, &quot;    RefPtr&lt;&quot; . $type-&gt;name . &quot;&gt; forwardedImpl = thisObject.wrapped().${implGetterFunctionName}();\n&quot;);
</ins><span class="cx">                             push(@implContent, &quot;    if (!forwardedImpl)\n&quot;);
</span><span class="cx">                             push(@implContent, &quot;        return false;\n&quot;);
</span><span class="cx">                             push(@implContent, &quot;    auto&amp; impl = *forwardedImpl;\n&quot;);
</span><span class="cx">                         } else {
</span><span class="cx">                             # Attribute is not nullable, the implementation is expected to return a reference.
</span><del>-                            push(@implContent, &quot;    Ref&lt;${typeName}&gt; forwardedImpl = thisObject.wrapped().${implGetterFunctionName}();\n&quot;);
</del><ins>+                            push(@implContent, &quot;    Ref&lt;&quot; . $type-&gt;name . &quot;&gt; forwardedImpl = thisObject.wrapped().${implGetterFunctionName}();\n&quot;);
</ins><span class="cx">                             push(@implContent, &quot;    auto&amp; impl = forwardedImpl.get();\n&quot;);
</span><span class="cx">                         }
</span><span class="cx">                         $attribute = $forwardedAttribute;
</span><del>-                        $idlType = $attribute-&gt;signature-&gt;idlType;
</del><ins>+                        $type = $attribute-&gt;signature-&gt;type;
</ins><span class="cx">                     } else {
</span><span class="cx">                         push(@implContent, &quot;    auto&amp; impl = thisObject.wrapped();\n&quot;);
</span><span class="cx">                     }
</span><span class="lines">@@ -3571,7 +3560,7 @@
</span><span class="cx">                 my $shouldPassByReference = ShouldPassWrapperByReference($attribute-&gt;signature, $interface);
</span><span class="cx"> 
</span><span class="cx">                 my ($nativeValue, $mayThrowException) = JSValueToNative($interface, $attribute-&gt;signature, &quot;value&quot;, $attribute-&gt;signature-&gt;extendedAttributes-&gt;{Conditional}, &quot;&amp;state&quot;, &quot;state&quot;, &quot;thisObject&quot;);
</span><del>-                if (!$shouldPassByReference &amp;&amp; ($codeGenerator-&gt;IsWrapperType($idlType) || $codeGenerator-&gt;IsTypedArrayType($idlType))) {
</del><ins>+                if (!$shouldPassByReference &amp;&amp; ($codeGenerator-&gt;IsWrapperType($type) || $codeGenerator-&gt;IsTypedArrayType($type))) {
</ins><span class="cx">                     $implIncludes{&quot;&lt;runtime/Error.h&gt;&quot;} = 1;
</span><span class="cx">                     push(@implContent, &quot;    &quot; . GetNativeTypeFromSignature($interface, $attribute-&gt;signature) . &quot; nativeValue = nullptr;\n&quot;);
</span><span class="cx">                     push(@implContent, &quot;    if (!value.isUndefinedOrNull()) {\n&quot;);
</span><span class="lines">@@ -3578,7 +3567,7 @@
</span><span class="cx">                     push(@implContent, &quot;        nativeValue = $nativeValue;\n&quot;);
</span><span class="cx">                     push(@implContent, &quot;        RETURN_IF_EXCEPTION(throwScope, false);\n&quot;) if $mayThrowException;
</span><span class="cx">                     push(@implContent, &quot;        if (UNLIKELY(!nativeValue)) {\n&quot;);
</span><del>-                    push(@implContent, &quot;            throwAttributeTypeError(state, throwScope, \&quot;$visibleInterfaceName\&quot;, \&quot;$name\&quot;, \&quot;&quot; . $idlType-&gt;name . &quot;\&quot;);\n&quot;);
</del><ins>+                    push(@implContent, &quot;            throwAttributeTypeError(state, throwScope, \&quot;$visibleInterfaceName\&quot;, \&quot;$name\&quot;, \&quot;&quot; . $type-&gt;name . &quot;\&quot;);\n&quot;);
</ins><span class="cx">                     push(@implContent, &quot;            return false;\n&quot;);
</span><span class="cx">                     push(@implContent, &quot;        }\n&quot;);
</span><span class="cx">                     push(@implContent, &quot;    }\n&quot;);
</span><span class="lines">@@ -3587,7 +3576,7 @@
</span><span class="cx">                     push(@implContent, &quot;    RETURN_IF_EXCEPTION(throwScope, false);\n&quot;) if $mayThrowException;
</span><span class="cx">                 }
</span><span class="cx"> 
</span><del>-                if ($codeGenerator-&gt;IsEnumType($idlType)) {
</del><ins>+                if ($codeGenerator-&gt;IsEnumType($type)) {
</ins><span class="cx">                     push (@implContent, &quot;    if (UNLIKELY(!nativeValue))\n&quot;);
</span><span class="cx">                     push (@implContent, &quot;        return false;\n&quot;);
</span><span class="cx">                 }
</span><span class="lines">@@ -3594,7 +3583,7 @@
</span><span class="cx"> 
</span><span class="cx">                 if ($shouldPassByReference) {
</span><span class="cx">                     push(@implContent, &quot;    if (UNLIKELY(!nativeValue)) {\n&quot;);
</span><del>-                    push(@implContent, &quot;        throwAttributeTypeError(state, throwScope, \&quot;$visibleInterfaceName\&quot;, \&quot;$name\&quot;, \&quot;&quot; . $idlType-&gt;name . &quot;\&quot;);\n&quot;);
</del><ins>+                    push(@implContent, &quot;        throwAttributeTypeError(state, throwScope, \&quot;$visibleInterfaceName\&quot;, \&quot;$name\&quot;, \&quot;&quot; . $type-&gt;name . &quot;\&quot;);\n&quot;);
</ins><span class="cx">                     push(@implContent, &quot;        return false;\n&quot;);
</span><span class="cx">                     push(@implContent, &quot;    }\n&quot;);
</span><span class="cx">                 }
</span><span class="lines">@@ -3630,9 +3619,9 @@
</span><span class="cx">                 } else {
</span><span class="cx">                     my ($functionName, @arguments) = $codeGenerator-&gt;SetterExpression(\%implIncludes, $interfaceName, $attribute);
</span><span class="cx"> 
</span><del>-                    if ($codeGenerator-&gt;IsTypedArrayType($idlType) and not $idlType-&gt;name eq &quot;ArrayBuffer&quot;) {
</del><ins>+                    if ($codeGenerator-&gt;IsTypedArrayType($type) and not $type-&gt;name eq &quot;ArrayBuffer&quot;) {
</ins><span class="cx">                         push(@arguments, &quot;nativeValue.get()&quot;);
</span><del>-                    } elsif ($codeGenerator-&gt;IsEnumType($idlType)) {
</del><ins>+                    } elsif ($codeGenerator-&gt;IsEnumType($type)) {
</ins><span class="cx">                         push(@arguments, &quot;nativeValue.value()&quot;);
</span><span class="cx">                     } else {
</span><span class="cx">                         push(@arguments, $shouldPassByReference ? &quot;*nativeValue&quot; : &quot;WTFMove(nativeValue)&quot;);
</span><span class="lines">@@ -3721,7 +3710,7 @@
</span><span class="cx"> 
</span><span class="cx">             next if $isCustom &amp;&amp; $isOverloaded &amp;&amp; $function-&gt;{overloadIndex} &gt; 1;
</span><span class="cx"> 
</span><del>-            AddToImplIncludesForIDLType($function-&gt;signature-&gt;idlType) unless $isCustom or IsReturningPromise($function);
</del><ins>+            AddToImplIncludesForIDLType($function-&gt;signature-&gt;type) unless $isCustom or IsReturningPromise($function);
</ins><span class="cx"> 
</span><span class="cx">             my $functionName = GetFunctionName($interface, $className, $function);
</span><span class="cx"> 
</span><span class="lines">@@ -3920,7 +3909,7 @@
</span><span class="cx"> 
</span><span class="cx">     if ($indexedGetterFunction) {
</span><span class="cx">         # FIXME: Should this work for all string types.
</span><del>-        $implIncludes{&quot;URL.h&quot;} = 1 if $indexedGetterFunction-&gt;signature-&gt;idlType-&gt;name eq &quot;DOMString&quot;;
</del><ins>+        $implIncludes{&quot;URL.h&quot;} = 1 if $indexedGetterFunction-&gt;signature-&gt;type-&gt;name eq &quot;DOMString&quot;;
</ins><span class="cx">         if ($interfaceName =~ /^HTML\w*Collection$/ or $interfaceName eq &quot;RadioNodeList&quot;) {
</span><span class="cx">             $implIncludes{&quot;JSNode.h&quot;} = 1;
</span><span class="cx">             $implIncludes{&quot;Node.h&quot;} = 1;
</span><span class="lines">@@ -4100,7 +4089,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($interface, $className) = @_;
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">     my $serializerFunctionName = &quot;toJSON&quot;;
</span><span class="cx">     my $serializerNativeFunctionName = $codeGenerator-&gt;WK_lcfirst($className) . &quot;PrototypeFunction&quot; . $codeGenerator-&gt;WK_ucfirst($serializerFunctionName);
</span><span class="lines">@@ -4286,7 +4275,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($outputArray, $function, $interface, $functionImplementationName, $svgPropertyType, $svgPropertyOrListPropertyType, $svgListPropertyType) = @_;
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $visibleInterfaceName = $codeGenerator-&gt;GetVisibleInterfaceName($interface);
</span><span class="cx">     my @arguments;
</span><span class="cx">     my $functionName;
</span><span class="lines">@@ -4319,40 +4308,40 @@
</span><span class="cx"> 
</span><span class="cx">     my $argumentIndex = 0;
</span><span class="cx">     foreach my $parameter (@{$function-&gt;parameters}) {
</span><del>-        my $idlType = $parameter-&gt;idlType;
</del><ins>+        my $type = $parameter-&gt;type;
</ins><span class="cx"> 
</span><del>-        die &quot;Optional parameters of non-nullable wrapper types are not supported&quot; if $parameter-&gt;isOptional &amp;&amp; !$parameter-&gt;isNullable &amp;&amp; $codeGenerator-&gt;IsWrapperType($idlType);
</del><ins>+        die &quot;Optional parameters of non-nullable wrapper types are not supported&quot; if $parameter-&gt;isOptional &amp;&amp; !$type-&gt;isNullable &amp;&amp; $codeGenerator-&gt;IsWrapperType($type);
</ins><span class="cx">         die &quot;Optional parameters preceding variadic parameters are not supported&quot; if ($parameter-&gt;isOptional &amp;&amp;  @{$function-&gt;parameters}[$numParameters - 1]-&gt;isVariadic);
</span><span class="cx"> 
</span><span class="cx">         if ($parameter-&gt;isOptional &amp;&amp; !defined($parameter-&gt;default)) {
</span><span class="cx">             # As per Web IDL, optional dictionary parameters are always considered to have a default value of an empty dictionary, unless otherwise specified.
</span><del>-            $parameter-&gt;default(&quot;[]&quot;) if $idlType-&gt;name eq &quot;Dictionary&quot; or $codeGenerator-&gt;IsDictionaryType($idlType);
</del><ins>+            $parameter-&gt;default(&quot;[]&quot;) if $type-&gt;name eq &quot;Dictionary&quot; or $codeGenerator-&gt;IsDictionaryType($type);
</ins><span class="cx"> 
</span><span class="cx">             # We use undefined as default value for optional parameters of type 'any' unless specified otherwise.
</span><del>-            $parameter-&gt;default(&quot;undefined&quot;) if $idlType-&gt;name eq &quot;any&quot;;
</del><ins>+            $parameter-&gt;default(&quot;undefined&quot;) if $type-&gt;name eq &quot;any&quot;;
</ins><span class="cx"> 
</span><span class="cx">             # We use the null string as default value for parameters of type DOMString unless specified otherwise.
</span><del>-            $parameter-&gt;default(&quot;null&quot;) if $codeGenerator-&gt;IsStringType($idlType);
</del><ins>+            $parameter-&gt;default(&quot;null&quot;) if $codeGenerator-&gt;IsStringType($type);
</ins><span class="cx"> 
</span><span class="cx">             # As per Web IDL, passing undefined for a nullable parameter is treated as null. Therefore, use null as
</span><span class="cx">             # default value for nullable parameters unless otherwise specified.
</span><del>-            $parameter-&gt;default(&quot;null&quot;) if $parameter-&gt;isNullable;
</del><ins>+            $parameter-&gt;default(&quot;null&quot;) if $type-&gt;isNullable;
</ins><span class="cx"> 
</span><span class="cx">             # For callback parameters, the generated bindings treat undefined as null, so use null as implicit default value.
</span><del>-            $parameter-&gt;default(&quot;null&quot;) if $codeGenerator-&gt;IsCallbackInterface($idlType);
</del><ins>+            $parameter-&gt;default(&quot;null&quot;) if $codeGenerator-&gt;IsCallbackInterface($type);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         my $name = $parameter-&gt;name;
</span><span class="cx">         my $value = $name;
</span><span class="cx"> 
</span><del>-        if ($codeGenerator-&gt;IsCallbackInterface($idlType)) {
-            my $callbackClassName = GetCallbackClassName($idlType-&gt;name);
-            my $typeName = $idlType-&gt;name;
</del><ins>+        if ($codeGenerator-&gt;IsCallbackInterface($type)) {
+            my $callbackClassName = GetCallbackClassName($type-&gt;name);
+            my $typeName = $type-&gt;name;
</ins><span class="cx">             $implIncludes{&quot;$callbackClassName.h&quot;} = 1;
</span><span class="cx">             if ($parameter-&gt;isOptional) {
</span><span class="cx">                 push(@$outputArray, &quot;    RefPtr&lt;$typeName&gt; $name;\n&quot;);
</span><span class="cx">                 push(@$outputArray, &quot;    if (!state-&gt;argument($argumentIndex).isUndefinedOrNull()) {\n&quot;);
</span><del>-                if ($codeGenerator-&gt;IsFunctionOnlyCallbackInterface($idlType)) {
</del><ins>+                if ($codeGenerator-&gt;IsFunctionOnlyCallbackInterface($type)) {
</ins><span class="cx">                     push(@$outputArray, &quot;        if (!state-&gt;uncheckedArgument($argumentIndex).isFunction())\n&quot;);
</span><span class="cx">                 } else {
</span><span class="cx">                     push(@$outputArray, &quot;        if (!state-&gt;uncheckedArgument($argumentIndex).isObject())\n&quot;);
</span><span class="lines">@@ -4367,7 +4356,7 @@
</span><span class="cx">                 push(@$outputArray, &quot;    }\n&quot;);
</span><span class="cx">             } else {
</span><span class="cx">                 die &quot;CallbackInterface does not support Variadic parameter&quot; if $parameter-&gt;isVariadic;
</span><del>-                if ($codeGenerator-&gt;IsFunctionOnlyCallbackInterface($idlType)) {
</del><ins>+                if ($codeGenerator-&gt;IsFunctionOnlyCallbackInterface($type)) {
</ins><span class="cx">                     push(@$outputArray, &quot;    if (UNLIKELY(!state-&gt;uncheckedArgument($argumentIndex).isFunction()))\n&quot;);
</span><span class="cx">                 } else {
</span><span class="cx">                     push(@$outputArray, &quot;    if (UNLIKELY(!state-&gt;uncheckedArgument($argumentIndex).isObject()))\n&quot;);
</span><span class="lines">@@ -4383,16 +4372,16 @@
</span><span class="cx">             $value = &quot;WTFMove($name)&quot;;
</span><span class="cx">         } elsif ($parameter-&gt;isVariadic) {
</span><span class="cx">             $implIncludes{&quot;JSDOMConvert.h&quot;} = 1;
</span><del>-            AddToImplIncludesForIDLType($idlType, $function-&gt;signature-&gt;extendedAttributes-&gt;{Conditional});
</del><ins>+            AddToImplIncludesForIDLType($type, $function-&gt;signature-&gt;extendedAttributes-&gt;{Conditional});
</ins><span class="cx">         
</span><del>-            my $metaType = GetIDLType($interface, $idlType);
</del><ins>+            my $metaType = GetIDLType($interface, $type);
</ins><span class="cx">             push(@$outputArray, &quot;    auto $name = convertVariadicArguments&lt;$metaType&gt;(*state, $argumentIndex);\n&quot;);
</span><span class="cx">             push(@$outputArray, &quot;    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());\n&quot;);
</span><span class="cx"> 
</span><span class="cx">             $value = &quot;WTFMove($name.arguments.value())&quot;;
</span><span class="cx"> 
</span><del>-        } elsif ($codeGenerator-&gt;IsEnumType($idlType)) {
-            my $className = GetEnumerationClassName($idlType, $interface);
</del><ins>+        } elsif ($codeGenerator-&gt;IsEnumType($type)) {
+            my $className = GetEnumerationClassName($type, $interface);
</ins><span class="cx"> 
</span><span class="cx">             $implIncludes{&quot;&lt;runtime/Error.h&gt;&quot;} = 1;
</span><span class="cx"> 
</span><span class="lines">@@ -4424,7 +4413,7 @@
</span><span class="cx">                 $indent = &quot;    &quot;;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            $implIncludes{&quot;JS$className.h&quot;} = 1 if $codeGenerator-&gt;IsExternalEnumType($idlType);
</del><ins>+            $implIncludes{&quot;JS$className.h&quot;} = 1 if $codeGenerator-&gt;IsExternalEnumType($type);
</ins><span class="cx">             push(@$outputArray, &quot;$indent    $defineOptionalValue = parseEnumeration&lt;$className&gt;(*state, ${name}Value);\n&quot;);
</span><span class="cx">             push(@$outputArray, &quot;$indent    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());\n&quot;);
</span><span class="cx">             push(@$outputArray, &quot;$indent    if (UNLIKELY(!$optionalValue))\n&quot;);
</span><span class="lines">@@ -4436,13 +4425,13 @@
</span><span class="cx">             my $outer;
</span><span class="cx">             my $inner;
</span><span class="cx">             my $nativeType = GetNativeTypeFromSignature($interface, $parameter);
</span><del>-            my $isTearOff = $codeGenerator-&gt;IsSVGTypeNeedingTearOffForType($idlType) &amp;&amp; $interfaceName !~ /List$/;
</del><ins>+            my $isTearOff = $codeGenerator-&gt;IsSVGTypeNeedingTearOff($type) &amp;&amp; $interfaceName !~ /List$/;
</ins><span class="cx">             my $shouldPassByReference = $isTearOff || ShouldPassWrapperByReference($parameter, $interface);
</span><span class="cx"> 
</span><span class="cx">             die &quot;Variadic parameter is already handled here&quot; if $parameter-&gt;isVariadic;
</span><span class="cx">             my $argumentLookupMethod = $parameter-&gt;isOptional ? &quot;argument&quot; : &quot;uncheckedArgument&quot;;
</span><span class="cx"> 
</span><del>-            if (!$shouldPassByReference &amp;&amp; ($codeGenerator-&gt;IsWrapperType($idlType) || $codeGenerator-&gt;IsTypedArrayType($idlType))) {
</del><ins>+            if (!$shouldPassByReference &amp;&amp; ($codeGenerator-&gt;IsWrapperType($type) || $codeGenerator-&gt;IsTypedArrayType($type))) {
</ins><span class="cx">                 $implIncludes{&quot;&lt;runtime/Error.h&gt;&quot;} = 1;
</span><span class="cx">                 my $checkedArgument = &quot;state-&gt;$argumentLookupMethod($argumentIndex)&quot;;
</span><span class="cx">                 my $uncheckedArgument = &quot;state-&gt;uncheckedArgument($argumentIndex)&quot;;
</span><span class="lines">@@ -4452,15 +4441,15 @@
</span><span class="cx">                 push(@$outputArray, &quot;        $name = $nativeValue;\n&quot;);
</span><span class="cx">                 push(@$outputArray, &quot;        RETURN_IF_EXCEPTION(throwScope, encodedJSValue());\n&quot;) if $mayThrowException;
</span><span class="cx">                 push(@$outputArray, &quot;        if (UNLIKELY(!$name))\n&quot;);
</span><del>-                push(@$outputArray, &quot;            return throwArgumentTypeError(*state, throwScope, $argumentIndex, \&quot;$name\&quot;, \&quot;$visibleInterfaceName\&quot;, $quotedFunctionName, \&quot;&quot; . $idlType-&gt;name . &quot;\&quot;);\n&quot;);
</del><ins>+                push(@$outputArray, &quot;            return throwArgumentTypeError(*state, throwScope, $argumentIndex, \&quot;$name\&quot;, \&quot;$visibleInterfaceName\&quot;, $quotedFunctionName, \&quot;&quot; . $type-&gt;name . &quot;\&quot;);\n&quot;);
</ins><span class="cx">                 push(@$outputArray, &quot;    }\n&quot;);
</span><span class="cx">                 $value = &quot;WTFMove($name)&quot;;
</span><span class="cx">             } else {
</span><del>-                if ($parameter-&gt;isOptional &amp;&amp; defined($parameter-&gt;default) &amp;&amp; !WillConvertUndefinedToDefaultParameterValue($idlType, $parameter-&gt;default)) {
</del><ins>+                if ($parameter-&gt;isOptional &amp;&amp; defined($parameter-&gt;default) &amp;&amp; !WillConvertUndefinedToDefaultParameterValue($type, $parameter-&gt;default)) {
</ins><span class="cx">                     my $defaultValue = $parameter-&gt;default;
</span><span class="cx"> 
</span><span class="cx">                     # String-related optimizations.
</span><del>-                    if ($codeGenerator-&gt;IsStringType($idlType)) {
</del><ins>+                    if ($codeGenerator-&gt;IsStringType($type)) {
</ins><span class="cx">                         my $useAtomicString = $parameter-&gt;extendedAttributes-&gt;{AtomicString};
</span><span class="cx">                         if ($defaultValue eq &quot;null&quot;) {
</span><span class="cx">                             $defaultValue = $useAtomicString ? &quot;nullAtom&quot; : &quot;String()&quot;;
</span><span class="lines">@@ -4492,13 +4481,13 @@
</span><span class="cx"> 
</span><span class="cx">             if ($shouldPassByReference) {
</span><span class="cx">                 push(@$outputArray, &quot;    if (UNLIKELY(!$name))\n&quot;);
</span><del>-                push(@$outputArray, &quot;        return throwArgumentTypeError(*state, throwScope, $argumentIndex, \&quot;$name\&quot;, \&quot;$visibleInterfaceName\&quot;, $quotedFunctionName, \&quot;&quot; . $idlType-&gt;name . &quot;\&quot;);\n&quot;);
</del><ins>+                push(@$outputArray, &quot;        return throwArgumentTypeError(*state, throwScope, $argumentIndex, \&quot;$name\&quot;, \&quot;$visibleInterfaceName\&quot;, $quotedFunctionName, \&quot;&quot; . $type-&gt;name . &quot;\&quot;);\n&quot;);
</ins><span class="cx">                 $value = $isTearOff ? &quot;$name-&gt;propertyReference()&quot; : &quot;*$name&quot;;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            if ($codeGenerator-&gt;IsTypedArrayType($idlType) and $idlType-&gt;name ne &quot;ArrayBuffer&quot;) {
</del><ins>+            if ($codeGenerator-&gt;IsTypedArrayType($type) and $type-&gt;name ne &quot;ArrayBuffer&quot;) {
</ins><span class="cx">                $value = $shouldPassByReference ? &quot;$name.releaseNonNull()&quot; : &quot;WTFMove($name)&quot;;
</span><del>-            } elsif ($codeGenerator-&gt;IsDictionaryType($idlType)) {
</del><ins>+            } elsif ($codeGenerator-&gt;IsDictionaryType($type)) {
</ins><span class="cx">                 $value = &quot;WTFMove($name)&quot;;
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="lines">@@ -4509,7 +4498,7 @@
</span><span class="cx"> 
</span><span class="cx">     push @arguments, GenerateReturnParameters($function);
</span><span class="cx">     my $functionString = &quot;$functionName(&quot; . join(&quot;, &quot;, @arguments) . &quot;)&quot;;
</span><del>-    $functionString = &quot;propagateException(*state, throwScope, $functionString)&quot; if $function-&gt;signature-&gt;idlType &amp;&amp; $function-&gt;signature-&gt;idlType-&gt;name eq &quot;void&quot; &amp;&amp; $function-&gt;signature-&gt;extendedAttributes-&gt;{MayThrowException};
</del><ins>+    $functionString = &quot;propagateException(*state, throwScope, $functionString)&quot; if $function-&gt;signature-&gt;type &amp;&amp; $function-&gt;signature-&gt;type-&gt;name eq &quot;void&quot; &amp;&amp; $function-&gt;signature-&gt;extendedAttributes-&gt;{MayThrowException};
</ins><span class="cx"> 
</span><span class="cx">     return ($functionString, scalar @arguments);
</span><span class="cx"> }
</span><span class="lines">@@ -4578,7 +4567,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($object, $interface, $enumerations, $dictionaries) = @_;
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $className = &quot;JS$interfaceName&quot;;
</span><span class="cx"> 
</span><span class="cx">     # - Add default header template and header protection
</span><span class="lines">@@ -4616,9 +4605,9 @@
</span><span class="cx">         foreach my $function (@{$interface-&gt;functions}) {
</span><span class="cx">             my @arguments = ();
</span><span class="cx">             foreach my $parameter (@{$function-&gt;parameters}) {
</span><del>-                push(@arguments, GetNativeTypeForCallbacks($interface, $parameter-&gt;idlType) . &quot; &quot; . $parameter-&gt;name);
</del><ins>+                push(@arguments, GetNativeTypeForCallbacks($interface, $parameter-&gt;type) . &quot; &quot; . $parameter-&gt;name);
</ins><span class="cx">             }
</span><del>-            push(@headerContent, &quot;    virtual &quot; . GetNativeTypeForCallbacks($interface, $function-&gt;signature-&gt;idlType) . &quot; &quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . join(&quot;, &quot;, @arguments) . &quot;);\n&quot;);
</del><ins>+            push(@headerContent, &quot;    virtual &quot; . GetNativeTypeForCallbacks($interface, $function-&gt;signature-&gt;type) . &quot; &quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . join(&quot;, &quot;, @arguments) . &quot;);\n&quot;);
</ins><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -4648,7 +4637,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($object, $interface, $enumerations, $dictionaries) = @_;
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $visibleInterfaceName = $codeGenerator-&gt;GetVisibleInterfaceName($interface);
</span><span class="cx">     my $className = &quot;JS$interfaceName&quot;;
</span><span class="cx"> 
</span><span class="lines">@@ -4748,20 +4737,20 @@
</span><span class="cx">         push(@implContent, &quot;\n// Functions\n&quot;);
</span><span class="cx">         foreach my $function (@{$interface-&gt;functions}) {
</span><span class="cx">             my @params = @{$function-&gt;parameters};
</span><del>-            if ($function-&gt;signature-&gt;extendedAttributes-&gt;{Custom} || GetNativeType($interface, $function-&gt;signature-&gt;idlType) ne &quot;bool&quot;) {
</del><ins>+            if ($function-&gt;signature-&gt;extendedAttributes-&gt;{Custom} || GetNativeType($interface, $function-&gt;signature-&gt;type) ne &quot;bool&quot;) {
</ins><span class="cx">                 next;
</span><span class="cx">             }
</span><span class="cx"> 
</span><del>-            AddToImplIncludesForIDLType($function-&gt;signature-&gt;idlType);
</del><ins>+            AddToImplIncludesForIDLType($function-&gt;signature-&gt;type);
</ins><span class="cx">             my $functionName = $function-&gt;signature-&gt;name;
</span><del>-            push(@implContent, &quot;\n&quot; . GetNativeTypeForCallbacks($interface, $function-&gt;signature-&gt;idlType) . &quot; ${className}::${functionName}(&quot;);
</del><ins>+            push(@implContent, &quot;\n&quot; . GetNativeTypeForCallbacks($interface, $function-&gt;signature-&gt;type) . &quot; ${className}::${functionName}(&quot;);
</ins><span class="cx"> 
</span><span class="cx">             my @args = ();
</span><span class="cx">             my @argsCheck = ();
</span><span class="cx">             foreach my $param (@params) {
</span><span class="cx">                 my $paramName = $param-&gt;name;
</span><del>-                AddToImplIncludesForIDLType($param-&gt;idlType, 1);
-                push(@args, GetNativeTypeForCallbacks($interface, $param-&gt;idlType) . &quot; &quot; . $paramName);
</del><ins>+                AddToImplIncludesForIDLType($param-&gt;type, 1);
+                push(@args, GetNativeTypeForCallbacks($interface, $param-&gt;type) . &quot; &quot; . $paramName);
</ins><span class="cx">             }
</span><span class="cx">             push(@implContent, join(&quot;, &quot;, @args));
</span><span class="cx">             push(@implContent, &quot;)\n&quot;);
</span><span class="lines">@@ -4829,7 +4818,7 @@
</span><span class="cx">     my $nondeterministic = $function-&gt;signature-&gt;extendedAttributes-&gt;{Nondeterministic};
</span><span class="cx">     my $mayThrowLegacyException = $function-&gt;signature-&gt;extendedAttributes-&gt;{MayThrowLegacyException};
</span><span class="cx"> 
</span><del>-    if ($function-&gt;signature-&gt;idlType-&gt;name eq &quot;void&quot; || IsReturningPromise($function)) {
</del><ins>+    if ($function-&gt;signature-&gt;type-&gt;name eq &quot;void&quot; || IsReturningPromise($function)) {
</ins><span class="cx">         if ($nondeterministic) {
</span><span class="cx">             AddToImplIncludes(&quot;&lt;replay/InputCursor.h&gt;&quot;, &quot;WEB_REPLAY&quot;);
</span><span class="cx">             push(@implContent, &quot;#if ENABLE(WEB_REPLAY)\n&quot;);
</span><span class="lines">@@ -4865,8 +4854,8 @@
</span><span class="cx">             AddToImplIncludes(&quot;&lt;wtf/NeverDestroyed.h&gt;&quot;, &quot;WEB_REPLAY&quot;);
</span><span class="cx"> 
</span><span class="cx">             my $nativeType = GetNativeTypeFromSignature($interface, $function-&gt;signature);
</span><del>-            my $memoizedType = GetNativeTypeForMemoization($interface, $function-&gt;signature-&gt;idlType);
-            my $bindingName = $interface-&gt;name . &quot;.&quot; . $function-&gt;signature-&gt;name;
</del><ins>+            my $memoizedType = GetNativeTypeForMemoization($interface, $function-&gt;signature-&gt;type);
+            my $bindingName = $interface-&gt;type-&gt;name . &quot;.&quot; . $function-&gt;signature-&gt;name;
</ins><span class="cx">             push(@implContent, $indent . &quot;JSValue result;\n&quot;);
</span><span class="cx">             push(@implContent, &quot;#if ENABLE(WEB_REPLAY)\n&quot;);
</span><span class="cx">             push(@implContent, $indent . &quot;InputCursor&amp; cursor = state-&gt;lexicalGlobalObject()-&gt;inputCursor();\n&quot;);
</span><span class="lines">@@ -4926,7 +4915,7 @@
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $className = &quot;JS$interfaceName&quot;;
</span><span class="cx">     my $visibleInterfaceName = $codeGenerator-&gt;GetVisibleInterfaceName($interface);
</span><span class="cx"> 
</span><span class="lines">@@ -4939,8 +4928,8 @@
</span><span class="cx"> 
</span><span class="cx">     my $iteratorTraitsName = &quot;${interfaceName}IteratorTraits&quot;;
</span><span class="cx">     my $iteratorTraitsType = $interface-&gt;iterable-&gt;isKeyValue ? &quot;JSDOMIteratorType::Map&quot; : &quot;JSDOMIteratorType::Set&quot;;
</span><del>-    my $iteratorTraitsKeyType = $interface-&gt;iterable-&gt;isKeyValue ? GetIDLType($interface, $interface-&gt;iterable-&gt;idlKeyType) : &quot;void&quot;;
-    my $iteratorTraitsValueType = GetIDLType($interface, $interface-&gt;iterable-&gt;idlValueType);
</del><ins>+    my $iteratorTraitsKeyType = $interface-&gt;iterable-&gt;isKeyValue ? GetIDLType($interface, $interface-&gt;iterable-&gt;keyType) : &quot;void&quot;;
+    my $iteratorTraitsValueType = GetIDLType($interface, $interface-&gt;iterable-&gt;valueType);
</ins><span class="cx"> 
</span><span class="cx">     push(@implContent,  &lt;&lt;END);
</span><span class="cx"> struct ${iteratorTraitsName} {
</span><span class="lines">@@ -5020,7 +5009,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($interface, $signature) = @_;
</span><span class="cx"> 
</span><del>-    return GetNativeType($interface, $signature-&gt;idlType);
</del><ins>+    return GetNativeType($interface, $signature-&gt;type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> my %nativeType = (
</span><span class="lines">@@ -5110,7 +5099,7 @@
</span><span class="cx"> 
</span><span class="cx"> sub GetBaseIDLType
</span><span class="cx"> {
</span><del>-    my ($interface, $idlType) = @_;
</del><ins>+    my ($interface, $type) = @_;
</ins><span class="cx"> 
</span><span class="cx">     my %IDLTypes = (
</span><span class="cx">         &quot;any&quot; =&gt; &quot;IDLAny&quot;,
</span><span class="lines">@@ -5136,21 +5125,21 @@
</span><span class="cx">         &quot;BufferSource&quot; =&gt; &quot;IDLBufferSource&quot;,
</span><span class="cx">     );
</span><span class="cx"> 
</span><del>-    return $IDLTypes{$idlType-&gt;name} if exists $IDLTypes{$idlType-&gt;name};
-    return &quot;IDLEnumeration&lt;&quot; . GetEnumerationClassName($idlType, $interface) . &quot;&gt;&quot; if $codeGenerator-&gt;IsEnumType($idlType);
-    return &quot;IDLDictionary&lt;&quot; . GetDictionaryClassName($idlType, $interface) . &quot;&gt;&quot; if $codeGenerator-&gt;IsDictionaryType($idlType);
-    return &quot;IDLSequence&lt;&quot; . GetIDLType($interface, @{$idlType-&gt;subtypes}[0]) . &quot;&gt;&quot; if $codeGenerator-&gt;IsSequenceType($idlType);
-    return &quot;IDLFrozenArray&lt;&quot; . GetIDLType($interface, @{$idlType-&gt;subtypes}[0]) . &quot;&gt;&quot; if $codeGenerator-&gt;IsFrozenArrayType($idlType);
-    return &quot;IDLUnion&lt;&quot; . join(&quot;, &quot;, GetIDLUnionMemberTypes($interface, $idlType)) . &quot;&gt;&quot; if $idlType-&gt;isUnion;
-    return &quot;IDLInterface&lt;&quot; . $idlType-&gt;name . &quot;&gt;&quot;;
</del><ins>+    return $IDLTypes{$type-&gt;name} if exists $IDLTypes{$type-&gt;name};
+    return &quot;IDLEnumeration&lt;&quot; . GetEnumerationClassName($type, $interface) . &quot;&gt;&quot; if $codeGenerator-&gt;IsEnumType($type);
+    return &quot;IDLDictionary&lt;&quot; . GetDictionaryClassName($type, $interface) . &quot;&gt;&quot; if $codeGenerator-&gt;IsDictionaryType($type);
+    return &quot;IDLSequence&lt;&quot; . GetIDLType($interface, @{$type-&gt;subtypes}[0]) . &quot;&gt;&quot; if $codeGenerator-&gt;IsSequenceType($type);
+    return &quot;IDLFrozenArray&lt;&quot; . GetIDLType($interface, @{$type-&gt;subtypes}[0]) . &quot;&gt;&quot; if $codeGenerator-&gt;IsFrozenArrayType($type);
+    return &quot;IDLUnion&lt;&quot; . join(&quot;, &quot;, GetIDLUnionMemberTypes($interface, $type)) . &quot;&gt;&quot; if $type-&gt;isUnion;
+    return &quot;IDLInterface&lt;&quot; . $type-&gt;name . &quot;&gt;&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GetIDLType
</span><span class="cx"> {
</span><del>-    my ($interface, $idlType) = @_;
</del><ins>+    my ($interface, $type) = @_;
</ins><span class="cx"> 
</span><del>-    my $baseIDLType = GetBaseIDLType($interface, $idlType);
-    return &quot;IDLNullable&lt;&quot; . $baseIDLType . &quot;&gt;&quot; if $idlType-&gt;isNullable;
</del><ins>+    my $baseIDLType = GetBaseIDLType($interface, $type);
+    return &quot;IDLNullable&lt;&quot; . $baseIDLType . &quot;&gt;&quot; if $type-&gt;isNullable;
</ins><span class="cx">     return $baseIDLType;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5168,7 +5157,7 @@
</span><span class="cx">     return GetDictionaryClassName($type, $interface) if $codeGenerator-&gt;IsDictionaryType($type);
</span><span class="cx">     return GetNativeVectorType($type) if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($type);
</span><span class="cx"> 
</span><del>-    my $tearOffType = $codeGenerator-&gt;GetSVGTypeNeedingTearOffForType($type);
</del><ins>+    my $tearOffType = $codeGenerator-&gt;GetSVGTypeNeedingTearOff($type);
</ins><span class="cx">     return &quot;${tearOffType}*&quot; if $tearOffType;
</span><span class="cx"> 
</span><span class="cx">     return &quot;RefPtr&lt;${typeName}&gt;&quot; if $codeGenerator-&gt;IsTypedArrayType($type) and $typeName ne &quot;ArrayBuffer&quot;;
</span><span class="lines">@@ -5179,7 +5168,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($parameter, $interface) = @_;
</span><span class="cx"> 
</span><del>-    my $nativeType = GetNativeType($interface, $parameter-&gt;idlType);
</del><ins>+    my $nativeType = GetNativeType($interface, $parameter-&gt;type);
</ins><span class="cx">     return $codeGenerator-&gt;ShouldPassWrapperByReference($parameter, $interface) &amp;&amp; (substr($nativeType, -1) eq '*' || $nativeType =~ /^RefPtr/);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5213,7 +5202,7 @@
</span><span class="cx"> {
</span><span class="cx">     my $interface = shift;
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">     my $svgPropertyType;
</span><span class="cx">     my $svgListPropertyType;
</span><span class="lines">@@ -5221,10 +5210,10 @@
</span><span class="cx"> 
</span><span class="cx">     return ($svgPropertyType, $svgListPropertyType, $svgNativeType) if not $interfaceName =~ /SVG/;
</span><span class="cx"> 
</span><del>-    $svgNativeType = $codeGenerator-&gt;GetSVGTypeNeedingTearOffForType($interface-&gt;type);
</del><ins>+    $svgNativeType = $codeGenerator-&gt;GetSVGTypeNeedingTearOff($interface-&gt;type);
</ins><span class="cx">     return ($svgPropertyType, $svgListPropertyType, $svgNativeType) if not $svgNativeType;
</span><span class="cx"> 
</span><del>-    my $svgWrappedNativeType = $codeGenerator-&gt;GetSVGWrappedTypeNeedingTearOffForType($interface-&gt;type);
</del><ins>+    my $svgWrappedNativeType = $codeGenerator-&gt;GetSVGWrappedTypeNeedingTearOff($interface-&gt;type);
</ins><span class="cx">     if ($svgNativeType =~ /SVGPropertyTearOff/) {
</span><span class="cx">         $svgPropertyType = $svgWrappedNativeType;
</span><span class="cx">         $headerIncludes{&quot;$svgWrappedNativeType.h&quot;} = 1;
</span><span class="lines">@@ -5274,20 +5263,20 @@
</span><span class="cx"> 
</span><span class="cx"> sub JSValueToNativeIsHandledByDOMConvert
</span><span class="cx"> {
</span><del>-    my ($idlType, $signature) = @_;
</del><ins>+    my ($type, $signature) = @_;
</ins><span class="cx"> 
</span><del>-    return 0 if $idlType-&gt;name eq &quot;DOMString&quot; &amp;&amp; ($signature-&gt;extendedAttributes-&gt;{RequiresExistingAtomicString} || $signature-&gt;extendedAttributes-&gt;{AtomicString});
</del><ins>+    return 0 if $type-&gt;name eq &quot;DOMString&quot; &amp;&amp; ($signature-&gt;extendedAttributes-&gt;{RequiresExistingAtomicString} || $signature-&gt;extendedAttributes-&gt;{AtomicString});
</ins><span class="cx"> 
</span><del>-    return 1 if $idlType-&gt;isUnion;
-    return 1 if $idlType-&gt;name eq &quot;any&quot;;
-    return 1 if $idlType-&gt;name eq &quot;boolean&quot;;
-    return 1 if $idlType-&gt;name eq &quot;Date&quot;;
-    return 1 if $idlType-&gt;name eq &quot;BufferSource&quot;;
-    return 1 if $codeGenerator-&gt;IsIntegerType($idlType);
-    return 1 if $codeGenerator-&gt;IsFloatingPointType($idlType);
-    return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($idlType);
-    return 1 if $codeGenerator-&gt;IsDictionaryType($idlType);
-    return 1 if $codeGenerator-&gt;IsStringType($idlType);
</del><ins>+    return 1 if $type-&gt;isUnion;
+    return 1 if $type-&gt;name eq &quot;any&quot;;
+    return 1 if $type-&gt;name eq &quot;boolean&quot;;
+    return 1 if $type-&gt;name eq &quot;Date&quot;;
+    return 1 if $type-&gt;name eq &quot;BufferSource&quot;;
+    return 1 if $codeGenerator-&gt;IsIntegerType($type);
+    return 1 if $codeGenerator-&gt;IsFloatingPointType($type);
+    return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($type);
+    return 1 if $codeGenerator-&gt;IsDictionaryType($type);
+    return 1 if $codeGenerator-&gt;IsStringType($type);
</ins><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -5297,7 +5286,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($interface, $signature, $value, $conditional, $statePointer, $stateReference, $thisObjectReference) = @_;
</span><span class="cx"> 
</span><del>-    my $idlType = $signature-&gt;idlType;
</del><ins>+    my $type = $signature-&gt;type;
</ins><span class="cx"> 
</span><span class="cx">     # FIXME: Remove these 3 variables when all JSValueToNative use references.
</span><span class="cx">     $statePointer = &quot;state&quot; unless $statePointer;
</span><span class="lines">@@ -5304,63 +5293,63 @@
</span><span class="cx">     $stateReference = &quot;*state&quot; unless $stateReference;
</span><span class="cx">     $thisObjectReference = &quot;*castedThis&quot; unless $thisObjectReference;
</span><span class="cx"> 
</span><del>-    if (JSValueToNativeIsHandledByDOMConvert($idlType, $signature)) {
</del><ins>+    if (JSValueToNativeIsHandledByDOMConvert($type, $signature)) {
</ins><span class="cx">         AddToImplIncludes(&quot;JSDOMConvert.h&quot;);
</span><del>-        AddToImplIncludesForIDLType($idlType, $conditional);
</del><ins>+        AddToImplIncludesForIDLType($type, $conditional);
</ins><span class="cx"> 
</span><del>-        my $IDLType = GetIDLType($interface, $idlType);
</del><ins>+        my $IDLType = GetIDLType($interface, $type);
</ins><span class="cx"> 
</span><span class="cx">         my @conversionArguments = ();
</span><span class="cx">         push(@conversionArguments, &quot;$stateReference&quot;);
</span><span class="cx">         push(@conversionArguments, &quot;$value&quot;);
</span><del>-        push(@conversionArguments, GetIntegerConversionConfiguration($signature)) if $codeGenerator-&gt;IsIntegerType($idlType);
-        push(@conversionArguments, GetStringConversionConfiguration($signature)) if $codeGenerator-&gt;IsStringType($idlType);
</del><ins>+        push(@conversionArguments, GetIntegerConversionConfiguration($signature)) if $codeGenerator-&gt;IsIntegerType($type);
+        push(@conversionArguments, GetStringConversionConfiguration($signature)) if $codeGenerator-&gt;IsStringType($type);
</ins><span class="cx"> 
</span><span class="cx">         return (&quot;convert&lt;$IDLType&gt;(&quot; . join(&quot;, &quot;, @conversionArguments) . &quot;)&quot;, 1);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($idlType-&gt;name eq &quot;DOMString&quot;) {
</del><ins>+    if ($type-&gt;name eq &quot;DOMString&quot;) {
</ins><span class="cx">         return (&quot;AtomicString($value.toString($statePointer)-&gt;toExistingAtomicString($statePointer))&quot;, 1) if $signature-&gt;extendedAttributes-&gt;{RequiresExistingAtomicString};
</span><span class="cx">         return (&quot;$value.toString($statePointer)-&gt;toAtomicString($statePointer)&quot;, 1) if $signature-&gt;extendedAttributes-&gt;{AtomicString};
</span><span class="cx">         assert(&quot;Unhandled string conversion.&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($idlType-&gt;name eq &quot;SerializedScriptValue&quot;) {
</del><ins>+    if ($type-&gt;name eq &quot;SerializedScriptValue&quot;) {
</ins><span class="cx">         AddToImplIncludes(&quot;SerializedScriptValue.h&quot;, $conditional);
</span><span class="cx">         return (&quot;SerializedScriptValue::create($stateReference, $value)&quot;, 1);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($idlType-&gt;name eq &quot;Dictionary&quot;) {
</del><ins>+    if ($type-&gt;name eq &quot;Dictionary&quot;) {
</ins><span class="cx">         AddToImplIncludes(&quot;Dictionary.h&quot;, $conditional);
</span><span class="cx">         return (&quot;Dictionary($statePointer, $value)&quot;, 0);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    AddToImplIncludesForIDLType($idlType, $conditional);
</del><ins>+    AddToImplIncludesForIDLType($type, $conditional);
</ins><span class="cx"> 
</span><del>-    return (&quot;to@{[$idlType-&gt;name]}($value)&quot;, 1) if $codeGenerator-&gt;IsTypedArrayType($idlType);
-    return (&quot;parseEnumeration&lt;&quot; . GetEnumerationClassName($idlType, $interface) . &quot;&gt;($stateReference, $value)&quot;, 1) if $codeGenerator-&gt;IsEnumType($idlType);
</del><ins>+    return (&quot;to@{[$type-&gt;name]}($value)&quot;, 1) if $codeGenerator-&gt;IsTypedArrayType($type);
+    return (&quot;parseEnumeration&lt;&quot; . GetEnumerationClassName($type, $interface) . &quot;&gt;($stateReference, $value)&quot;, 1) if $codeGenerator-&gt;IsEnumType($type);
</ins><span class="cx"> 
</span><span class="cx">     # FIXME: EventListener should be a callback interface.
</span><del>-    return &quot;JSEventListener::create($value, $thisObjectReference, false, currentWorld($statePointer))&quot; if $idlType-&gt;name eq &quot;EventListener&quot;;
</del><ins>+    return &quot;JSEventListener::create($value, $thisObjectReference, false, currentWorld($statePointer))&quot; if $type-&gt;name eq &quot;EventListener&quot;;
</ins><span class="cx"> 
</span><del>-    my $extendedAttributes = $codeGenerator-&gt;GetInterfaceExtendedAttributesFromName($idlType-&gt;name);
-    return (&quot;JS&quot; . $idlType-&gt;name . &quot;::toWrapped($stateReference, $value)&quot;, 1) if $idlType-&gt;name eq &quot;XPathNSResolver&quot;;
-    return (&quot;JS&quot; . $idlType-&gt;name . &quot;::toWrapped($value)&quot;, 0);
</del><ins>+    my $extendedAttributes = $codeGenerator-&gt;GetInterfaceExtendedAttributesFromName($type-&gt;name);
+    return (&quot;JS&quot; . $type-&gt;name . &quot;::toWrapped($stateReference, $value)&quot;, 1) if $type-&gt;name eq &quot;XPathNSResolver&quot;;
+    return (&quot;JS&quot; . $type-&gt;name . &quot;::toWrapped($value)&quot;, 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub NativeToJSValueIsHandledByDOMConvert
</span><span class="cx"> {
</span><del>-    my ($idlType) = @_;
</del><ins>+    my ($type) = @_;
</ins><span class="cx">     
</span><del>-    return 1 if $idlType-&gt;name eq &quot;any&quot;;
-    return 1 if $idlType-&gt;name eq &quot;boolean&quot;;
-    return 1 if $idlType-&gt;name eq &quot;Date&quot;;
-    return 1 if $codeGenerator-&gt;IsIntegerType($idlType);
-    return 1 if $codeGenerator-&gt;IsFloatingPointType($idlType);
-    return 1 if $codeGenerator-&gt;IsStringType($idlType);
-    return 1 if $codeGenerator-&gt;IsEnumType($idlType);
-    return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($idlType);
-    return 1 if $idlType-&gt;isUnion;
</del><ins>+    return 1 if $type-&gt;name eq &quot;any&quot;;
+    return 1 if $type-&gt;name eq &quot;boolean&quot;;
+    return 1 if $type-&gt;name eq &quot;Date&quot;;
+    return 1 if $codeGenerator-&gt;IsIntegerType($type);
+    return 1 if $codeGenerator-&gt;IsFloatingPointType($type);
+    return 1 if $codeGenerator-&gt;IsStringType($type);
+    return 1 if $codeGenerator-&gt;IsEnumType($type);
+    return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($type);
+    return 1 if $type-&gt;isUnion;
</ins><span class="cx"> 
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -5367,14 +5356,14 @@
</span><span class="cx"> 
</span><span class="cx"> sub NativeToJSValueDOMConvertNeedsState
</span><span class="cx"> {
</span><del>-    my ($idlType) = @_;
</del><ins>+    my ($type) = @_;
</ins><span class="cx">     
</span><span class="cx">     # FIXME: This should actually check if all the sub-objects of the union need the state.
</span><del>-    return 1 if $idlType-&gt;isUnion;
-    return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($idlType);
-    return 1 if $codeGenerator-&gt;IsStringType($idlType);
-    return 1 if $codeGenerator-&gt;IsEnumType($idlType);
-    return 1 if $idlType-&gt;name eq &quot;Date&quot;;
</del><ins>+    return 1 if $type-&gt;isUnion;
+    return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($type);
+    return 1 if $codeGenerator-&gt;IsStringType($type);
+    return 1 if $codeGenerator-&gt;IsEnumType($type);
+    return 1 if $type-&gt;name eq &quot;Date&quot;;
</ins><span class="cx"> 
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -5381,11 +5370,11 @@
</span><span class="cx"> 
</span><span class="cx"> sub NativeToJSValueDOMConvertNeedsGlobalObject
</span><span class="cx"> {
</span><del>-    my ($idlType) = @_;
</del><ins>+    my ($type) = @_;
</ins><span class="cx">     
</span><span class="cx">     # FIXME: This should actually check if all the sub-objects of the union need the global object.
</span><del>-    return 1 if $idlType-&gt;isUnion;
-    return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($idlType);
</del><ins>+    return 1 if $type-&gt;isUnion;
+    return 1 if $codeGenerator-&gt;IsSequenceOrFrozenArrayType($type);
</ins><span class="cx"> 
</span><span class="cx">     return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -5418,18 +5407,17 @@
</span><span class="cx">     my ($signature, $inFunctionCall, $interface, $value, $statePointer, $stateReference, $wrapped, $globalObject) = @_;
</span><span class="cx"> 
</span><span class="cx">     my $conditional = $signature-&gt;extendedAttributes-&gt;{Conditional};
</span><del>-    my $idlType = $signature-&gt;idlType;
-    my $isNullable = $signature-&gt;isNullable;
</del><ins>+    my $type = $signature-&gt;type;
</ins><span class="cx">     my $mayThrowException = $signature-&gt;extendedAttributes-&gt;{GetterMayThrowException} || $signature-&gt;extendedAttributes-&gt;{MayThrowException};
</span><span class="cx"> 
</span><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><del>-    if ($signature-&gt;extendedAttributes-&gt;{Reflect} and ($idlType-&gt;name eq &quot;unsigned long&quot; or $idlType-&gt;name eq &quot;unsigned short&quot;)) {
</del><ins>+    if ($signature-&gt;extendedAttributes-&gt;{Reflect} and ($type-&gt;name eq &quot;unsigned long&quot; or $type-&gt;name eq &quot;unsigned short&quot;)) {
</ins><span class="cx">         $value =~ s/getUnsignedIntegralAttribute/getIntegralAttribute/g;
</span><span class="cx">         $value = &quot;std::max(0, $value)&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($idlType-&gt;name eq &quot;any&quot;) {
</del><ins>+    if ($type-&gt;name eq &quot;any&quot;) {
</ins><span class="cx">         my $returnType = $signature-&gt;extendedAttributes-&gt;{ImplementationReturnType};
</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="lines">@@ -5437,15 +5425,15 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (NativeToJSValueIsHandledByDOMConvert($idlType)) {
</del><ins>+    if (NativeToJSValueIsHandledByDOMConvert($type)) {
</ins><span class="cx">         AddToImplIncludes(&quot;JSDOMConvert.h&quot;);
</span><del>-        AddToImplIncludesForIDLType($idlType, $conditional);
</del><ins>+        AddToImplIncludesForIDLType($type, $conditional);
</ins><span class="cx"> 
</span><del>-        my $IDLType = GetIDLType($interface, $idlType);
</del><ins>+        my $IDLType = GetIDLType($interface, $type);
</ins><span class="cx"> 
</span><span class="cx">         my @conversionArguments = ();
</span><del>-        push(@conversionArguments, &quot;$stateReference&quot;) if NativeToJSValueDOMConvertNeedsState($idlType) || $mayThrowException;
-        push(@conversionArguments, &quot;*$globalObject&quot;) if NativeToJSValueDOMConvertNeedsGlobalObject($idlType);
</del><ins>+        push(@conversionArguments, &quot;$stateReference&quot;) if NativeToJSValueDOMConvertNeedsState($type) || $mayThrowException;
+        push(@conversionArguments, &quot;*$globalObject&quot;) if NativeToJSValueDOMConvertNeedsGlobalObject($type);
</ins><span class="cx">         push(@conversionArguments, &quot;throwScope&quot;) if $mayThrowException;
</span><span class="cx">         push(@conversionArguments, &quot;$value&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -5452,33 +5440,31 @@
</span><span class="cx">         return &quot;toJS&lt;$IDLType&gt;(&quot; . join(&quot;, &quot;, @conversionArguments) . &quot;)&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if ($idlType-&gt;name eq &quot;SerializedScriptValue&quot;) {
</del><ins>+    if ($type-&gt;name eq &quot;SerializedScriptValue&quot;) {
</ins><span class="cx">         AddToImplIncludes(&quot;SerializedScriptValue.h&quot;, $conditional);
</span><span class="cx">         return &quot;$value ? $value-&gt;deserialize($stateReference, $globalObject) : jsNull()&quot;;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    AddToImplIncludes(&quot;StyleProperties.h&quot;, $conditional) if $idlType-&gt;name eq &quot;CSSStyleDeclaration&quot;;
-    AddToImplIncludes(&quot;NameNodeList.h&quot;, $conditional) if $idlType-&gt;name eq &quot;NodeList&quot;;
-    AddToImplIncludes(&quot;JS&quot; . $idlType-&gt;name . &quot;.h&quot;, $conditional) if !$codeGenerator-&gt;IsTypedArrayType($idlType);
</del><ins>+    AddToImplIncludesForIDLType($type, $conditional);
</ins><span class="cx"> 
</span><del>-    return $value if $codeGenerator-&gt;IsSVGAnimatedType($idlType);
</del><ins>+    return $value if $codeGenerator-&gt;IsSVGAnimatedType($type);
</ins><span class="cx"> 
</span><del>-    if ($codeGenerator-&gt;IsSVGAnimatedType($interface-&gt;type) or ($interface-&gt;name eq &quot;SVGViewSpec&quot; and $idlType-&gt;name eq &quot;SVGTransformList&quot;)) {
</del><ins>+    if ($codeGenerator-&gt;IsSVGAnimatedType($interface-&gt;type) or ($interface-&gt;type-&gt;name eq &quot;SVGViewSpec&quot; and $type-&gt;name eq &quot;SVGTransformList&quot;)) {
</ins><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($interface, $idlType) . &quot;&gt;($value.get())&quot;;
-    } elsif ($interface-&gt;name eq &quot;SVGViewSpec&quot;) {
</del><ins>+        $value = &quot;static_cast&lt;&quot; . GetNativeType($interface, $type) . &quot;&gt;($value.get())&quot;;
+    } elsif ($interface-&gt;type-&gt;name eq &quot;SVGViewSpec&quot;) {
</ins><span class="cx">         # Convert from abstract SVGProperty to real type, so the right toJS() method can be invoked.
</span><del>-        $value = &quot;static_cast&lt;&quot; . GetNativeType($interface, $idlType) . &quot;&gt;($value)&quot;;
-    } elsif ($codeGenerator-&gt;IsSVGTypeNeedingTearOffForType($idlType) and not $interface-&gt;type-&gt;name =~ /List$/) {
-        my $tearOffType = $codeGenerator-&gt;GetSVGTypeNeedingTearOffForType($idlType);
-        if ($codeGenerator-&gt;IsSVGTypeWithWritablePropertiesNeedingTearOffForType($idlType) and !$inFunctionCall and not defined $signature-&gt;extendedAttributes-&gt;{Immutable}) {
</del><ins>+        $value = &quot;static_cast&lt;&quot; . GetNativeType($interface, $type) . &quot;&gt;($value)&quot;;
+    } elsif ($codeGenerator-&gt;IsSVGTypeNeedingTearOff($type) and not $interface-&gt;type-&gt;name =~ /List$/) {
+        my $tearOffType = $codeGenerator-&gt;GetSVGTypeNeedingTearOff($type);
+        if ($codeGenerator-&gt;IsSVGTypeWithWritablePropertiesNeedingTearOff($type) and !$inFunctionCall and not defined $signature-&gt;extendedAttributes-&gt;{Immutable}) {
</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="cx">             $getter =~ s/\(\)//;
</span><del>-            my $updateMethod = &quot;&amp;&quot; . $interface-&gt;name . &quot;::update&quot; . $codeGenerator-&gt;WK_ucfirst($getter);
</del><ins>+            my $updateMethod = &quot;&amp;&quot; . $interface-&gt;type-&gt;name . &quot;::update&quot; . $codeGenerator-&gt;WK_ucfirst($getter);
</ins><span class="cx"> 
</span><del>-            my $selfIsTearOffType = $codeGenerator-&gt;IsSVGTypeNeedingTearOffForType($interface-&gt;type);
</del><ins>+            my $selfIsTearOffType = $codeGenerator-&gt;IsSVGTypeNeedingTearOff($interface-&gt;type);
</ins><span class="cx">             if ($selfIsTearOffType) {
</span><span class="cx">                 # FIXME: Why SVGMatrix specifically?
</span><span class="cx">                 AddToImplIncludes(&quot;SVGMatrixTearOff.h&quot;, $conditional);
</span><span class="lines">@@ -5485,7 +5471,7 @@
</span><span class="cx">                 $value = &quot;SVGMatrixTearOff::create($wrapped, $value)&quot;;
</span><span class="cx">             } else {
</span><span class="cx">                 AddToImplIncludes(&quot;SVGStaticPropertyTearOff.h&quot;, $conditional);
</span><del>-                my $interfaceName = $interface-&gt;name;
</del><ins>+                my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">                 $tearOffType =~ s/SVGPropertyTearOff&lt;/SVGStaticPropertyTearOff&lt;$interfaceName, /;
</span><span class="cx">                 $value = &quot;${tearOffType}::create(impl, $value, $updateMethod)&quot;;
</span><span class="cx">             }
</span><span class="lines">@@ -5676,7 +5662,7 @@
</span><span class="cx">     my $interface = shift;
</span><span class="cx">     my $outputDir = shift;
</span><span class="cx"> 
</span><del>-    my $name = $interface-&gt;name;
</del><ins>+    my $name = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $prefix = FileNamePrefix;
</span><span class="cx">     my $headerFileName = &quot;$outputDir/$prefix$name.h&quot;;
</span><span class="cx">     my $implFileName = &quot;$outputDir/$prefix$name.cpp&quot;;
</span><span class="lines">@@ -5842,7 +5828,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($outputArray, $className, $interface) = @_;
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $constructorClassName = &quot;${className}Constructor&quot;;
</span><span class="cx">     my $templateClassName = GetConstructorTemplateClassName($interface);
</span><span class="cx"> 
</span><span class="lines">@@ -5880,7 +5866,7 @@
</span><span class="cx"> 
</span><span class="cx">     return if IsJSBuiltinConstructor($interface);
</span><span class="cx"> 
</span><del>-    my $interfaceName = $interface-&gt;name;
</del><ins>+    my $interfaceName = $interface-&gt;type-&gt;name;
</ins><span class="cx">     my $constructorClassName = $generatingNamedConstructor ? &quot;${className}NamedConstructor&quot; : &quot;${className}Constructor&quot;;
</span><span class="cx"> 
</span><span class="cx">     if (IsConstructable($interface)) {
</span><span class="lines">@@ -6025,8 +6011,8 @@
</span><span class="cx">     # FIXME: IDL does not allow an interface without [NoInterfaceObject] to inherit one that is marked as [NoInterfaceObject]
</span><span class="cx">     # so we should be able to use our parent's interface object no matter what. However, some of our IDL files (e.g. CanvasRenderingContext2D)
</span><span class="cx">     # are not valid so we need this check for now.
</span><del>-    if ($interface-&gt;parent &amp;&amp; !$codeGenerator-&gt;GetInterfaceExtendedAttributesFromName($interface-&gt;parent)-&gt;{NoInterfaceObject}) {
-        my $parentClassName = &quot;JS&quot; . $interface-&gt;parent;
</del><ins>+    if ($interface-&gt;parentType &amp;&amp; !$codeGenerator-&gt;GetInterfaceExtendedAttributesFromName($interface-&gt;parentType-&gt;name)-&gt;{NoInterfaceObject}) {
+        my $parentClassName = &quot;JS&quot; . $interface-&gt;parentType-&gt;name;
</ins><span class="cx">         push(@$outputArray, &quot;    return ${parentClassName}::getConstructor(vm, &amp;globalObject);\n&quot;);
</span><span class="cx">     } elsif ($interface-&gt;isCallback) {
</span><span class="cx">         # The internal [[Prototype]] property of an interface object for a callback interface must be the Object.prototype object.
</span><span class="lines">@@ -6064,7 +6050,7 @@
</span><span class="cx">     if (IsJSBuiltinConstructor($interface)) {
</span><span class="cx">         push(@$outputArray, &quot;template&lt;&gt; FunctionExecutable* ${constructorClassName}::initializeExecutable(VM&amp; vm)\n&quot;);
</span><span class="cx">         push(@$outputArray, &quot;{\n&quot;);
</span><del>-        push(@$outputArray, &quot;    return &quot; . GetJSBuiltinFunctionNameFromString($interface-&gt;name, &quot;initialize&quot; . $interface-&gt;name) . &quot;(vm);\n&quot;);
</del><ins>+        push(@$outputArray, &quot;    return &quot; . GetJSBuiltinFunctionNameFromString($interface-&gt;type-&gt;name, &quot;initialize&quot; . $interface-&gt;type-&gt;name) . &quot;(vm);\n&quot;);
</ins><span class="cx">         push(@$outputArray, &quot;}\n&quot;);
</span><span class="cx">         push(@$outputArray, &quot;\n&quot;);
</span><span class="cx">     }
</span><span class="lines">@@ -6105,7 +6091,7 @@
</span><span class="cx"> sub IsReturningPromise
</span><span class="cx"> {
</span><span class="cx">     my $function = shift;
</span><del>-    return $function-&gt;signature-&gt;idlType &amp;&amp; $function-&gt;signature-&gt;idlType-&gt;name eq &quot;Promise&quot;;
</del><ins>+    return $function-&gt;signature-&gt;type &amp;&amp; $function-&gt;signature-&gt;type-&gt;name eq &quot;Promise&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub IsConstructable
</span><span class="lines">@@ -6188,7 +6174,7 @@
</span><span class="cx"> sub GetJSBuiltinScopeName
</span><span class="cx"> {
</span><span class="cx">     my ($interface, $object) = @_;
</span><del>-    return $object-&gt;signature-&gt;extendedAttributes-&gt;{ImplementedBy} || $interface-&gt;name;
</del><ins>+    return $object-&gt;signature-&gt;extendedAttributes-&gt;{ImplementedBy} || $interface-&gt;type-&gt;name;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub AddJSBuiltinIncludesIfNeeded()
</span><span class="lines">@@ -6196,7 +6182,7 @@
</span><span class="cx">     my $interface = shift;
</span><span class="cx"> 
</span><span class="cx">     if ($interface-&gt;extendedAttributes-&gt;{JSBuiltin} || $interface-&gt;extendedAttributes-&gt;{JSBuiltinConstructor}) {
</span><del>-        AddToImplIncludes($interface-&gt;name . &quot;Builtins.h&quot;);
</del><ins>+        AddToImplIncludes($interface-&gt;type-&gt;name . &quot;Builtins.h&quot;);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsIDLParserpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/IDLParser.pm (208065 => 208066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/IDLParser.pm        2016-10-28 20:45:22 UTC (rev 208065)
+++ trunk/Source/WebCore/bindings/scripts/IDLParser.pm        2016-10-28 20:53:03 UTC (rev 208066)
</span><span class="lines">@@ -51,12 +51,22 @@
</span><span class="cx">     subtypes =&gt;     '@', # Array of subtypes, only valid if isUnion or sequence
</span><span class="cx"> });
</span><span class="cx"> 
</span><ins>+# Used to represent a map of 'variable name' &lt;-&gt; 'variable type'
+struct( domSignature =&gt; {
+    direction =&gt; '$',   # Variable direction (in or out)
+    name =&gt; '$',        # Variable name
+    type =&gt; 'domType',  # Variable type
+    specials =&gt; '@',    # Specials
+    extendedAttributes =&gt; '$', # Extended attributes
+    isVariadic =&gt; '$',  # Is variable variadic (long... numbers)
+    isOptional =&gt; '$',  # Is variable optional (optional T)
+    default =&gt; '$',     # Default value for parameters
+});
+
</ins><span class="cx"> # Used to represent 'interface' blocks
</span><span class="cx"> struct( domInterface =&gt; {
</span><del>-    name =&gt; '$',      # Class identifier
-    type =&gt; '$',      # Class type
-    parent =&gt; '$',      # Parent class identifier
-    parentType =&gt; '$',      # Parent class type
</del><ins>+    type =&gt; 'domType', # Class type
+    parentType =&gt; 'domType', # Parent class type
</ins><span class="cx">     constants =&gt; '@',    # List of 'domConstant'
</span><span class="cx">     functions =&gt; '@',    # List of 'domFunction'
</span><span class="cx">     anonymousFunctions =&gt; '@', # List of 'domFunction'
</span><span class="lines">@@ -74,39 +84,23 @@
</span><span class="cx"> # Used to represent domInterface contents (name of method, signature)
</span><span class="cx"> struct( domFunction =&gt; {
</span><span class="cx">     isStatic =&gt; '$',
</span><del>-    signature =&gt; '$',    # Return type/Object name/extended attributes
-    parameters =&gt; '@',    # List of 'domSignature'
</del><ins>+    signature =&gt; 'domSignature', # Return type/Object name/extended attributes
+    parameters =&gt; '@', # List of 'domSignature'
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> # Used to represent domInterface contents (name of attribute, signature)
</span><span class="cx"> struct( domAttribute =&gt; {
</span><del>-    type =&gt; '$',              # Attribute type (including namespace)
</del><span class="cx">     isStatic =&gt; '$',
</span><span class="cx">     isStringifier =&gt; '$',
</span><span class="cx">     isReadOnly =&gt; '$',
</span><del>-    signature =&gt; '$',         # Attribute signature
</del><ins>+    signature =&gt; 'domSignature', # Attribute signature
</ins><span class="cx"> });
</span><span class="cx"> 
</span><del>-# Used to represent a map of 'variable name' &lt;-&gt; 'variable type'
-struct( domSignature =&gt; {
-    direction =&gt; '$',   # Variable direction (in or out)
-    name =&gt; '$',        # Variable name
-    idlType =&gt; '$',     # Variable type
-    specials =&gt; '@',    # Specials
-    extendedAttributes =&gt; '$', # Extended attributes
-    isNullable =&gt; '$',  # Is variable type Nullable (T?)
-    isVariadic =&gt; '$',  # Is variable variadic (long... numbers)
-    isOptional =&gt; '$',  # Is variable optional (optional T)
-    default =&gt; '$',     # Default value for parameters
-});
-
</del><span class="cx"> # Used to represent Iterable interfaces
</span><span class="cx"> struct( domIterable =&gt; {
</span><span class="cx">     isKeyValue =&gt; '$',# Is map iterable or set iterable
</span><del>-    keyType =&gt; '$',   # Key type name for map iterables (DEPRECATED - please use idlKeyType)
-    valueType =&gt; '$', # Value type name for map or set iterables (DEPRECATED - please use idlValueType)
-    idlKeyType =&gt; '$',   # Key type for map iterables
-    idlValueType =&gt; '$', # Value type for map or set iterables
</del><ins>+    keyType =&gt; 'domType', # Key type for map iterables
+    valueType =&gt; 'domType', # Value type for map or set iterables
</ins><span class="cx">     functions =&gt; '@', # Iterable functions (entries, keys, values, [Symbol.Iterator], forEach)
</span><span class="cx">     extendedAttributes =&gt; '$', # Extended attributes
</span><span class="cx"> });
</span><span class="lines">@@ -123,7 +117,7 @@
</span><span class="cx"> # Used to represent string constants
</span><span class="cx"> struct( domConstant =&gt; {
</span><span class="cx">     name =&gt; '$', # DOM Constant identifier
</span><del>-    type =&gt; '$', # Type name of data
</del><ins>+    type =&gt; 'domType', # Type name of data
</ins><span class="cx">     value =&gt; '$', # Constant value
</span><span class="cx">     extendedAttributes =&gt; '$', # Extended attributes
</span><span class="cx"> });
</span><span class="lines">@@ -131,16 +125,14 @@
</span><span class="cx"> # Used to represent 'enum' definitions
</span><span class="cx"> struct( domEnum =&gt; {
</span><span class="cx">     name =&gt; '$', # Enumeration identifier
</span><del>-    type =&gt; '$', # Enumeration type
</del><ins>+    type =&gt; 'domType', # Enumeration type
</ins><span class="cx">     values =&gt; '@', # Enumeration values (list of unique strings)
</span><span class="cx">     extendedAttributes =&gt; '$',
</span><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> struct( domDictionary =&gt; {
</span><del>-    name =&gt; '$', # Dictionary identifier
-    type =&gt; '$', # Dictionary type
-    parent =&gt; '$',  # Parent identifier
-    parentType =&gt; '$',  # Parent type identifier
</del><ins>+    type =&gt; 'domType', # Dictionary type
+    parentType =&gt; 'domType',  # Parent type identifier
</ins><span class="cx">     members =&gt; '@', # List of 'domSignature'
</span><span class="cx">     extendedAttributes =&gt; '$',
</span><span class="cx"> });
</span><span class="lines">@@ -152,7 +144,7 @@
</span><span class="cx"> 
</span><span class="cx"> struct( Typedef =&gt; {
</span><span class="cx">     extendedAttributes =&gt; '$', # Extended attributes
</span><del>-    idlType =&gt; '$', # Type of data
</del><ins>+    type =&gt; 'domType', # Type of data
</ins><span class="cx"> });
</span><span class="cx"> 
</span><span class="cx"> # Maps 'typedef name' -&gt; Typedef
</span><span class="lines">@@ -376,6 +368,22 @@
</span><span class="cx">     return $type;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub cloneType
+{
+    my $self = shift;
+    my $type = shift;
+
+    my $clonedType = domType-&gt;new();
+    $clonedType-&gt;name($type-&gt;name);
+    $clonedType-&gt;isNullable($type-&gt;isNullable);
+    $clonedType-&gt;isUnion($type-&gt;isUnion);
+    foreach my $subtype (@{$type-&gt;subtypes}) {
+        push(@{$clonedType-&gt;subtypes}, $self-&gt;cloneType($subtype));
+    }
+
+    return $clonedType;
+}
+
</ins><span class="cx"> my $nextAttribute_1 = '^(attribute|inherit|readonly)$';
</span><span class="cx"> my $nextPrimitiveType_1 = '^(int|long|short|unsigned)$';
</span><span class="cx"> my $nextPrimitiveType_2 = '^(double|float|unrestricted)$';
</span><span class="lines">@@ -436,10 +444,16 @@
</span><span class="cx">     foreach my $definition (@$definitions) {
</span><span class="cx">         if (ref($definition) eq &quot;domInterface&quot;) {
</span><span class="cx">             foreach my $constant (@{$definition-&gt;constants}) {
</span><del>-                if (exists $typedefs{$constant-&gt;type}) {
-                    my $typedef = $typedefs{$constant-&gt;type};
-                    $self-&gt;assertNoExtendedAttributesInTypedef($constant-&gt;type, __LINE__);
-                    $constant-&gt;type($typedef-&gt;idlType-&gt;name);
</del><ins>+                if (exists $typedefs{$constant-&gt;type-&gt;name}) {
+                    my $typedef = $typedefs{$constant-&gt;type-&gt;name};
+                    $self-&gt;assertNoExtendedAttributesInTypedef($constant-&gt;type-&gt;name, __LINE__);
+
+                    my $clonedType = $self-&gt;cloneType($typedef-&gt;type);
+                
+                    # Retain nullability from the original type.
+                    $clonedType-&gt;isNullable($constant-&gt;type-&gt;isNullable);
+
+                    $constant-&gt;type($clonedType);
</ins><span class="cx">                 }
</span><span class="cx">             }
</span><span class="cx">             foreach my $attribute (@{$definition-&gt;attributes}) {
</span><span class="lines">@@ -459,50 +473,34 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub cloneType
-{
-    my $self = shift;
-    my $type = shift;
-
-    my $clonedType = domType-&gt;new();
-    $clonedType-&gt;name($type-&gt;name);
-    $clonedType-&gt;isNullable($type-&gt;isNullable);
-    $clonedType-&gt;isUnion($type-&gt;isUnion);
-    foreach my $subtype (@{$type-&gt;subtypes}) {
-        push(@{$clonedType-&gt;subtypes}, $self-&gt;cloneType($subtype));
-    }
-
-    return $clonedType;
-}
-
</del><span class="cx"> sub applyTypedefsForSignature
</span><span class="cx"> {
</span><span class="cx">     my $self = shift;
</span><span class="cx">     my $signature = shift;
</span><span class="cx"> 
</span><del>-    if (!defined ($signature-&gt;idlType)) {
</del><ins>+    if (!defined ($signature-&gt;type)) {
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    my $typeName = $signature-&gt;idlType-&gt;name;
</del><ins>+    my $typeName = $signature-&gt;type-&gt;name;
</ins><span class="cx"> 
</span><span class="cx">     # Handle union types, sequences and etc.
</span><span class="cx">     # FIXME: This should be recursive.
</span><del>-    my $numberOfSubtypes = scalar @{$signature-&gt;idlType-&gt;subtypes};
</del><ins>+    my $numberOfSubtypes = scalar @{$signature-&gt;type-&gt;subtypes};
</ins><span class="cx">     if ($numberOfSubtypes) {
</span><span class="cx">         for my $i (0..$numberOfSubtypes - 1) {
</span><del>-            my $subtype = @{$signature-&gt;idlType-&gt;subtypes}[$i];
</del><ins>+            my $subtype = @{$signature-&gt;type-&gt;subtypes}[$i];
</ins><span class="cx">             my $subtypeName = $subtype-&gt;name;
</span><span class="cx"> 
</span><span class="cx">             if (exists $typedefs{$subtypeName}) {
</span><span class="cx">                 my $typedef = $typedefs{$subtypeName};
</span><span class="cx"> 
</span><del>-                my $clonedType = $self-&gt;cloneType($typedef-&gt;idlType);
</del><ins>+                my $clonedType = $self-&gt;cloneType($typedef-&gt;type);
</ins><span class="cx">                 
</span><span class="cx">                 # Retain nullability from the original type.
</span><span class="cx">                 $clonedType-&gt;isNullable($subtype-&gt;isNullable);
</span><span class="cx">                 
</span><del>-                @{$signature-&gt;idlType-&gt;subtypes}[$i] = $clonedType;
</del><ins>+                @{$signature-&gt;type-&gt;subtypes}[$i] = $clonedType;
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     
</span><span class="lines">@@ -512,13 +510,12 @@
</span><span class="cx">     if (exists $typedefs{$typeName}) {
</span><span class="cx">         my $typedef = $typedefs{$typeName};
</span><span class="cx"> 
</span><del>-        my $clonedType = $self-&gt;cloneType($typedef-&gt;idlType);
</del><ins>+        my $clonedType = $self-&gt;cloneType($typedef-&gt;type);
</ins><span class="cx">         
</span><span class="cx">         # Retain nullability from the original type.
</span><del>-        $clonedType-&gt;isNullable($signature-&gt;idlType-&gt;isNullable);
</del><ins>+        $clonedType-&gt;isNullable($signature-&gt;type-&gt;isNullable);
</ins><span class="cx"> 
</span><del>-        $signature-&gt;idlType($clonedType);
-        $signature-&gt;isNullable($clonedType-&gt;isNullable);
</del><ins>+        $signature-&gt;type($clonedType);
</ins><span class="cx"> 
</span><span class="cx">         copyExtendedAttributes($signature-&gt;extendedAttributes, $typedef-&gt;extendedAttributes);
</span><span class="cx">     }
</span><span class="lines">@@ -600,13 +597,11 @@
</span><span class="cx">         $self-&gt;assertTokenType($interfaceNameToken, IdentifierToken);
</span><span class="cx">         
</span><span class="cx">         my $name = identifierRemoveNullablePrefix($interfaceNameToken-&gt;value());
</span><del>-        $interface-&gt;name($name);
</del><span class="cx">         $interface-&gt;type(makeSimpleType($name));
</span><span class="cx"> 
</span><span class="cx">         $next = $self-&gt;nextToken();
</span><span class="cx">         if ($next-&gt;value() eq &quot;:&quot;) {
</span><span class="cx">             my $parent = $self-&gt;parseInheritance();
</span><del>-            $interface-&gt;parent($parent);
</del><span class="cx">             $interface-&gt;parentType(makeSimpleType($parent));
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -721,13 +716,11 @@
</span><span class="cx">         $self-&gt;assertTokenType($nameToken, IdentifierToken);
</span><span class="cx"> 
</span><span class="cx">         my $name = $nameToken-&gt;value();
</span><del>-        $dictionary-&gt;name($name);
</del><span class="cx">         $dictionary-&gt;type(makeSimpleType($name));
</span><span class="cx"> 
</span><span class="cx">         $next = $self-&gt;nextToken();
</span><span class="cx">         if ($next-&gt;value() eq &quot;:&quot;) {
</span><span class="cx">             my $parent = $self-&gt;parseInheritance();
</span><del>-            $dictionary-&gt;parent($parent);
</del><span class="cx">             $dictionary-&gt;parentType(makeSimpleType($parent));
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -776,8 +769,7 @@
</span><span class="cx">         $member-&gt;extendedAttributes($extendedAttributeList);
</span><span class="cx"> 
</span><span class="cx">         my $type = $self-&gt;parseType();
</span><del>-        $member-&gt;idlType($type);
-        $member-&gt;isNullable($type-&gt;isNullable);
</del><ins>+        $member-&gt;type($type);
</ins><span class="cx"> 
</span><span class="cx">         my $nameToken = $self-&gt;getToken();
</span><span class="cx">         $self-&gt;assertTokenType($nameToken, IdentifierToken);
</span><span class="lines">@@ -847,7 +839,6 @@
</span><span class="cx">         $self-&gt;assertTokenType($exceptionNameToken, IdentifierToken);
</span><span class="cx"> 
</span><span class="cx">         my $name = identifierRemoveNullablePrefix($exceptionNameToken-&gt;value());
</span><del>-        $interface-&gt;name($name);
</del><span class="cx">         $interface-&gt;type(makeSimpleType($name));
</span><span class="cx">         $interface-&gt;isException(1);
</span><span class="cx"> 
</span><span class="lines">@@ -854,7 +845,6 @@
</span><span class="cx">         $next = $self-&gt;nextToken();
</span><span class="cx">         if ($next-&gt;value() eq &quot;:&quot;) {
</span><span class="cx">             my $parent = $self-&gt;parseInheritance();
</span><del>-            $interface-&gt;parent($parent);
</del><span class="cx">             $interface-&gt;parentType(makeSimpleType($parent));
</span><span class="cx">         }
</span><span class="cx">         
</span><span class="lines">@@ -992,13 +982,13 @@
</span><span class="cx">         $typedef-&gt;extendedAttributes($self-&gt;parseExtendedAttributeListAllowEmpty());
</span><span class="cx"> 
</span><span class="cx">         my $type = $self-&gt;parseType();
</span><del>-        $typedef-&gt;idlType($type);
</del><ins>+        $typedef-&gt;type($type);
</ins><span class="cx"> 
</span><span class="cx">         my $nameToken = $self-&gt;getToken();
</span><span class="cx">         $self-&gt;assertTokenType($nameToken, IdentifierToken);
</span><span class="cx">         $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;;&quot;, __LINE__);
</span><span class="cx">         my $name = $nameToken-&gt;value();
</span><del>-        die &quot;typedef redefinition for &quot; . $name . &quot; at &quot; . $self-&gt;{Line} if (exists $typedefs{$name} &amp;&amp; $typedef-&gt;idlType-&gt;name ne $typedefs{$name}-&gt;idlType-&gt;name);
</del><ins>+        die &quot;typedef redefinition for &quot; . $name . &quot; at &quot; . $self-&gt;{Line} if (exists $typedefs{$name} &amp;&amp; $typedef-&gt;type-&gt;name ne $typedefs{$name}-&gt;type-&gt;name);
</ins><span class="cx">         $typedefs{$name} = $typedef;
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="lines">@@ -1298,8 +1288,7 @@
</span><span class="cx">         my $returnType = $self-&gt;parseReturnType();
</span><span class="cx">         my $interface = $self-&gt;parseOperationRest($extendedAttributeList);
</span><span class="cx">         if (defined ($interface)) {
</span><del>-            $interface-&gt;signature-&gt;idlType($returnType);
-            $interface-&gt;signature-&gt;isNullable($returnType-&gt;isNullable);
</del><ins>+            $interface-&gt;signature-&gt;type($returnType);
</ins><span class="cx">         }
</span><span class="cx">         return $interface;
</span><span class="cx">     }
</span><span class="lines">@@ -1328,17 +1317,13 @@
</span><span class="cx">     if ($next-&gt;value() =~ /$nextAttributeRest_1/) {
</span><span class="cx">         my $newDataNode = domAttribute-&gt;new();
</span><span class="cx">         if ($self-&gt;parseReadOnly()) {
</span><del>-            $newDataNode-&gt;type(&quot;attribute&quot;);
</del><span class="cx">             $newDataNode-&gt;isReadOnly(1);
</span><del>-        } else {
-            $newDataNode-&gt;type(&quot;attribute&quot;);
</del><span class="cx">         }
</span><span class="cx">         $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;attribute&quot;, __LINE__);
</span><span class="cx">         $newDataNode-&gt;signature(domSignature-&gt;new());
</span><span class="cx">         
</span><span class="cx">         my $type = $self-&gt;parseType();
</span><del>-        $newDataNode-&gt;signature-&gt;idlType($type);
-        $newDataNode-&gt;signature-&gt;isNullable($type-&gt;isNullable);
</del><ins>+        $newDataNode-&gt;signature-&gt;type($type);
</ins><span class="cx"> 
</span><span class="cx">         my $token = $self-&gt;getToken();
</span><span class="cx">         $self-&gt;assertTokenType($token, IdentifierToken);
</span><span class="lines">@@ -1394,9 +1379,7 @@
</span><span class="cx">         my $next = $self-&gt;nextToken();
</span><span class="cx">         if ($next-&gt;type() == IdentifierToken || $next-&gt;value() eq &quot;(&quot;) {
</span><span class="cx">             my $operation = $self-&gt;parseOperationRest($extendedAttributeList);
</span><del>-            $operation-&gt;signature-&gt;idlType($returnType);
-            $operation-&gt;signature-&gt;isNullable($returnType-&gt;isNullable);
-
</del><ins>+            $operation-&gt;signature-&gt;type($returnType);
</ins><span class="cx">             return $operation;
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -1415,8 +1398,7 @@
</span><span class="cx">         my $returnType = $self-&gt;parseReturnType();
</span><span class="cx">         my $interface = $self-&gt;parseOperationRest($extendedAttributeList);
</span><span class="cx">         if (defined ($interface)) {
</span><del>-            $interface-&gt;signature-&gt;idlType($returnType);
-            $interface-&gt;signature-&gt;isNullable($returnType-&gt;isNullable);
</del><ins>+            $interface-&gt;signature-&gt;type($returnType);
</ins><span class="cx">             $interface-&gt;signature-&gt;specials(\@specials);
</span><span class="cx">         }
</span><span class="cx">         return $interface;
</span><span class="lines">@@ -1513,7 +1495,7 @@
</span><span class="cx">     $forEachFunction-&gt;signature-&gt;name(&quot;forEach&quot;);
</span><span class="cx">     my $forEachArgument = domSignature-&gt;new();
</span><span class="cx">     $forEachArgument-&gt;name(&quot;callback&quot;);
</span><del>-    $forEachArgument-&gt;idlType(makeSimpleType(&quot;any&quot;));
</del><ins>+    $forEachArgument-&gt;type(makeSimpleType(&quot;any&quot;));
</ins><span class="cx">     push(@{$forEachFunction-&gt;parameters}, ($forEachArgument));
</span><span class="cx"> 
</span><span class="cx">     my $newDataNode = domIterable-&gt;new();
</span><span class="lines">@@ -1532,14 +1514,11 @@
</span><span class="cx"> 
</span><span class="cx">         my $type2 = $self-&gt;parseType();
</span><span class="cx">         $newDataNode-&gt;isKeyValue(1);
</span><del>-        $newDataNode-&gt;idlKeyType($type1);
-        $newDataNode-&gt;keyType($type1-&gt;name);
-        $newDataNode-&gt;idlValueType($type2);
-        $newDataNode-&gt;valueType($type2-&gt;name);
</del><ins>+        $newDataNode-&gt;keyType($type1);
+        $newDataNode-&gt;valueType($type2);
</ins><span class="cx">     } else {
</span><span class="cx">         $newDataNode-&gt;isKeyValue(0);
</span><del>-        $newDataNode-&gt;idlValueType($type1);
-        $newDataNode-&gt;valueType($type1-&gt;name);
</del><ins>+        $newDataNode-&gt;valueType($type1);
</ins><span class="cx">     }
</span><span class="cx">     $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;&gt;&quot;, __LINE__);
</span><span class="cx"> 
</span><span class="lines">@@ -1635,8 +1614,7 @@
</span><span class="cx">         $self-&gt;assertTokenValue($self-&gt;getToken(), &quot;optional&quot;, __LINE__);
</span><span class="cx"> 
</span><span class="cx">         my $type = $self-&gt;parseType();
</span><del>-        $paramDataNode-&gt;idlType($type);
-        $paramDataNode-&gt;isNullable($type-&gt;isNullable);
</del><ins>+        $paramDataNode-&gt;type($type);
</ins><span class="cx">         $paramDataNode-&gt;isOptional(1);
</span><span class="cx">         $paramDataNode-&gt;name($self-&gt;parseArgumentName());
</span><span class="cx">         $paramDataNode-&gt;default($self-&gt;parseDefault());
</span><span class="lines">@@ -1644,8 +1622,7 @@
</span><span class="cx">     }
</span><span class="cx">     if ($next-&gt;type() == IdentifierToken || $next-&gt;value() =~ /$nextExceptionField_1/) {
</span><span class="cx">         my $type = $self-&gt;parseType();
</span><del>-        $paramDataNode-&gt;idlType($type);
-        $paramDataNode-&gt;isNullable($type-&gt;isNullable);
</del><ins>+        $paramDataNode-&gt;type($type);
</ins><span class="cx">         $paramDataNode-&gt;isOptional(0);
</span><span class="cx">         $paramDataNode-&gt;isVariadic($self-&gt;parseEllipsis());
</span><span class="cx">         $paramDataNode-&gt;name($self-&gt;parseArgumentName());
</span><span class="lines">@@ -1706,8 +1683,7 @@
</span><span class="cx">         $newDataNode-&gt;signature(domSignature-&gt;new());
</span><span class="cx"> 
</span><span class="cx">         my $type = $self-&gt;parseType();
</span><del>-        $newDataNode-&gt;signature-&gt;idlType($type);
-        $newDataNode-&gt;signature-&gt;isNullable($type-&gt;isNullable);
</del><ins>+        $newDataNode-&gt;signature-&gt;type($type);
</ins><span class="cx">         
</span><span class="cx">         my $token = $self-&gt;getToken();
</span><span class="cx">         $self-&gt;assertTokenType($token, IdentifierToken);
</span><span class="lines">@@ -2353,7 +2329,7 @@
</span><span class="cx">     # This check may have to move to the code generator, if we don't have enough information
</span><span class="cx">     # here to determine serializability: https://heycam.github.io/webidl/#idl-serializers
</span><span class="cx">     my $serializable_types = '^(\(byte|octet|short|unsigned short|long|unsigned long|long long|unsigned long long|float|unrestricted float|double|unrestricted double|boolean|DOMString|ByteString|USVString)$';
</span><del>-    return $attribute-&gt;signature-&gt;idlType-&gt;name =~ /$serializable_types/;
</del><ins>+    return $attribute-&gt;signature-&gt;type-&gt;name =~ /$serializable_types/;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub applyMemberList
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsgeneratebindingspl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/generate-bindings.pl (208065 => 208066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/generate-bindings.pl        2016-10-28 20:45:22 UTC (rev 208065)
+++ trunk/Source/WebCore/bindings/scripts/generate-bindings.pl        2016-10-28 20:53:03 UTC (rev 208066)
</span><span class="lines">@@ -141,11 +141,11 @@
</span><span class="cx">     my $document = $parser-&gt;Parse($idlFile, $defines, $preprocessor);
</span><span class="cx"> 
</span><span class="cx">     foreach my $interface (@{$document-&gt;interfaces}) {
</span><del>-        if (!$interface-&gt;isPartial || $interface-&gt;name eq $targetInterfaceName) {
</del><ins>+        if (!$interface-&gt;isPartial || $interface-&gt;type-&gt;name eq $targetInterfaceName) {
</ins><span class="cx">             my $targetDataNode;
</span><span class="cx">             my @targetGlobalContexts;
</span><span class="cx">             foreach my $interface (@{$targetDocument-&gt;interfaces}) {
</span><del>-                if ($interface-&gt;name eq $targetInterfaceName) {
</del><ins>+                if ($interface-&gt;type-&gt;name eq $targetInterfaceName) {
</ins><span class="cx">                     $targetDataNode = $interface;
</span><span class="cx">                     my $exposedAttribute = $targetDataNode-&gt;extendedAttributes-&gt;{&quot;Exposed&quot;} || &quot;Window&quot;;
</span><span class="cx">                     $exposedAttribute = substr($exposedAttribute, 1, -1) if substr($exposedAttribute, 0, 1) eq &quot;(&quot;;
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (208065 => 208066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-10-28 20:45:22 UTC (rev 208065)
+++ trunk/Tools/ChangeLog        2016-10-28 20:53:03 UTC (rev 208066)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-10-28  Sam Weinig  &lt;sam@webkit.org&gt;
+
+        [WebIDL] Update parser and code generators to only access type information through the type property
+        https://bugs.webkit.org/show_bug.cgi?id=164141
+
+        Reviewed by Anders Carlsson.
+
+        * DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm:
+        * WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm:
+        Update to always access type information through type accessors. Remove use of removed
+        properties.
+
</ins><span class="cx"> 2016-10-28  Frederic Wang  &lt;fwang@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Upgrade HarfBuzz to version 1.3.3
</span></span></pre></div>
<a id="trunkToolsDumpRenderTreeBindingsCodeGeneratorDumpRenderTreepm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm (208065 => 208066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm        2016-10-28 20:45:22 UTC (rev 208065)
+++ trunk/Tools/DumpRenderTree/Bindings/CodeGeneratorDumpRenderTree.pm        2016-10-28 20:53:03 UTC (rev 208066)
</span><span class="lines">@@ -55,16 +55,16 @@
</span><span class="cx"> 
</span><span class="cx"> sub _className
</span><span class="cx"> {
</span><del>-    my ($idlType) = @_;
</del><ins>+    my ($type) = @_;
</ins><span class="cx"> 
</span><del>-    return &quot;JS&quot; . _implementationClassName($idlType);
</del><ins>+    return &quot;JS&quot; . _implementationClassName($type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _classRefGetter
</span><span class="cx"> {
</span><del>-    my ($self, $idlType) = @_;
</del><ins>+    my ($self, $type) = @_;
</ins><span class="cx"> 
</span><del>-    return $$self{codeGenerator}-&gt;WK_lcfirst(_implementationClassName($idlType)) . &quot;Class&quot;;
</del><ins>+    return $$self{codeGenerator}-&gt;WK_lcfirst(_implementationClassName($type)) . &quot;Class&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _parseLicenseBlock
</span><span class="lines">@@ -142,9 +142,9 @@
</span><span class="cx"> 
</span><span class="cx">     my @contents = ();
</span><span class="cx"> 
</span><del>-    my $idlType = $interface-&gt;type;
-    my $className = _className($idlType);
-    my $implementationClassName = _implementationClassName($idlType);
</del><ins>+    my $type = $interface-&gt;type;
+    my $className = _className($type);
+    my $implementationClassName = _implementationClassName($type);
</ins><span class="cx">     my $filename = $className . &quot;.h&quot;;
</span><span class="cx"> 
</span><span class="cx">     push(@contents, $self-&gt;_licenseBlock());
</span><span class="lines">@@ -166,7 +166,7 @@
</span><span class="cx"> 
</span><span class="cx"> class ${className} : public ${parentClassName} {
</span><span class="cx"> public:
</span><del>-    static JSClassRef @{[$self-&gt;_classRefGetter($idlType)]}();
</del><ins>+    static JSClassRef @{[$self-&gt;_classRefGetter($type)]}();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     static const JSStaticFunction* staticFunctions();
</span><span class="lines">@@ -209,14 +209,14 @@
</span><span class="cx">     my %contentsIncludes = ();
</span><span class="cx">     my @contents = ();
</span><span class="cx"> 
</span><del>-    my $idlType = $interface-&gt;type;
-    my $className = _className($idlType);
-    my $implementationClassName = _implementationClassName($idlType);
</del><ins>+    my $type = $interface-&gt;type;
+    my $className = _className($type);
+    my $implementationClassName = _implementationClassName($type);
</ins><span class="cx">     my $filename = $className . &quot;.cpp&quot;;
</span><span class="cx"> 
</span><span class="cx">     push(@contentsPrefix, $self-&gt;_licenseBlock());
</span><span class="cx"> 
</span><del>-    my $classRefGetter = $self-&gt;_classRefGetter($idlType);
</del><ins>+    my $classRefGetter = $self-&gt;_classRefGetter($type);
</ins><span class="cx">     my $parentClassName = _parentClassName($interface);
</span><span class="cx"> 
</span><span class="cx">     $contentsIncludes{&quot;${className}.h&quot;} = 1;
</span><span class="lines">@@ -244,7 +244,7 @@
</span><span class="cx">     static JSClassRef jsClass;
</span><span class="cx">     if (!jsClass) {
</span><span class="cx">         JSClassDefinition definition = kJSClassDefinitionEmpty;
</span><del>-        definition.className = &quot;${idlType}&quot;;
</del><ins>+        definition.className = &quot;${type}&quot;;
</ins><span class="cx">         definition.parentClass = @{[$self-&gt;_parentClassRefGetterExpression($interface)]};
</span><span class="cx">         definition.staticValues = staticValues();
</span><span class="cx">         definition.staticFunctions = staticFunctions();
</span><span class="lines">@@ -284,7 +284,7 @@
</span><span class="cx">                 my @parameters = ();
</span><span class="cx">                 my @specifiedParameters = @{$function-&gt;parameters};
</span><span class="cx"> 
</span><del>-                $self-&gt;_includeHeaders(\%contentsIncludes, $function-&gt;signature-&gt;idlType, $function-&gt;signature);
</del><ins>+                $self-&gt;_includeHeaders(\%contentsIncludes, $function-&gt;signature-&gt;type, $function-&gt;signature);
</ins><span class="cx"> 
</span><span class="cx">                 if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;PassContext&quot;}) {
</span><span class="cx">                     push(@parameters, &quot;context&quot;);
</span><span class="lines">@@ -293,7 +293,7 @@
</span><span class="cx">                 foreach my $i (0..$#specifiedParameters) {
</span><span class="cx">                     my $parameter = $specifiedParameters[$i];
</span><span class="cx"> 
</span><del>-                    $self-&gt;_includeHeaders(\%contentsIncludes, $idlType, $parameter);
</del><ins>+                    $self-&gt;_includeHeaders(\%contentsIncludes, $type, $parameter);
</ins><span class="cx"> 
</span><span class="cx">                     push(@contents, &quot;    &quot; . $self-&gt;_platformTypeVariableDeclaration($parameter, $parameter-&gt;name, &quot;arguments[$i]&quot;, &quot;argumentCount &gt; $i&quot;) . &quot;\n&quot;);
</span><span class="cx">                     
</span><span class="lines">@@ -303,7 +303,7 @@
</span><span class="cx">                 $functionCall = &quot;impl-&gt;&quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . join(&quot;, &quot;, @parameters) . &quot;)&quot;;
</span><span class="cx">             }
</span><span class="cx">             
</span><del>-            push(@contents, &quot;    ${functionCall};\n\n&quot;) if $function-&gt;signature-&gt;idlType-&gt;name eq &quot;void&quot;;
</del><ins>+            push(@contents, &quot;    ${functionCall};\n\n&quot;) if $function-&gt;signature-&gt;type-&gt;name eq &quot;void&quot;;
</ins><span class="cx">             push(@contents, &quot;    return &quot; . $self-&gt;_returnExpression($function-&gt;signature, $functionCall) . &quot;;\n}\n&quot;);
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -311,7 +311,7 @@
</span><span class="cx">     if (my @attributes = @{$interface-&gt;attributes}) {
</span><span class="cx">         push(@contents, &quot;\n// Attributes\n&quot;);
</span><span class="cx">         foreach my $attribute (@attributes) {
</span><del>-            $self-&gt;_includeHeaders(\%contentsIncludes, $attribute-&gt;signature-&gt;idlType, $attribute-&gt;signature);
</del><ins>+            $self-&gt;_includeHeaders(\%contentsIncludes, $attribute-&gt;signature-&gt;type, $attribute-&gt;signature);
</ins><span class="cx"> 
</span><span class="cx">             my $getterName = $self-&gt;_getterName($attribute);
</span><span class="cx">             my $getterExpression = &quot;impl-&gt;${getterName}()&quot;;
</span><span class="lines">@@ -373,23 +373,23 @@
</span><span class="cx"> 
</span><span class="cx"> sub _includeHeaders
</span><span class="cx"> {
</span><del>-    my ($self, $headers, $idlType, $signature) = @_;
</del><ins>+    my ($self, $headers, $type, $signature) = @_;
</ins><span class="cx"> 
</span><del>-    return unless defined $idlType;
-    return if $idlType-&gt;name eq &quot;boolean&quot;;
-    return if $idlType-&gt;name eq &quot;object&quot;;
-    return if $$self{codeGenerator}-&gt;IsNonPointerType($idlType);
-    return if $$self{codeGenerator}-&gt;IsStringType($idlType);
</del><ins>+    return unless defined $type;
+    return if $type-&gt;name eq &quot;boolean&quot;;
+    return if $type-&gt;name eq &quot;object&quot;;
+    return if $$self{codeGenerator}-&gt;IsNonPointerType($type);
+    return if $$self{codeGenerator}-&gt;IsStringType($type);
</ins><span class="cx"> 
</span><del>-    $$headers{_className($idlType) . &quot;.h&quot;} = 1;
-    $$headers{_implementationClassName($idlType) . &quot;.h&quot;} = 1;
</del><ins>+    $$headers{_className($type) . &quot;.h&quot;} = 1;
+    $$headers{_implementationClassName($type) . &quot;.h&quot;} = 1;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _implementationClassName
</span><span class="cx"> {
</span><del>-    my ($idlType) = @_;
</del><ins>+    my ($type) = @_;
</ins><span class="cx"> 
</span><del>-    return $idlType-&gt;name;
</del><ins>+    return $type-&gt;name;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _parentClassName
</span><span class="lines">@@ -416,15 +416,15 @@
</span><span class="cx"> 
</span><span class="cx"> sub _platformType
</span><span class="cx"> {
</span><del>-    my ($self, $idlType, $signature) = @_;
</del><ins>+    my ($self, $type, $signature) = @_;
</ins><span class="cx"> 
</span><del>-    return undef unless defined $idlType;
</del><ins>+    return undef unless defined $type;
</ins><span class="cx"> 
</span><del>-    return &quot;bool&quot; if $idlType-&gt;name eq &quot;boolean&quot;;
-    return &quot;JSValueRef&quot; if $idlType-&gt;name eq &quot;object&quot;;
-    return &quot;JSRetainPtr&lt;JSStringRef&gt;&quot; if $$self{codeGenerator}-&gt;IsStringType($idlType);
-    return &quot;double&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($idlType);
-    return _implementationClassName($idlType);
</del><ins>+    return &quot;bool&quot; if $type-&gt;name eq &quot;boolean&quot;;
+    return &quot;JSValueRef&quot; if $type-&gt;name eq &quot;object&quot;;
+    return &quot;JSRetainPtr&lt;JSStringRef&gt;&quot; if $$self{codeGenerator}-&gt;IsStringType($type);
+    return &quot;double&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($type);
+    return _implementationClassName($type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _platformTypeConstructor
</span><span class="lines">@@ -431,13 +431,13 @@
</span><span class="cx"> {
</span><span class="cx">     my ($self, $signature, $argumentName) = @_;
</span><span class="cx"> 
</span><del>-    my $idlType = $signature-&gt;idlType;
</del><ins>+    my $type = $signature-&gt;type;
</ins><span class="cx"> 
</span><del>-    return &quot;JSValueToBoolean(context, $argumentName)&quot; if $idlType eq &quot;boolean&quot;;
-    return &quot;$argumentName&quot; if $idlType-&gt;name eq &quot;object&quot;;
-    return &quot;JSRetainPtr&lt;JSStringRef&gt;(Adopt, JSValueToStringCopy(context, $argumentName, 0))&quot; if $$self{codeGenerator}-&gt;IsStringType($idlType);
-    return &quot;JSValueToNumber(context, $argumentName, 0)&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($idlType);
-    return &quot;to&quot; . _implementationClassName($idlType) . &quot;(context, $argumentName)&quot;;
</del><ins>+    return &quot;JSValueToBoolean(context, $argumentName)&quot; if $type eq &quot;boolean&quot;;
+    return &quot;$argumentName&quot; if $type-&gt;name eq &quot;object&quot;;
+    return &quot;JSRetainPtr&lt;JSStringRef&gt;(Adopt, JSValueToStringCopy(context, $argumentName, 0))&quot; if $$self{codeGenerator}-&gt;IsStringType($type);
+    return &quot;JSValueToNumber(context, $argumentName, 0)&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($type);
+    return &quot;to&quot; . _implementationClassName($type) . &quot;(context, $argumentName)&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _platformTypeVariableDeclaration
</span><span class="lines">@@ -444,7 +444,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($self, $signature, $variableName, $argumentName, $condition) = @_;
</span><span class="cx"> 
</span><del>-    my $platformType = $self-&gt;_platformType($signature-&gt;idlType, $signature);
</del><ins>+    my $platformType = $self-&gt;_platformType($signature-&gt;type, $signature);
</ins><span class="cx">     my $constructor = $self-&gt;_platformTypeConstructor($signature, $argumentName);
</span><span class="cx"> 
</span><span class="cx">     my %nonPointerTypes = (
</span><span class="lines">@@ -472,13 +472,13 @@
</span><span class="cx"> {
</span><span class="cx">     my ($self, $signature, $expression) = @_;
</span><span class="cx"> 
</span><del>-    my $returnIDLType = $signature-&gt;idlType;
</del><ins>+    my $returnType = $signature-&gt;type;
</ins><span class="cx"> 
</span><del>-    return &quot;JSValueMakeUndefined(context)&quot; if $returnIDLType-&gt;name eq &quot;void&quot;;
-    return &quot;JSValueMakeBoolean(context, ${expression})&quot; if $returnIDLType-&gt;name eq &quot;boolean&quot;;
-    return &quot;${expression}&quot; if $returnIDLType-&gt;name eq &quot;object&quot;;
-    return &quot;JSValueMakeNumber(context, ${expression})&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($returnIDLType);
-    return &quot;JSValueMakeStringOrNull(context, ${expression}.get())&quot; if $$self{codeGenerator}-&gt;IsStringType($returnIDLType);
</del><ins>+    return &quot;JSValueMakeUndefined(context)&quot; if $returnType-&gt;name eq &quot;void&quot;;
+    return &quot;JSValueMakeBoolean(context, ${expression})&quot; if $returnType-&gt;name eq &quot;boolean&quot;;
+    return &quot;${expression}&quot; if $returnType-&gt;name eq &quot;object&quot;;
+    return &quot;JSValueMakeNumber(context, ${expression})&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($returnType);
+    return &quot;JSValueMakeStringOrNull(context, ${expression}.get())&quot; if $$self{codeGenerator}-&gt;IsStringType($returnType);
</ins><span class="cx">     return &quot;toJS(context, WTF::getPtr(${expression}))&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -486,10 +486,10 @@
</span><span class="cx"> {
</span><span class="cx">     my ($self, $parameter) = @_;
</span><span class="cx"> 
</span><del>-    my $idlType = $parameter-&gt;idlType;
</del><ins>+    my $type = $parameter-&gt;type;
</ins><span class="cx">     my $name = $parameter-&gt;name;
</span><span class="cx"> 
</span><del>-    return &quot;${name}.get()&quot; if $$self{codeGenerator}-&gt;IsStringType($idlType);
</del><ins>+    return &quot;${name}.get()&quot; if $$self{codeGenerator}-&gt;IsStringType($type);
</ins><span class="cx">     return $name;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkToolsWebKitTestRunnerInjectedBundleBindingsCodeGeneratorTestRunnerpm"></a>
<div class="modfile"><h4>Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm (208065 => 208066)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm        2016-10-28 20:45:22 UTC (rev 208065)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/CodeGeneratorTestRunner.pm        2016-10-28 20:53:03 UTC (rev 208066)
</span><span class="lines">@@ -69,17 +69,17 @@
</span><span class="cx"> 
</span><span class="cx"> sub _className
</span><span class="cx"> {
</span><del>-    my ($idlType) = @_;
</del><ins>+    my ($type) = @_;
</ins><span class="cx"> 
</span><del>-    assert(&quot;Not a type&quot;) if ref($idlType) ne &quot;domType&quot;;
</del><ins>+    assert(&quot;Not a type&quot;) if ref($type) ne &quot;domType&quot;;
</ins><span class="cx"> 
</span><del>-    return &quot;JS&quot; . _implementationClassName($idlType);
</del><ins>+    return &quot;JS&quot; . _implementationClassName($type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _classRefGetter
</span><span class="cx"> {
</span><del>-    my ($self, $idlType) = @_;
-    return $$self{codeGenerator}-&gt;WK_lcfirst(_implementationClassName($idlType)) . &quot;Class&quot;;
</del><ins>+    my ($self, $type) = @_;
+    return $$self{codeGenerator}-&gt;WK_lcfirst(_implementationClassName($type)) . &quot;Class&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _parseLicenseBlock
</span><span class="lines">@@ -157,9 +157,9 @@
</span><span class="cx"> 
</span><span class="cx">     my @contents = ();
</span><span class="cx"> 
</span><del>-    my $idlType = $interface-&gt;type;
-    my $className = _className($idlType);
-    my $implementationClassName = _implementationClassName($idlType);
</del><ins>+    my $type = $interface-&gt;type;
+    my $className = _className($type);
+    my $implementationClassName = _implementationClassName($type);
</ins><span class="cx">     my $filename = $className . &quot;.h&quot;;
</span><span class="cx"> 
</span><span class="cx">     push(@contents, $self-&gt;_licenseBlock());
</span><span class="lines">@@ -181,7 +181,7 @@
</span><span class="cx"> 
</span><span class="cx"> class ${className} : public ${parentClassName} {
</span><span class="cx"> public:
</span><del>-    static JSClassRef @{[$self-&gt;_classRefGetter($idlType)]}();
</del><ins>+    static JSClassRef @{[$self-&gt;_classRefGetter($type)]}();
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     static const JSStaticFunction* staticFunctions();
</span><span class="lines">@@ -224,14 +224,14 @@
</span><span class="cx">     my %contentsIncludes = ();
</span><span class="cx">     my @contents = ();
</span><span class="cx"> 
</span><del>-    my $idlType = $interface-&gt;type;
-    my $className = _className($idlType);
-    my $implementationClassName = _implementationClassName($idlType);
</del><ins>+    my $type = $interface-&gt;type;
+    my $className = _className($type);
+    my $implementationClassName = _implementationClassName($type);
</ins><span class="cx">     my $filename = $className . &quot;.cpp&quot;;
</span><span class="cx"> 
</span><span class="cx">     push(@contentsPrefix, $self-&gt;_licenseBlock());
</span><span class="cx"> 
</span><del>-    my $classRefGetter = $self-&gt;_classRefGetter($idlType);
</del><ins>+    my $classRefGetter = $self-&gt;_classRefGetter($type);
</ins><span class="cx">     my $parentClassName = _parentClassName($interface);
</span><span class="cx"> 
</span><span class="cx">     $contentsIncludes{&quot;${className}.h&quot;} = 1;
</span><span class="lines">@@ -259,7 +259,7 @@
</span><span class="cx">     static JSClassRef jsClass;
</span><span class="cx">     if (!jsClass) {
</span><span class="cx">         JSClassDefinition definition = kJSClassDefinitionEmpty;
</span><del>-        definition.className = &quot;@{[$idlType-&gt;name]}&quot;;
</del><ins>+        definition.className = &quot;@{[$type-&gt;name]}&quot;;
</ins><span class="cx">         definition.parentClass = @{[$self-&gt;_parentClassRefGetterExpression($interface)]};
</span><span class="cx">         definition.staticValues = staticValues();
</span><span class="cx">         definition.staticFunctions = staticFunctions();
</span><span class="lines">@@ -299,7 +299,7 @@
</span><span class="cx">                 my @parameters = ();
</span><span class="cx">                 my @specifiedParameters = @{$function-&gt;parameters};
</span><span class="cx"> 
</span><del>-                $self-&gt;_includeHeaders(\%contentsIncludes, $function-&gt;signature-&gt;idlType, $function-&gt;signature);
</del><ins>+                $self-&gt;_includeHeaders(\%contentsIncludes, $function-&gt;signature-&gt;type, $function-&gt;signature);
</ins><span class="cx"> 
</span><span class="cx">                 if ($function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;PassContext&quot;}) {
</span><span class="cx">                     push(@parameters, &quot;context&quot;);
</span><span class="lines">@@ -308,7 +308,7 @@
</span><span class="cx">                 foreach my $i (0..$#specifiedParameters) {
</span><span class="cx">                     my $parameter = $specifiedParameters[$i];
</span><span class="cx"> 
</span><del>-                    $self-&gt;_includeHeaders(\%contentsIncludes, $idlType, $parameter);
</del><ins>+                    $self-&gt;_includeHeaders(\%contentsIncludes, $type, $parameter);
</ins><span class="cx"> 
</span><span class="cx">                     push(@contents, &quot;    &quot; . $self-&gt;_platformTypeVariableDeclaration($parameter, $parameter-&gt;name, &quot;arguments[$i]&quot;, &quot;argumentCount &gt; $i&quot;) . &quot;\n&quot;);
</span><span class="cx">                     
</span><span class="lines">@@ -318,7 +318,7 @@
</span><span class="cx">                 $functionCall = &quot;impl-&gt;&quot; . $function-&gt;signature-&gt;name . &quot;(&quot; . join(&quot;, &quot;, @parameters) . &quot;)&quot;;
</span><span class="cx">             }
</span><span class="cx">             
</span><del>-            push(@contents, &quot;    ${functionCall};\n\n&quot;) if $function-&gt;signature-&gt;idlType-&gt;name eq &quot;void&quot;;
</del><ins>+            push(@contents, &quot;    ${functionCall};\n\n&quot;) if $function-&gt;signature-&gt;type-&gt;name eq &quot;void&quot;;
</ins><span class="cx">             push(@contents, &quot;    return &quot; . $self-&gt;_returnExpression($function-&gt;signature, $functionCall) . &quot;;\n}\n&quot;);
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="lines">@@ -326,7 +326,7 @@
</span><span class="cx">     if (my @attributes = @{$interface-&gt;attributes}) {
</span><span class="cx">         push(@contents, &quot;\n// Attributes\n&quot;);
</span><span class="cx">         foreach my $attribute (@attributes) {
</span><del>-            $self-&gt;_includeHeaders(\%contentsIncludes, $attribute-&gt;signature-&gt;idlType, $attribute-&gt;signature);
</del><ins>+            $self-&gt;_includeHeaders(\%contentsIncludes, $attribute-&gt;signature-&gt;type, $attribute-&gt;signature);
</ins><span class="cx"> 
</span><span class="cx">             my $getterName = $self-&gt;_getterName($attribute);
</span><span class="cx">             my $getterExpression = &quot;impl-&gt;${getterName}()&quot;;
</span><span class="lines">@@ -388,23 +388,23 @@
</span><span class="cx"> 
</span><span class="cx"> sub _includeHeaders
</span><span class="cx"> {
</span><del>-    my ($self, $headers, $idlType, $signature) = @_;
</del><ins>+    my ($self, $headers, $type, $signature) = @_;
</ins><span class="cx"> 
</span><del>-    return unless defined $idlType;
-    return if $idlType-&gt;name eq &quot;boolean&quot;;
-    return if $idlType-&gt;name eq &quot;object&quot;;
-    return if $$self{codeGenerator}-&gt;IsNonPointerType($idlType);
-    return if $$self{codeGenerator}-&gt;IsStringType($idlType);
</del><ins>+    return unless defined $type;
+    return if $type-&gt;name eq &quot;boolean&quot;;
+    return if $type-&gt;name eq &quot;object&quot;;
+    return if $$self{codeGenerator}-&gt;IsNonPointerType($type);
+    return if $$self{codeGenerator}-&gt;IsStringType($type);
</ins><span class="cx"> 
</span><del>-    $$headers{_className($idlType) . &quot;.h&quot;} = 1;
-    $$headers{_implementationClassName($idlType) . &quot;.h&quot;} = 1;
</del><ins>+    $$headers{_className($type) . &quot;.h&quot;} = 1;
+    $$headers{_implementationClassName($type) . &quot;.h&quot;} = 1;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _implementationClassName
</span><span class="cx"> {
</span><del>-    my ($idlType) = @_;
</del><ins>+    my ($type) = @_;
</ins><span class="cx"> 
</span><del>-    return $idlType-&gt;name;
</del><ins>+    return $type-&gt;name;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _parentClassName
</span><span class="lines">@@ -431,15 +431,15 @@
</span><span class="cx"> 
</span><span class="cx"> sub _platformType
</span><span class="cx"> {
</span><del>-    my ($self, $idlType, $signature) = @_;
</del><ins>+    my ($self, $type, $signature) = @_;
</ins><span class="cx"> 
</span><del>-    return undef unless defined $idlType;
</del><ins>+    return undef unless defined $type;
</ins><span class="cx"> 
</span><del>-    return &quot;bool&quot; if $idlType-&gt;name eq &quot;boolean&quot;;
-    return &quot;JSValueRef&quot; if $idlType-&gt;name eq &quot;object&quot;;
-    return &quot;JSRetainPtr&lt;JSStringRef&gt;&quot; if $$self{codeGenerator}-&gt;IsStringType($idlType);
-    return &quot;double&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($idlType);
-    return _implementationClassName($idlType);
</del><ins>+    return &quot;bool&quot; if $type-&gt;name eq &quot;boolean&quot;;
+    return &quot;JSValueRef&quot; if $type-&gt;name eq &quot;object&quot;;
+    return &quot;JSRetainPtr&lt;JSStringRef&gt;&quot; if $$self{codeGenerator}-&gt;IsStringType($type);
+    return &quot;double&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($type);
+    return _implementationClassName($type);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _platformTypeConstructor
</span><span class="lines">@@ -446,13 +446,13 @@
</span><span class="cx"> {
</span><span class="cx">     my ($self, $signature, $argumentName) = @_;
</span><span class="cx"> 
</span><del>-    my $idlType = $signature-&gt;idlType;
</del><ins>+    my $type = $signature-&gt;type;
</ins><span class="cx"> 
</span><del>-    return &quot;JSValueToBoolean(context, $argumentName)&quot; if $idlType-&gt;name eq &quot;boolean&quot;;
-    return &quot;$argumentName&quot; if $idlType-&gt;name eq &quot;object&quot;;
-    return &quot;JSRetainPtr&lt;JSStringRef&gt;(Adopt, JSValueToStringCopy(context, $argumentName, 0))&quot; if $$self{codeGenerator}-&gt;IsStringType($idlType);
-    return &quot;JSValueToNumber(context, $argumentName, 0)&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($idlType);
-    return &quot;to&quot; . _implementationClassName($idlType) . &quot;(context, $argumentName)&quot;;
</del><ins>+    return &quot;JSValueToBoolean(context, $argumentName)&quot; if $type-&gt;name eq &quot;boolean&quot;;
+    return &quot;$argumentName&quot; if $type-&gt;name eq &quot;object&quot;;
+    return &quot;JSRetainPtr&lt;JSStringRef&gt;(Adopt, JSValueToStringCopy(context, $argumentName, 0))&quot; if $$self{codeGenerator}-&gt;IsStringType($type);
+    return &quot;JSValueToNumber(context, $argumentName, 0)&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($type);
+    return &quot;to&quot; . _implementationClassName($type) . &quot;(context, $argumentName)&quot;;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub _platformTypeVariableDeclaration
</span><span class="lines">@@ -459,7 +459,7 @@
</span><span class="cx"> {
</span><span class="cx">     my ($self, $signature, $variableName, $argumentName, $condition) = @_;
</span><span class="cx"> 
</span><del>-    my $platformType = $self-&gt;_platformType($signature-&gt;idlType, $signature);
</del><ins>+    my $platformType = $self-&gt;_platformType($signature-&gt;type, $signature);
</ins><span class="cx">     my $constructor = $self-&gt;_platformTypeConstructor($signature, $argumentName);
</span><span class="cx"> 
</span><span class="cx">     my %nonPointerTypes = (
</span><span class="lines">@@ -487,13 +487,13 @@
</span><span class="cx"> {
</span><span class="cx">     my ($self, $signature, $expression) = @_;
</span><span class="cx"> 
</span><del>-    my $returnIDLType = $signature-&gt;idlType;
</del><ins>+    my $returnType = $signature-&gt;type;
</ins><span class="cx"> 
</span><del>-    return &quot;JSValueMakeUndefined(context)&quot; if $returnIDLType-&gt;name eq &quot;void&quot;;
-    return &quot;JSValueMakeBoolean(context, ${expression})&quot; if $returnIDLType-&gt;name eq &quot;boolean&quot;;
-    return &quot;${expression}&quot; if $returnIDLType-&gt;name eq &quot;object&quot;;
-    return &quot;JSValueMakeNumber(context, ${expression})&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($returnIDLType);
-    return &quot;JSValueMakeStringOrNull(context, ${expression}.get())&quot; if $$self{codeGenerator}-&gt;IsStringType($returnIDLType);
</del><ins>+    return &quot;JSValueMakeUndefined(context)&quot; if $returnType-&gt;name eq &quot;void&quot;;
+    return &quot;JSValueMakeBoolean(context, ${expression})&quot; if $returnType-&gt;name eq &quot;boolean&quot;;
+    return &quot;${expression}&quot; if $returnType-&gt;name eq &quot;object&quot;;
+    return &quot;JSValueMakeNumber(context, ${expression})&quot; if $$self{codeGenerator}-&gt;IsNonPointerType($returnType);
+    return &quot;JSValueMakeStringOrNull(context, ${expression}.get())&quot; if $$self{codeGenerator}-&gt;IsStringType($returnType);
</ins><span class="cx">     return &quot;toJS(context, WTF::getPtr(${expression}))&quot;;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -501,10 +501,10 @@
</span><span class="cx"> {
</span><span class="cx">     my ($self, $parameter) = @_;
</span><span class="cx"> 
</span><del>-    my $idlType = $parameter-&gt;idlType;
</del><ins>+    my $type = $parameter-&gt;type;
</ins><span class="cx">     my $name = $parameter-&gt;name;
</span><span class="cx"> 
</span><del>-    return &quot;${name}.get()&quot; if $$self{codeGenerator}-&gt;IsStringType($idlType);
</del><ins>+    return &quot;${name}.get()&quot; if $$self{codeGenerator}-&gt;IsStringType($type);
</ins><span class="cx">     return $name;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>