<!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>[206877] trunk/Source/WebCore</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/206877">206877</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-10-06 13:22:16 -0700 (Thu, 06 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WebIDL] Add support for having dictionaries in their own IDL file
https://bugs.webkit.org/show_bug.cgi?id=162912

Reviewed by Darin Adler.

Add support for having dictionaries in their own IDL file so that they
can be shared by multiple interfaces.

Leverage this new support to merge Element::ScrollToOptions and
DOMWindow::ScrollToOptions.

No new tests, extended bindings tests.

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/scripts/CodeGenerator.pm:
(ProcessDocument):
(IDLFileForInterface):
(GetDictionaryByName):
(IsDictionaryType):
(HasEnumImplementationNameOverride): Deleted.
(GetEnumImplementationNameOverride): Deleted.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateDictionary):
(GetEnumerationClassName):
(GenerateEnumerationImplementationContent):
(GenerateEnumerationHeaderContent):
(GetDictionaryClassName):
(GenerateDefaultValue):
(GenerateDictionaryHeaderContent):
(GenerateDictionariesHeaderContent):
(GenerateDictionaryImplementationContent):
(GenerateDictionariesImplementationContent):
(GenerateHeader):
(GenerateImplementation):
(GenerateParametersCheck):
(GenerateDictionaryHeader):
(GenerateDictionaryImplementation):
(GenerateCallbackHeader):
(GenerateCallbackImplementation):
(GetNativeType):
(JSValueToNative):
(GetNestedClassName): Deleted.
(GenerateConversionRuleWithLeadingComma): Deleted.
(addIterableProperties): Deleted.
* bindings/scripts/preprocess-idls.pl:
(containsInterfaceOrExceptionFromIDL):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter):
(WebCore::jsTestObjPrototypeFunctionAttachShadowRoot): Deleted.
* bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: Added.
(WebCore::convertDictionary&lt;TestStandaloneDictionary&gt;):
* bindings/scripts/test/JS/JSTestStandaloneDictionary.h: Added.
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestStandaloneDictionary.idl: Added.
* dom/Element.h:
* dom/Element.idl:
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::scrollTo):
* page/DOMWindow.h:
* page/DOMWindow.idl:
* page/ScrollToOptions.h: Added.
* page/ScrollToOptions.idl: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcescpp">trunk/Source/WebCore/DerivedSources.cpp</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</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="#trunkSourceWebCorebindingsscriptspreprocessidlspl">trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#trunkSourceWebCoredomElementh">trunk/Source/WebCore/dom/Element.h</a></li>
<li><a href="#trunkSourceWebCoredomElementidl">trunk/Source/WebCore/dom/Element.idl</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLBodyElementcpp">trunk/Source/WebCore/html/HTMLBodyElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowh">trunk/Source/WebCore/page/DOMWindow.h</a></li>
<li><a href="#trunkSourceWebCorepageDOMWindowidl">trunk/Source/WebCore/page/DOMWindow.idl</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestStandaloneDictionarycpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestStandaloneDictionaryh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestStandaloneDictionaryidl">trunk/Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl</a></li>
<li><a href="#trunkSourceWebCorepageScrollToOptionsh">trunk/Source/WebCore/page/ScrollToOptions.h</a></li>
<li><a href="#trunkSourceWebCorepageScrollToOptionsidl">trunk/Source/WebCore/page/ScrollToOptions.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -576,6 +576,7 @@
</span><span class="cx">     page/PerformanceResourceTiming.idl
</span><span class="cx">     page/PerformanceTiming.idl
</span><span class="cx">     page/Screen.idl
</span><ins>+    page/ScrollToOptions.idl
</ins><span class="cx">     page/WebKitPoint.idl
</span><span class="cx">     page/WindowEventHandlers.idl
</span><span class="cx">     page/WindowOrWorkerGlobalScope.idl
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/ChangeLog        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -1,3 +1,71 @@
</span><ins>+2016-10-06  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        [WebIDL] Add support for having dictionaries in their own IDL file
+        https://bugs.webkit.org/show_bug.cgi?id=162912
+
+        Reviewed by Darin Adler.
+
+        Add support for having dictionaries in their own IDL file so that they
+        can be shared by multiple interfaces.
+
+        Leverage this new support to merge Element::ScrollToOptions and
+        DOMWindow::ScrollToOptions.
+
+        No new tests, extended bindings tests.
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * WebCore.xcodeproj/project.pbxproj:
+        * bindings/scripts/CodeGenerator.pm:
+        (ProcessDocument):
+        (IDLFileForInterface):
+        (GetDictionaryByName):
+        (IsDictionaryType):
+        (HasEnumImplementationNameOverride): Deleted.
+        (GetEnumImplementationNameOverride): Deleted.
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateDictionary):
+        (GetEnumerationClassName):
+        (GenerateEnumerationImplementationContent):
+        (GenerateEnumerationHeaderContent):
+        (GetDictionaryClassName):
+        (GenerateDefaultValue):
+        (GenerateDictionaryHeaderContent):
+        (GenerateDictionariesHeaderContent):
+        (GenerateDictionaryImplementationContent):
+        (GenerateDictionariesImplementationContent):
+        (GenerateHeader):
+        (GenerateImplementation):
+        (GenerateParametersCheck):
+        (GenerateDictionaryHeader):
+        (GenerateDictionaryImplementation):
+        (GenerateCallbackHeader):
+        (GenerateCallbackImplementation):
+        (GetNativeType):
+        (JSValueToNative):
+        (GetNestedClassName): Deleted.
+        (GenerateConversionRuleWithLeadingComma): Deleted.
+        (addIterableProperties): Deleted.
+        * bindings/scripts/preprocess-idls.pl:
+        (containsInterfaceOrExceptionFromIDL):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter):
+        (WebCore::jsTestObjPrototypeFunctionAttachShadowRoot): Deleted.
+        * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp: Added.
+        (WebCore::convertDictionary&lt;TestStandaloneDictionary&gt;):
+        * bindings/scripts/test/JS/JSTestStandaloneDictionary.h: Added.
+        * bindings/scripts/test/TestObj.idl:
+        * bindings/scripts/test/TestStandaloneDictionary.idl: Added.
+        * dom/Element.h:
+        * dom/Element.idl:
+        * html/HTMLBodyElement.cpp:
+        (WebCore::HTMLBodyElement::scrollTo):
+        * page/DOMWindow.h:
+        * page/DOMWindow.idl:
+        * page/ScrollToOptions.h: Added.
+        * page/ScrollToOptions.idl: Added.
+
</ins><span class="cx"> 2016-10-06  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed build fix.
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcescpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.cpp (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.cpp        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/DerivedSources.cpp        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -419,6 +419,7 @@
</span><span class="cx"> #include &quot;JSRTCTrackEvent.cpp&quot;
</span><span class="cx"> #include &quot;JSScreen.cpp&quot;
</span><span class="cx"> #include &quot;JSScriptProcessorNode.cpp&quot;
</span><ins>+#include &quot;JSScrollToOptions.cpp&quot;
</ins><span class="cx"> #include &quot;JSSecurityPolicyViolationEvent.cpp&quot;
</span><span class="cx"> #include &quot;JSSourceBuffer.cpp&quot;
</span><span class="cx"> #include &quot;JSSourceBufferList.cpp&quot;
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/DerivedSources.make        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -532,6 +532,7 @@
</span><span class="cx">     $(WebCore)/page/PerformanceResourceTiming.idl \
</span><span class="cx">     $(WebCore)/page/PerformanceTiming.idl \
</span><span class="cx">     $(WebCore)/page/Screen.idl \
</span><ins>+    $(WebCore)/page/ScrollToOptions.idl \
</ins><span class="cx">     $(WebCore)/page/UserMessageHandler.idl \
</span><span class="cx">     $(WebCore)/page/UserMessageHandlersNamespace.idl \
</span><span class="cx">     $(WebCore)/page/WebKitNamespace.idl \
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -2871,6 +2871,8 @@
</span><span class="cx">                 83120C711C56F3FB001CB112 /* HTMLDataElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 834B86A71C56E83A00F3F0E3 /* HTMLDataElement.h */; };
</span><span class="cx">                 832B843419D8E55100B26055 /* SVGAnimateElementBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 832B843319D8E55100B26055 /* SVGAnimateElementBase.h */; };
</span><span class="cx">                 832B843619D8E57400B26055 /* SVGAnimateElementBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 832B843519D8E57400B26055 /* SVGAnimateElementBase.cpp */; };
</span><ins>+                834476EE1DA5BC57002B6ED2 /* JSScrollToOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83E9B3001DA5A51E00FFE8F6 /* JSScrollToOptions.cpp */; };
+                834476EF1DA5BC5E002B6ED2 /* JSScrollToOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 83E9B3011DA5A51E00FFE8F6 /* JSScrollToOptions.h */; };
</ins><span class="cx">                 8348BFAB1B85729800912F36 /* ClassCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8348BFA91B85729500912F36 /* ClassCollection.cpp */; };
</span><span class="cx">                 8348BFAC1B85729800912F36 /* ClassCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 8348BFAA1B85729500912F36 /* ClassCollection.h */; };
</span><span class="cx">                 834DD4F41BE08989002C9C3E /* PageMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 834DD4F31BE08989002C9C3E /* PageMac.mm */; };
</span><span class="lines">@@ -2915,6 +2917,7 @@
</span><span class="cx">                 83C1D434178D5AB500141E68 /* SVGPathSegLinetoVerticalRel.h in Headers */ = {isa = PBXBuildFile; fileRef = 83C1D422178D5AB400141E68 /* SVGPathSegLinetoVerticalRel.h */; };
</span><span class="cx">                 83C1D435178D5AB500141E68 /* SVGPathSegMovetoAbs.h in Headers */ = {isa = PBXBuildFile; fileRef = 83C1D423178D5AB400141E68 /* SVGPathSegMovetoAbs.h */; };
</span><span class="cx">                 83C1D436178D5AB500141E68 /* SVGPathSegMovetoRel.h in Headers */ = {isa = PBXBuildFile; fileRef = 83C1D424178D5AB400141E68 /* SVGPathSegMovetoRel.h */; };
</span><ins>+                83C5795D1DA5C301006FACA8 /* ScrollToOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 8350C3E71DA59B6200356446 /* ScrollToOptions.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 83D35AEC1C7187FA00F70D5A /* XMLHttpRequestEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 83D35AEA1C7187ED00F70D5A /* XMLHttpRequestEventTarget.h */; };
</span><span class="cx">                 83D35AF11C718D9000F70D5A /* JSXMLHttpRequestEventTarget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83D35AEF1C718D8400F70D5A /* JSXMLHttpRequestEventTarget.cpp */; };
</span><span class="cx">                 83D35AF21C718D9000F70D5A /* JSXMLHttpRequestEventTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 83D35AF01C718D8400F70D5A /* JSXMLHttpRequestEventTarget.h */; };
</span><span class="lines">@@ -9999,6 +10002,8 @@
</span><span class="cx">                 834B86A81C56E93E00F3F0E3 /* JSHTMLDataElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLDataElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 834B86A91C56E93E00F3F0E3 /* JSHTMLDataElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLDataElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 834DD4F31BE08989002C9C3E /* PageMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PageMac.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                8350C3E71DA59B6200356446 /* ScrollToOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollToOptions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
+                8350C3E81DA59B6200356446 /* ScrollToOptions.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScrollToOptions.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 83520C7D1A71BFCC006BD2AA /* CSSFontFamily.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSFontFamily.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 835D363619FF6193004C93AB /* StyleBuilderCustom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleBuilderCustom.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 835F8B261D2D90BA00E408EC /* Slotable.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Slotable.idl; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -10046,6 +10051,8 @@
</span><span class="cx">                 83E359A01BB1031D002CEB98 /* JSHTMLTimeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSHTMLTimeElement.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 83E359A11BB1031D002CEB98 /* JSHTMLTimeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSHTMLTimeElement.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 83E959E11B8BC22B004D9385 /* NativeNodeFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NativeNodeFilter.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                83E9B3001DA5A51E00FFE8F6 /* JSScrollToOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScrollToOptions.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
+                83E9B3011DA5A51E00FFE8F6 /* JSScrollToOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScrollToOptions.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 83F1206A1B8C103600D75F63 /* JSNodeFilterCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSNodeFilterCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 83F570AD1C53268E007FD6CB /* JSXMLDocument.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSXMLDocument.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 83F570AE1C53268E007FD6CB /* JSXMLDocument.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSXMLDocument.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -17362,6 +17369,8 @@
</span><span class="cx">                                 BCEC01BA0C274DAC009F4EC9 /* Screen.cpp */,
</span><span class="cx">                                 BCEC01BB0C274DAC009F4EC9 /* Screen.h */,
</span><span class="cx">                                 BCEC01BC0C274DAC009F4EC9 /* Screen.idl */,
</span><ins>+                                8350C3E71DA59B6200356446 /* ScrollToOptions.h */,
+                                8350C3E81DA59B6200356446 /* ScrollToOptions.idl */,
</ins><span class="cx">                                 BCD0E0F70E972C3500265DEA /* SecurityOrigin.cpp */,
</span><span class="cx">                                 BCD0E0F80E972C3500265DEA /* SecurityOrigin.h */,
</span><span class="cx">                                 51E3AA081B98BC9A0036AD81 /* SecurityOriginData.cpp */,
</span><span class="lines">@@ -21376,6 +21385,8 @@
</span><span class="cx">                                 8A9A587711E84C98008ACFD1 /* JSPerformanceTiming.h */,
</span><span class="cx">                                 BCEC01C00C274DDD009F4EC9 /* JSScreen.cpp */,
</span><span class="cx">                                 BCEC01C10C274DDD009F4EC9 /* JSScreen.h */,
</span><ins>+                                83E9B3001DA5A51E00FFE8F6 /* JSScrollToOptions.cpp */,
+                                83E9B3011DA5A51E00FFE8F6 /* JSScrollToOptions.h */,
</ins><span class="cx">                                 7C73FB0F191EF6F4007DE061 /* JSUserMessageHandler.cpp */,
</span><span class="cx">                                 7C73FB10191EF6F4007DE061 /* JSUserMessageHandler.h */,
</span><span class="cx">                                 7C73FB0A191EF5A8007DE061 /* JSUserMessageHandlersNamespace.cpp */,
</span><span class="lines">@@ -25031,6 +25042,7 @@
</span><span class="cx">                                 40ECAE7E16B8B67200C36103 /* JSDOMError.h in Headers */,
</span><span class="cx">                                 2E0888D51148848A00AF4265 /* JSDOMFormData.h in Headers */,
</span><span class="cx">                                 E1C36C030EB076D6007410BC /* JSDOMGlobalObject.h in Headers */,
</span><ins>+                                834476EF1DA5BC5E002B6ED2 /* JSScrollToOptions.h in Headers */,
</ins><span class="cx">                                 7C2BDD3E17C7F98C0038FF15 /* JSDOMGlobalObjectTask.h in Headers */,
</span><span class="cx">                                 65DF31F809D1CC60000BE325 /* JSDOMImplementation.h in Headers */,
</span><span class="cx">                                 4138F8581D253F0E001CB61E /* JSDOMIterator.h in Headers */,
</span><span class="lines">@@ -26191,6 +26203,7 @@
</span><span class="cx">                                 0854B0191255E4E600B9CDD0 /* RenderSVGText.h in Headers */,
</span><span class="cx">                                 0854B01B1255E4E600B9CDD0 /* RenderSVGTextPath.h in Headers */,
</span><span class="cx">                                 436708E912D9CA4B00044234 /* RenderSVGTransformableContainer.h in Headers */,
</span><ins>+                                83C5795D1DA5C301006FACA8 /* ScrollToOptions.h in Headers */,
</ins><span class="cx">                                 0854B01D1255E4E600B9CDD0 /* RenderSVGTSpan.h in Headers */,
</span><span class="cx">                                 436708EB12D9CA4B00044234 /* RenderSVGViewportContainer.h in Headers */,
</span><span class="cx">                                 A8DF4AEB0980C42C0052981B /* RenderTable.h in Headers */,
</span><span class="lines">@@ -30124,6 +30137,7 @@
</span><span class="cx">                                 71CC7A20152A0BFE009EEAF9 /* SVGAnimatedEnumeration.cpp in Sources */,
</span><span class="cx">                                 43F6FD9613BCD0B100224052 /* SVGAnimatedInteger.cpp in Sources */,
</span><span class="cx">                                 1A3586E115264F950022A659 /* SVGAnimatedIntegerOptionalInteger.cpp in Sources */,
</span><ins>+                                834476EE1DA5BC57002B6ED2 /* JSScrollToOptions.cpp in Sources */,
</ins><span class="cx">                                 4381763B13A697D4007D1187 /* SVGAnimatedLength.cpp in Sources */,
</span><span class="cx">                                 431A2FD713B7707A007791E4 /* SVGAnimatedLengthList.cpp in Sources */,
</span><span class="cx">                                 43A0F0B113AC7D6D00A5F0A7 /* SVGAnimatedNumber.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/bindings/scripts/CodeGenerator.pm        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -138,6 +138,7 @@
</span><span class="cx"> # Cache of IDL file pathnames.
</span><span class="cx"> my $idlFiles;
</span><span class="cx"> my $cachedInterfaces = {};
</span><ins>+my $cachedExternalDictionaries = {};
</ins><span class="cx"> 
</span><span class="cx"> # Default constructor
</span><span class="cx"> sub new
</span><span class="lines">@@ -199,6 +200,14 @@
</span><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">     }
</span><ins>+
+    # It is possible to have dictionaries in an IDL file without any interface.
+    unless (@$interfaces) {
+        foreach my $dictionary (@{$useDocument-&gt;dictionaries}) {
+            $codeGenerator-&gt;GenerateDictionary($dictionary);
+            $codeGenerator-&gt;WriteData($dictionary, $useOutputDir, $useOutputHeadersDir);
+        }
+    }
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub FileNamePrefix
</span><span class="lines">@@ -449,14 +458,6 @@
</span><span class="cx">     return $enumTypeImplementationNameOverrides{$type};
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub IsDictionaryType
-{
-    my ($object, $type) = @_;
-
-    return 1 if exists $dictionaryTypes{$type};
-    return 0;
-}
-
</del><span class="cx"> sub GetDictionaryByName
</span><span class="cx"> {
</span><span class="cx">     my ($object, $name) = @_;
</span><span class="lines">@@ -465,8 +466,47 @@
</span><span class="cx">     for my $dictionary (@{$useDocument-&gt;dictionaries}) {
</span><span class="cx">         return $dictionary if $dictionary-&gt;name eq $name;
</span><span class="cx">     }
</span><ins>+
+    return $cachedExternalDictionaries-&gt;{$name} if exists($cachedExternalDictionaries-&gt;{$name});
+
+    # Find the IDL file associated with the dictionary.
+    my $filename = $object-&gt;IDLFileForInterface($name) or return;
+
+    # Do a fast check to see if it seems to contain a dictionary.
+    my $fileContents = slurp($filename);
+
+    if ($fileContents =~ /\bdictionary\s+$name/gs) {
+        # Parse the IDL.
+        my $parser = IDLParser-&gt;new(1);
+        my $document = $parser-&gt;Parse($filename, $defines, $preprocessor);
+
+        foreach my $dictionary (@{$document-&gt;dictionaries}) {
+            next unless $dictionary-&gt;name eq $name;
+
+            $cachedExternalDictionaries-&gt;{$name} = $dictionary;
+            my $implementedAs = $dictionary-&gt;extendedAttributes-&gt;{ImplementedAs};
+            $dictionaryTypeImplementationNameOverrides{$dictionary-&gt;name} = $implementedAs if $implementedAs;
+            return $dictionary;
+        }
+    }
+    $cachedExternalDictionaries-&gt;{$name} = undef;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub IsDictionaryType
+{
+    my ($object, $type) = @_;
+
+    return $type =~ /^[A-Z]/ &amp;&amp; defined($object-&gt;GetDictionaryByName($type));
+}
+
+# A dictionary defined in its own IDL file.
+sub IsExternalDictionaryType
+{
+    my ($object, $type) = @_;
+
+    return $object-&gt;IsDictionaryType($type) &amp;&amp; defined($cachedExternalDictionaries-&gt;{$type});
+}
+
</ins><span class="cx"> sub HasDictionaryImplementationNameOverride
</span><span class="cx"> {
</span><span class="cx">     my ($object, $type) = @_;
</span><span class="lines">@@ -660,6 +700,16 @@
</span><span class="cx">     return $ret;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub slurp {
+    my $file = shift;
+
+    open my $fh, '&lt;', $file or die;
+    local $/ = undef;
+    my $content = &lt;$fh&gt;;
+    close $fh;
+    return $content;
+}
+
</ins><span class="cx"> sub trim
</span><span class="cx"> {
</span><span class="cx">     my $string = shift;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -120,6 +120,15 @@
</span><span class="cx">     return $reference;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub GenerateDictionary
+{
+    my ($object, $dictionary) = @_;
+
+    my $className = GetDictionaryClassName($dictionary-&gt;name);
+    $object-&gt;GenerateDictionaryHeader($dictionary, $className);
+    $object-&gt;GenerateDictionaryImplementation($dictionary, $className);
+}
+
</ins><span class="cx"> sub GenerateInterface
</span><span class="cx"> {
</span><span class="cx">     my ($object, $interface, $defines, $enumerations, $dictionaries) = @_;
</span><span class="lines">@@ -783,12 +792,13 @@
</span><span class="cx"> 
</span><span class="cx"> sub GetEnumerationClassName
</span><span class="cx"> {
</span><del>-    my ($interface, $name) = @_;
</del><ins>+    my ($name, $interface) = @_;
</ins><span class="cx"> 
</span><span class="cx">     if ($codeGenerator-&gt;HasEnumImplementationNameOverride($name)) {
</span><span class="cx">         return $codeGenerator-&gt;GetEnumImplementationNameOverride($name);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    return $name unless defined($interface);
</ins><span class="cx">     return GetNestedClassName($interface, $name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -802,7 +812,7 @@
</span><span class="cx">     return $name;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub GenerateEnumerationImplementationContent
</del><ins>+sub GenerateEnumerationsImplementationContent
</ins><span class="cx"> {
</span><span class="cx">     my ($interface, $enumerations) = @_;
</span><span class="cx"> 
</span><span class="lines">@@ -812,7 +822,7 @@
</span><span class="cx">     foreach my $enumeration (@$enumerations) {
</span><span class="cx">         my $name = $enumeration-&gt;name;
</span><span class="cx"> 
</span><del>-        my $className = GetEnumerationClassName($interface, $name);
</del><ins>+        my $className = GetEnumerationClassName($name, $interface);
</ins><span class="cx"> 
</span><span class="cx">         # FIXME: A little ugly to have this be a side effect instead of a return value.
</span><span class="cx">         AddToImplIncludes(&quot;&lt;runtime/JSString.h&gt;&quot;);
</span><span class="lines">@@ -888,7 +898,7 @@
</span><span class="cx">     return $result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-sub GenerateEnumerationHeaderContent
</del><ins>+sub GenerateEnumerationsHeaderContent
</ins><span class="cx"> {
</span><span class="cx">     my ($interface, $enumerations) = @_;
</span><span class="cx"> 
</span><span class="lines">@@ -904,7 +914,7 @@
</span><span class="cx">     foreach my $enumeration (@$enumerations) {
</span><span class="cx">         my $name = $enumeration-&gt;name;
</span><span class="cx"> 
</span><del>-        my $className = GetEnumerationClassName($interface, $name);
</del><ins>+        my $className = GetEnumerationClassName($name, $interface);
</ins><span class="cx"> 
</span><span class="cx">         my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($enumeration);
</span><span class="cx">         $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
</span><span class="lines">@@ -926,12 +936,14 @@
</span><span class="cx"> 
</span><span class="cx"> sub GetDictionaryClassName
</span><span class="cx"> {
</span><del>-    my ($interface, $name) = @_;
</del><ins>+    my ($name, $interface) = @_;
</ins><span class="cx"> 
</span><span class="cx">     if ($codeGenerator-&gt;HasDictionaryImplementationNameOverride($name)) {
</span><span class="cx">         return $codeGenerator-&gt;GetDictionaryImplementationNameOverride($name);
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    return $name if $codeGenerator-&gt;IsExternalDictionaryType($name);
+    return $name unless defined($interface);
</ins><span class="cx">     return GetNestedClassName($interface, $name);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -944,7 +956,7 @@
</span><span class="cx">     if ($codeGenerator-&gt;IsEnumType($member-&gt;type)) {
</span><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($interface, $member-&gt;type);
</del><ins>+        my $className = GetEnumerationClassName($member-&gt;type, $interface);
</ins><span class="cx">         my $enumerationValueName = GetEnumerationValueName(substr($value, 1, -1));
</span><span class="cx">         $value = $className . &quot;::&quot; . $enumerationValueName;
</span><span class="cx">     }
</span><span class="lines">@@ -975,6 +987,18 @@
</span><span class="cx"> 
</span><span class="cx"> sub GenerateDictionaryHeaderContent
</span><span class="cx"> {
</span><ins>+    my ($dictionary, $className) = @_;
+
+    my $result = &quot;&quot;;
+    my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
+    $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
+    $result .= &quot;template&lt;&gt; Optional&lt;$className&gt; convertDictionary&lt;$className&gt;(JSC::ExecState&amp;, JSC::JSValue);\n\n&quot;;
+    $result .= &quot;#endif\n\n&quot; if $conditionalString;
+    return $result;
+}
+
+sub GenerateDictionariesHeaderContent
+{
</ins><span class="cx">     my ($interface, $allDictionaries) = @_;
</span><span class="cx"> 
</span><span class="cx">     return &quot;&quot; unless @$allDictionaries;
</span><span class="lines">@@ -983,17 +1007,9 @@
</span><span class="cx"> 
</span><span class="cx">     my $result = &quot;&quot;;
</span><span class="cx">     foreach my $dictionary (@$allDictionaries) {
</span><del>-        my $name = $dictionary-&gt;name;
-
-        my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
-        $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
-
</del><span class="cx">         $headerIncludes{$interface-&gt;name . &quot;.h&quot;} = 1;
</span><del>-
-        my $className = GetDictionaryClassName($interface, $name);
-        $result .= &quot;template&lt;&gt; Optional&lt;$className&gt; convertDictionary&lt;$className&gt;(JSC::ExecState&amp;, JSC::JSValue);\n\n&quot;;
-
-        $result .= &quot;#endif\n\n&quot; if $conditionalString;
</del><ins>+        my $className = GetDictionaryClassName($dictionary-&gt;name, $interface);
+        $result .= GenerateDictionaryHeaderContent($dictionary, $className);
</ins><span class="cx">     }
</span><span class="cx">     return $result;
</span><span class="cx"> }
</span><span class="lines">@@ -1000,126 +1016,136 @@
</span><span class="cx"> 
</span><span class="cx"> sub GenerateDictionaryImplementationContent
</span><span class="cx"> {
</span><del>-    my ($interface, $allDictionaries) = @_;
</del><ins>+    my ($dictionary, $className, $interface) = @_;
</ins><span class="cx"> 
</span><span class="cx">     my $result = &quot;&quot;;
</span><del>-    foreach my $dictionary (@$allDictionaries) {
-        my $name = $dictionary-&gt;name;
</del><span class="cx"> 
</span><del>-        my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
-        $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
</del><ins>+    my $name = $dictionary-&gt;name;
</ins><span class="cx"> 
</span><del>-        my $className = GetDictionaryClassName($interface, $name);
</del><ins>+    my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
+    $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
</ins><span class="cx"> 
</span><del>-        # FIXME: A little ugly to have this be a side effect instead of a return value.
-        AddToImplIncludes(&quot;JSDOMConvert.h&quot;);
</del><ins>+    # FIXME: A little ugly to have this be a side effect instead of a return value.
+    AddToImplIncludes(&quot;JSDOMConvert.h&quot;);
</ins><span class="cx"> 
</span><del>-        # https://heycam.github.io/webidl/#es-dictionary
-        $result .= &quot;template&lt;&gt; Optional&lt;$className&gt; convertDictionary&lt;$className&gt;(ExecState&amp; state, JSValue value)\n&quot;;
-        $result .= &quot;{\n&quot;;
-        $result .= &quot;    VM&amp; vm = state.vm();\n&quot;;
-        $result .= &quot;    auto throwScope = DECLARE_THROW_SCOPE(vm);\n&quot;;
-        $result .= &quot;    bool isNullOrUndefined = value.isUndefinedOrNull();\n&quot;;
-        $result .= &quot;    auto* object = isNullOrUndefined ? nullptr : value.getObject();\n&quot;;
-        # 1. If Type(V) is not Undefined, Null or Object, then throw a TypeError.
-        $result .= &quot;    if (UNLIKELY(!isNullOrUndefined &amp;&amp; !object)) {\n&quot;;
-        $result .= &quot;        throwTypeError(&amp;state, throwScope);\n&quot;;
-        $result .= &quot;        return Nullopt;\n&quot;;
-        $result .= &quot;    }\n&quot;;
</del><ins>+    # https://heycam.github.io/webidl/#es-dictionary
+    $result .= &quot;template&lt;&gt; Optional&lt;$className&gt; convertDictionary&lt;$className&gt;(ExecState&amp; state, JSValue value)\n&quot;;
+    $result .= &quot;{\n&quot;;
+    $result .= &quot;    VM&amp; vm = state.vm();\n&quot;;
+    $result .= &quot;    auto throwScope = DECLARE_THROW_SCOPE(vm);\n&quot;;
+    $result .= &quot;    bool isNullOrUndefined = value.isUndefinedOrNull();\n&quot;;
+    $result .= &quot;    auto* object = isNullOrUndefined ? nullptr : value.getObject();\n&quot;;
+    # 1. If Type(V) is not Undefined, Null or Object, then throw a TypeError.
+    $result .= &quot;    if (UNLIKELY(!isNullOrUndefined &amp;&amp; !object)) {\n&quot;;
+    $result .= &quot;        throwTypeError(&amp;state, throwScope);\n&quot;;
+    $result .= &quot;        return Nullopt;\n&quot;;
+    $result .= &quot;    }\n&quot;;
</ins><span class="cx"> 
</span><del>-        # 2. If V is a native RegExp object, then throw a TypeError.
-        # FIXME: This RegExp special handling is likely to go away in the specification.
-        $result .= &quot;    if (UNLIKELY(object &amp;&amp; object-&gt;type() == RegExpObjectType)) {\n&quot;;
-        $result .= &quot;        throwTypeError(&amp;state, throwScope);\n&quot;;
-        $result .= &quot;        return Nullopt;\n&quot;;
-        $result .= &quot;    }\n&quot;;
</del><ins>+    # 2. If V is a native RegExp object, then throw a TypeError.
+    # FIXME: This RegExp special handling is likely to go away in the specification.
+    $result .= &quot;    if (UNLIKELY(object &amp;&amp; object-&gt;type() == RegExpObjectType)) {\n&quot;;
+    $result .= &quot;        throwTypeError(&amp;state, throwScope);\n&quot;;
+    $result .= &quot;        return Nullopt;\n&quot;;
+    $result .= &quot;    }\n&quot;;
</ins><span class="cx"> 
</span><del>-        # 3. Let dict be an empty dictionary value of type D; every dictionary member is initially considered to be not present.
</del><ins>+    # 3. Let dict be an empty dictionary value of type D; every dictionary member is initially considered to be not present.
</ins><span class="cx"> 
</span><del>-        # 4. Let dictionaries be a list consisting of D and all of D’s inherited dictionaries, in order from least to most derived.
-        my @dictionaries;
-        push(@dictionaries, $dictionary);
-        my $parentDictionary = $codeGenerator-&gt;GetDictionaryByName($dictionary-&gt;parent);
-        while (defined($parentDictionary)) {
-            unshift(@dictionaries, $parentDictionary);
-            $parentDictionary = $codeGenerator-&gt;GetDictionaryByName($parentDictionary-&gt;parent);
-        }
</del><ins>+    # 4. Let dictionaries be a list consisting of D and all of D’s inherited dictionaries, in order from least to most derived.
+    my @dictionaries;
+    push(@dictionaries, $dictionary);
+    my $parentDictionary = $codeGenerator-&gt;GetDictionaryByName($dictionary-&gt;parent);
+    while (defined($parentDictionary)) {
+        unshift(@dictionaries, $parentDictionary);
+        $parentDictionary = $codeGenerator-&gt;GetDictionaryByName($parentDictionary-&gt;parent);
+    }
</ins><span class="cx"> 
</span><del>-        my $arguments = &quot;&quot;;
-        my $comma = &quot;&quot;;
</del><ins>+    my $arguments = &quot;&quot;;
+    my $comma = &quot;&quot;;
</ins><span class="cx"> 
</span><del>-        # 5. For each dictionary dictionary in dictionaries, in order:
-        foreach my $dictionary (@dictionaries) {
-            # For each dictionary member member declared on dictionary, in lexicographical order:
-            my @sortedMembers = sort { $a-&gt;name cmp $b-&gt;name } @{$dictionary-&gt;members};
-            foreach my $member (@sortedMembers) {
-                $member-&gt;default(&quot;undefined&quot;) if $member-&gt;type eq &quot;any&quot;; # Use undefined as default value for member of type 'any'.
</del><ins>+    # 5. For each dictionary dictionary in dictionaries, in order:
+    foreach my $dictionary (@dictionaries) {
+        # For each dictionary member member declared on dictionary, in lexicographical order:
+        my @sortedMembers = sort { $a-&gt;name cmp $b-&gt;name } @{$dictionary-&gt;members};
+        foreach my $member (@sortedMembers) {
+            $member-&gt;default(&quot;undefined&quot;) if $member-&gt;type eq &quot;any&quot;; # Use undefined as default value for member of type 'any'.
</ins><span class="cx"> 
</span><del>-                my $type = $member-&gt;type;
</del><ins>+            my $type = $member-&gt;type;
</ins><span class="cx"> 
</span><del>-                # 5.1. Let key be the identifier of member.
-                my $key = $member-&gt;name;
</del><ins>+            # 5.1. Let key be the identifier of member.
+            my $key = $member-&gt;name;
</ins><span class="cx"> 
</span><del>-                # 5.2. Let value be an ECMAScript value, depending on Type(V):
-                $result .= &quot;    JSValue ${key}Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, \&quot;${key}\&quot;));\n&quot;;
</del><ins>+            # 5.2. Let value be an ECMAScript value, depending on Type(V):
+            $result .= &quot;    JSValue ${key}Value = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, \&quot;${key}\&quot;));\n&quot;;
</ins><span class="cx"> 
</span><del>-                my $nativeType = GetNativeTypeFromSignature($interface, $member);
-                if ($member-&gt;isOptional &amp;&amp; !defined $member-&gt;default) {
-                    $result .= &quot;    Converter&lt;$nativeType&gt;::OptionalValue $key;\n&quot;;
-                } else {
-                    $result .= &quot;    $nativeType $key;\n&quot;;
-                }
</del><ins>+            my $nativeType = GetNativeTypeFromSignature($interface, $member);
+            if ($member-&gt;isOptional &amp;&amp; !defined $member-&gt;default) {
+                $result .= &quot;    Converter&lt;$nativeType&gt;::OptionalValue $key;\n&quot;;
+            } else {
+                $result .= &quot;    $nativeType $key;\n&quot;;
+            }
</ins><span class="cx"> 
</span><del>-                # 5.3. If value is not undefined, then:
-                $result .= &quot;    if (!${key}Value.isUndefined()) {\n&quot;;
-                # FIXME: Eventually we will want this to share a lot more code with JSValueToNative.
-                if ($codeGenerator-&gt;IsWrapperType($type)) {
-                    AddToImplIncludes(&quot;JS${type}.h&quot;);
-                    die &quot;Dictionary members of non-nullable wrapper types must be marked as required&quot; if !$member-&gt;isNullable &amp;&amp; $member-&gt;isOptional;
-                    my $nullableParameter = $member-&gt;isNullable ? &quot;IsNullable::Yes&quot; : &quot;IsNullable::No&quot;;
-                    $result .= &quot;        $key = convertWrapperType&lt;$type, JS${type}&gt;(state, ${key}Value, $nullableParameter);\n&quot;;
-                } elsif ($codeGenerator-&gt;IsDictionaryType($type)) {
-                    my $nativeType = GetNativeType($interface, $type);
-                    $result .= &quot;        $key = convertDictionary&lt;${nativeType}&gt;(state, ${key}Value);\n&quot;;
-                } else {
-                    my $conversionRuleWithLeadingComma = GenerateConversionRuleWithLeadingComma($interface, $member);
-                    $result .= &quot;        $key = convert&lt;${nativeType}&gt;(state, ${key}Value${conversionRuleWithLeadingComma});\n&quot;;
-                }
-                $result .= &quot;        RETURN_IF_EXCEPTION(throwScope, Nullopt);\n&quot;;
-                # Value is undefined.
-                # 5.4. Otherwise, if value is undefined but the dictionary member has a default value, then:
-                if ($member-&gt;isOptional &amp;&amp; defined $member-&gt;default) {
-                    $result .= &quot;    } else\n&quot;;
-                    $result .= &quot;        $key = &quot; . GenerateDefaultValue($interface, $member) . &quot;;\n&quot;;
-                } elsif (!$member-&gt;isOptional) {
-                    # 5.5. Otherwise, if value is undefined and the dictionary member is a required dictionary member, then throw a TypeError.
-                    $result .= &quot;    } else {\n&quot;;
-                    $result .= &quot;        throwTypeError(&amp;state, throwScope);\n&quot;;
-                    $result .= &quot;        return Nullopt;\n&quot;;
-                    $result .= &quot;    }\n&quot;;
-                } else {
-                    $result .= &quot;    }\n&quot;;
-                }
</del><ins>+            # 5.3. If value is not undefined, then:
+            $result .= &quot;    if (!${key}Value.isUndefined()) {\n&quot;;
+            # FIXME: Eventually we will want this to share a lot more code with JSValueToNative.
+            if ($codeGenerator-&gt;IsWrapperType($type)) {
+                AddToImplIncludes(&quot;JS${type}.h&quot;);
+                die &quot;Dictionary members of non-nullable wrapper types must be marked as required&quot; if !$member-&gt;isNullable &amp;&amp; $member-&gt;isOptional;
+                my $nullableParameter = $member-&gt;isNullable ? &quot;IsNullable::Yes&quot; : &quot;IsNullable::No&quot;;
+                $result .= &quot;        $key = convertWrapperType&lt;$type, JS${type}&gt;(state, ${key}Value, $nullableParameter);\n&quot;;
+            } elsif ($codeGenerator-&gt;IsDictionaryType($type)) {
+                my $nativeType = GetNativeType($interface, $type);
+                $result .= &quot;        $key = convertDictionary&lt;${nativeType}&gt;(state, ${key}Value);\n&quot;;
+            } else {
+                my $conversionRuleWithLeadingComma = GenerateConversionRuleWithLeadingComma($interface, $member);
+                $result .= &quot;        $key = convert&lt;${nativeType}&gt;(state, ${key}Value${conversionRuleWithLeadingComma});\n&quot;;
</ins><span class="cx">             }
</span><ins>+            $result .= &quot;        RETURN_IF_EXCEPTION(throwScope, Nullopt);\n&quot;;
+            # Value is undefined.
+            # 5.4. Otherwise, if value is undefined but the dictionary member has a default value, then:
+            if ($member-&gt;isOptional &amp;&amp; defined $member-&gt;default) {
+                $result .= &quot;    } else\n&quot;;
+                $result .= &quot;        $key = &quot; . GenerateDefaultValue($interface, $member) . &quot;;\n&quot;;
+            } elsif (!$member-&gt;isOptional) {
+                # 5.5. Otherwise, if value is undefined and the dictionary member is a required dictionary member, then throw a TypeError.
+                $result .= &quot;    } else {\n&quot;;
+                $result .= &quot;        throwTypeError(&amp;state, throwScope);\n&quot;;
+                $result .= &quot;        return Nullopt;\n&quot;;
+                $result .= &quot;    }\n&quot;;
+            } else {
+                $result .= &quot;    }\n&quot;;
+            }
+        }
</ins><span class="cx"> 
</span><del>-            # 6. Return dict.
-            foreach my $member (@{$dictionary-&gt;members}) {
-                my $value;
-                if ($codeGenerator-&gt;IsWrapperType($member-&gt;type) &amp;&amp; !$member-&gt;isNullable) {
-                    $value = &quot;*&quot; . $member-&gt;name;
-                } elsif ($codeGenerator-&gt;IsDictionaryType($member-&gt;type)) {
-                    $value = $member-&gt;name . &quot;.value()&quot;;
-                } else {
-                    $value = &quot;WTFMove(&quot; . $member-&gt;name . &quot;)&quot;;
-                }
-                $arguments .= $comma . $value;
-                $comma = &quot;, &quot;;
</del><ins>+        # 6. Return dict.
+        foreach my $member (@{$dictionary-&gt;members}) {
+            my $value;
+            if ($codeGenerator-&gt;IsWrapperType($member-&gt;type) &amp;&amp; !$member-&gt;isNullable) {
+                $value = &quot;*&quot; . $member-&gt;name;
+            } elsif ($codeGenerator-&gt;IsDictionaryType($member-&gt;type)) {
+                $value = $member-&gt;name . &quot;.value()&quot;;
+            } else {
+                $value = &quot;WTFMove(&quot; . $member-&gt;name . &quot;)&quot;;
</ins><span class="cx">             }
</span><ins>+            $arguments .= $comma . $value;
+            $comma = &quot;, &quot;;
</ins><span class="cx">         }
</span><ins>+    }
</ins><span class="cx"> 
</span><del>-        $result .= &quot;    return $className { &quot; . $arguments . &quot; };\n&quot;;
-        $result .= &quot;}\n\n&quot;;
-        $result .= &quot;#endif\n\n&quot; if $conditionalString;
</del><ins>+    $result .= &quot;    return $className { &quot; . $arguments . &quot; };\n&quot;;
+    $result .= &quot;}\n\n&quot;;
+    $result .= &quot;#endif\n\n&quot; if $conditionalString;
+
+    return $result;
+}
+
+sub GenerateDictionariesImplementationContent
+{
+    my ($interface, $allDictionaries) = @_;
+
+    my $result = &quot;&quot;;
+    foreach my $dictionary (@$allDictionaries) {
+        my $className = GetDictionaryClassName($dictionary-&gt;name, $interface);
+        $result .= GenerateDictionaryImplementationContent($dictionary, $className, $interface);
</ins><span class="cx">     }
</span><span class="cx">     return $result;
</span><span class="cx"> }
</span><span class="lines">@@ -1618,8 +1644,8 @@
</span><span class="cx">         push(@headerContent, &quot;};\n&quot;);
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    push(@headerContent, GenerateEnumerationHeaderContent($interface, $enumerations));
-    push(@headerContent, GenerateDictionaryHeaderContent($interface, $dictionaries));
</del><ins>+    push(@headerContent, GenerateEnumerationsHeaderContent($interface, $enumerations));
+    push(@headerContent, GenerateDictionariesHeaderContent($interface, $dictionaries));
</ins><span class="cx"> 
</span><span class="cx">     my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($interface);
</span><span class="cx">     push(@headerContent, &quot;\n} // namespace WebCore\n&quot;);
</span><span class="lines">@@ -2339,8 +2365,8 @@
</span><span class="cx">     push(@implContent, &quot;\nusing namespace JSC;\n\n&quot;);
</span><span class="cx">     push(@implContent, &quot;namespace WebCore {\n\n&quot;);
</span><span class="cx"> 
</span><del>-    push(@implContent, GenerateEnumerationImplementationContent($interface, $enumerations));
-    push(@implContent, GenerateDictionaryImplementationContent($interface, $dictionaries));
</del><ins>+    push(@implContent, GenerateEnumerationsImplementationContent($interface, $enumerations));
+    push(@implContent, GenerateDictionariesImplementationContent($interface, $dictionaries));
</ins><span class="cx"> 
</span><span class="cx">     my @functions = @{$interface-&gt;functions};
</span><span class="cx">     push(@functions, @{$interface-&gt;iterable-&gt;functions}) if IsKeyValueIterableInterface($interface);
</span><span class="lines">@@ -4040,7 +4066,7 @@
</span><span class="cx">             $value = &quot;WTFMove($name.arguments.value())&quot;;
</span><span class="cx"> 
</span><span class="cx">         } elsif ($codeGenerator-&gt;IsEnumType($type)) {
</span><del>-            my $className = GetEnumerationClassName($interface, $type);
</del><ins>+            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">@@ -4174,6 +4200,36 @@
</span><span class="cx">     return @arguments;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub GenerateDictionaryHeader
+{
+    my ($object, $dictionary, $className) = @_;
+
+    my $dictionaryName = $dictionary-&gt;name;
+
+    # - Add default header template and header protection.
+    push(@headerContentHeader, GenerateHeaderContentHeader($dictionary));
+
+    $headerIncludes{&quot;$dictionaryName.h&quot;} = 1;
+    $headerIncludes{&quot;JSDOMConvert.h&quot;} = 1;
+
+    push(@headerContent, &quot;\nnamespace WebCore {\n\n&quot;);
+    push(@headerContent, GenerateDictionaryHeaderContent($dictionary, $className));
+    push(@headerContent, &quot;} // namespace WebCore\n&quot;);
+}
+
+sub GenerateDictionaryImplementation
+{
+    my ($object, $dictionary, $className) = @_;
+
+    # - Add default header template
+    push(@implContentHeader, GenerateImplementationContentHeader($dictionary));
+
+    push(@implContent, &quot;\nusing namespace JSC;\n\n&quot;);
+    push(@implContent, &quot;namespace WebCore {\n\n&quot;);
+    push(@implContent, GenerateDictionaryImplementationContent($dictionary, $className));
+    push(@implContent, &quot;} // namespace WebCore\n&quot;);
+}
+
</ins><span class="cx"> sub GenerateCallbackHeader
</span><span class="cx"> {
</span><span class="cx">     my ($object, $interface, $enumerations, $dictionaries) = @_;
</span><span class="lines">@@ -4235,8 +4291,8 @@
</span><span class="cx">     push(@headerContent, &quot;JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $interfaceName&amp;);\n&quot;);
</span><span class="cx">     push(@headerContent, &quot;inline JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, $interfaceName* impl) { return impl ? toJS(state, globalObject, *impl) : JSC::jsNull(); }\n\n&quot;);
</span><span class="cx"> 
</span><del>-    push(@headerContent, GenerateEnumerationHeaderContent($interface, $enumerations));
-    push(@headerContent, GenerateDictionaryHeaderContent($interface, $dictionaries));
</del><ins>+    push(@headerContent, GenerateEnumerationsHeaderContent($interface, $enumerations));
+    push(@headerContent, GenerateDictionariesHeaderContent($interface, $dictionaries));
</ins><span class="cx"> 
</span><span class="cx">     push(@headerContent, &quot;} // namespace WebCore\n&quot;);
</span><span class="cx"> 
</span><span class="lines">@@ -4263,8 +4319,8 @@
</span><span class="cx">     push(@implContent, &quot;\nusing namespace JSC;\n\n&quot;);
</span><span class="cx">     push(@implContent, &quot;namespace WebCore {\n\n&quot;);
</span><span class="cx"> 
</span><del>-    push(@implContent, GenerateEnumerationImplementationContent($interface, $enumerations));
-    push(@implContent, GenerateDictionaryImplementationContent($interface, $dictionaries));
</del><ins>+    push(@implContent, GenerateEnumerationsImplementationContent($interface, $enumerations));
+    push(@implContent, GenerateDictionariesImplementationContent($interface, $dictionaries));
</ins><span class="cx"> 
</span><span class="cx">     # Constructor
</span><span class="cx">     push(@implContent, &quot;${className}::${className}(JSObject* callback, JSDOMGlobalObject* globalObject)\n&quot;);
</span><span class="lines">@@ -4650,8 +4706,8 @@
</span><span class="cx"> 
</span><span class="cx">     return $nativeType{$type} if exists $nativeType{$type};
</span><span class="cx"> 
</span><del>-    return GetEnumerationClassName($interface, $type) if $codeGenerator-&gt;IsEnumType($type);
-    return GetDictionaryClassName($interface, $type) if $codeGenerator-&gt;IsDictionaryType($type);
</del><ins>+    return GetEnumerationClassName($type, $interface) if $codeGenerator-&gt;IsEnumType($type);
+    return GetDictionaryClassName($type, $interface) if $codeGenerator-&gt;IsDictionaryType($type);
</ins><span class="cx"> 
</span><span class="cx">     my $tearOffType = $codeGenerator-&gt;GetSVGTypeNeedingTearOff($type);
</span><span class="cx">     return &quot;${tearOffType}*&quot; if $tearOffType;
</span><span class="lines">@@ -4811,8 +4867,12 @@
</span><span class="cx">     return (&quot;valueToDate(state, $value)&quot;, 1) if $type eq &quot;Date&quot;;
</span><span class="cx"> 
</span><span class="cx">     return (&quot;to$type($value)&quot;, 1) if $codeGenerator-&gt;IsTypedArrayType($type);
</span><del>-    return (&quot;parse&lt;&quot; . GetEnumerationClassName($interface, $type) . &quot;&gt;(*state, $value)&quot;, 1) if $codeGenerator-&gt;IsEnumType($type);
-    return (&quot;convertDictionary&lt;&quot; . GetDictionaryClassName($interface, $type) . &quot;&gt;(*state, $value)&quot;, 1) if $codeGenerator-&gt;IsDictionaryType($type);
</del><ins>+    return (&quot;parse&lt;&quot; . GetEnumerationClassName($type, $interface) . &quot;&gt;(*state, $value)&quot;, 1) if $codeGenerator-&gt;IsEnumType($type);
+    if ($codeGenerator-&gt;IsDictionaryType($type)) {
+        my $dictionary = $codeGenerator-&gt;GetDictionaryByName($type);
+        AddToImplIncludes(&quot;JS$type.h&quot;, $conditional) if $codeGenerator-&gt;IsExternalDictionaryType($type);
+        return (&quot;convertDictionary&lt;&quot; . GetDictionaryClassName($type, $interface) . &quot;&gt;(*state, $value)&quot;, 1);
+    }
</ins><span class="cx"> 
</span><span class="cx">     AddToImplIncludes(&quot;JS$type.h&quot;, $conditional);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptspreprocessidlspl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/bindings/scripts/preprocess-idls.pl        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -94,6 +94,13 @@
</span><span class="cx">         $supplementalDependencies{$fullPath} = [$partialInterfaceName];
</span><span class="cx">         next;
</span><span class="cx">     }
</span><ins>+
+    $supplementals{$fullPath} = [];
+
+    # Skip if the IDL file does not contain an interface, a callback interface or an exception.
+    # The IDL may contain a dictionary.
+    next unless containsInterfaceOrExceptionFromIDL($idlFileContents);
+
</ins><span class="cx">     my $interfaceName = fileparse(basename($idlFile), &quot;.idl&quot;);
</span><span class="cx">     # Handle implements statements.
</span><span class="cx">     my $implementedInterfaces = getImplementedInterfacesFromIDL($idlFileContents, $interfaceName);
</span><span class="lines">@@ -132,7 +139,6 @@
</span><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span><del>-    $supplementals{$fullPath} = [];
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> # Generate partial interfaces for Constructors.
</span><span class="lines">@@ -305,6 +311,16 @@
</span><span class="cx">     return ($fileContents =~ /callback\s+interface\s+\w+/gs);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub containsInterfaceOrExceptionFromIDL
+{
+    my $fileContents = shift;
+
+    return 1 if $fileContents =~ /\bcallback\s+interface\s+\w+/gs;
+    return 1 if $fileContents =~ /\binterface\s+\w+/gs;
+    return 1 if $fileContents =~ /\bexception\s+\w+/gs;
+    return 0;
+}
+
</ins><span class="cx"> sub trim
</span><span class="cx"> {
</span><span class="cx">     my $string = shift;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -50,6 +50,7 @@
</span><span class="cx"> #include &quot;JSTestCallbackFunction.h&quot;
</span><span class="cx"> #include &quot;JSTestNode.h&quot;
</span><span class="cx"> #include &quot;JSTestObj.h&quot;
</span><ins>+#include &quot;JSTestStandaloneDictionary.h&quot;
</ins><span class="cx"> #include &quot;JSTestSubObj.h&quot;
</span><span class="cx"> #include &quot;JSXPathNSResolver.h&quot;
</span><span class="cx"> #include &quot;ObjectConstructor.h&quot;
</span><span class="lines">@@ -998,6 +999,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionSingleConditionalOverload(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionAttachShadowRoot(JSC::ExecState*);
</span><ins>+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter(JSC::ExecState*);
</ins><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionToString(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionToJSON(JSC::ExecState*);
</span><span class="cx"> 
</span><span class="lines">@@ -1604,6 +1606,7 @@
</span><span class="cx"> #endif
</span><span class="cx">     { &quot;singleConditionalOverload&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionSingleConditionalOverload), (intptr_t) (1) } },
</span><span class="cx">     { &quot;attachShadowRoot&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionAttachShadowRoot), (intptr_t) (1) } },
</span><ins>+    { &quot;operationWithExternalDictionaryParameter&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter), (intptr_t) (1) } },
</ins><span class="cx">     { &quot;toString&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionToString), (intptr_t) (0) } },
</span><span class="cx">     { &quot;toJSON&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionToJSON), (intptr_t) (0) } },
</span><span class="cx"> #if ENABLE(Condition1)
</span><span class="lines">@@ -7601,6 +7604,25 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionOperationWithExternalDictionaryParameter(ExecState* state)
+{
+    VM&amp; vm = state-&gt;vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    UNUSED_PARAM(throwScope);
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, throwScope, &quot;TestObject&quot;, &quot;operationWithExternalDictionaryParameter&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    if (UNLIKELY(state-&gt;argumentCount() &lt; 1))
+        return throwVMError(state, throwScope, createNotEnoughArgumentsError(state));
+    auto dict = convertDictionary&lt;TestStandaloneDictionary&gt;(*state, state-&gt;uncheckedArgument(0));
+    RETURN_IF_EXCEPTION(throwScope, encodedJSValue());
+    impl.operationWithExternalDictionaryParameter(dict.value());
+    return JSValue::encode(jsUndefined());
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionToString(ExecState* state)
</span><span class="cx"> {
</span><span class="cx">     VM&amp; vm = state-&gt;vm();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestStandaloneDictionarycpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp (0 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -0,0 +1,58 @@
</span><ins>+/*
+    This file is part of the WebKit open source project.
+    This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#include &quot;config.h&quot;
+#include &quot;JSTestStandaloneDictionary.h&quot;
+
+
+using namespace JSC;
+
+namespace WebCore {
+
+template&lt;&gt; Optional&lt;TestStandaloneDictionary&gt; convertDictionary&lt;TestStandaloneDictionary&gt;(ExecState&amp; state, JSValue value)
+{
+    VM&amp; vm = state.vm();
+    auto throwScope = DECLARE_THROW_SCOPE(vm);
+    bool isNullOrUndefined = value.isUndefinedOrNull();
+    auto* object = isNullOrUndefined ? nullptr : value.getObject();
+    if (UNLIKELY(!isNullOrUndefined &amp;&amp; !object)) {
+        throwTypeError(&amp;state, throwScope);
+        return Nullopt;
+    }
+    if (UNLIKELY(object &amp;&amp; object-&gt;type() == RegExpObjectType)) {
+        throwTypeError(&amp;state, throwScope);
+        return Nullopt;
+    }
+    JSValue boolMemberValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;boolMember&quot;));
+    Converter&lt;bool&gt;::OptionalValue boolMember;
+    if (!boolMemberValue.isUndefined()) {
+        boolMember = convert&lt;bool&gt;(state, boolMemberValue);
+        RETURN_IF_EXCEPTION(throwScope, Nullopt);
+    }
+    JSValue stringMemberValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;stringMember&quot;));
+    Converter&lt;String&gt;::OptionalValue stringMember;
+    if (!stringMemberValue.isUndefined()) {
+        stringMember = convert&lt;String&gt;(state, stringMemberValue);
+        RETURN_IF_EXCEPTION(throwScope, Nullopt);
+    }
+    return TestStandaloneDictionary { WTFMove(boolMember), WTFMove(stringMember) };
+}
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestStandaloneDictionaryh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.h (0 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.h                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.h        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -0,0 +1,30 @@
</span><ins>+/*
+    This file is part of the WebKit open source project.
+    This file has been generated by generate-bindings.pl. DO NOT MODIFY!
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU Library General Public License
+    along with this library; see the file COPYING.LIB.  If not, write to
+    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+    Boston, MA 02110-1301, USA.
+*/
+
+#pragma once
+
+#include &quot;JSDOMConvert.h&quot;
+#include &quot;TestStandaloneDictionary.h&quot;
+
+namespace WebCore {
+
+template&lt;&gt; Optional&lt;TestStandaloneDictionary&gt; convertDictionary&lt;TestStandaloneDictionary&gt;(JSC::ExecState&amp;, JSC::JSValue);
+
+} // namespace WebCore
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -409,6 +409,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     void attachShadowRoot(TestDictionary init);
</span><ins>+    void operationWithExternalDictionaryParameter(TestStandaloneDictionary dict);
</ins><span class="cx"> 
</span><span class="cx">     stringifier attribute USVString stringifierAttribute;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestStandaloneDictionaryidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl (0 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl                                (rev 0)
+++ trunk/Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -0,0 +1,32 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary form, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+dictionary TestStandaloneDictionary {
+    boolean boolMember;
+    DOMString stringMember;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCoredomElementh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.h (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.h        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/dom/Element.h        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #include &quot;ElementData.h&quot;
</span><span class="cx"> #include &quot;HTMLNames.h&quot;
</span><span class="cx"> #include &quot;RegionOversetState.h&quot;
</span><ins>+#include &quot;ScrollToOptions.h&quot;
</ins><span class="cx"> #include &quot;ScrollTypes.h&quot;
</span><span class="cx"> #include &quot;SimulatedClickOptions.h&quot;
</span><span class="cx"> #include &quot;StyleChange.h&quot;
</span><span class="lines">@@ -136,11 +137,6 @@
</span><span class="cx">     WEBCORE_EXPORT void scrollIntoViewIfNeeded(bool centerIfNeeded = true);
</span><span class="cx">     WEBCORE_EXPORT void scrollIntoViewIfNotVisible(bool centerIfNotVisible = true);
</span><span class="cx"> 
</span><del>-    struct ScrollToOptions {
-        Optional&lt;double&gt; left;
-        Optional&lt;double&gt; top;
-    };
-
</del><span class="cx">     void scrollBy(const ScrollToOptions&amp;);
</span><span class="cx">     void scrollBy(double x, double y);
</span><span class="cx">     virtual void scrollTo(const ScrollToOptions&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.idl (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.idl        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/dom/Element.idl        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -185,12 +185,6 @@
</span><span class="cx">     required ShadowRootMode mode;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-// FIXME: Support ScrollBehavior.
-dictionary ScrollToOptions {
-    unrestricted double left;
-    unrestricted double top;
-};
-
</del><span class="cx"> Element implements Animatable;
</span><span class="cx"> Element implements ChildNode;
</span><span class="cx"> Element implements NonDocumentTypeChildNode;
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLBodyElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLBodyElement.cpp (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLBodyElement.cpp        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/html/HTMLBodyElement.cpp        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -306,7 +306,7 @@
</span><span class="cx">         if (!window)
</span><span class="cx">             return;
</span><span class="cx"> 
</span><del>-        window-&gt;scrollTo({ options.left, options.top });
</del><ins>+        window-&gt;scrollTo(options);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     return HTMLElement::scrollTo(options);
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.h (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.h        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/page/DOMWindow.h        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -30,8 +30,9 @@
</span><span class="cx"> #include &quot;ContextDestructionObserver.h&quot;
</span><span class="cx"> #include &quot;EventTarget.h&quot;
</span><span class="cx"> #include &quot;FrameDestructionObserver.h&quot;
</span><ins>+#include &quot;ScrollToOptions.h&quot;
+#include &quot;Supplementable.h&quot;
</ins><span class="cx"> #include &quot;URL.h&quot;
</span><del>-#include &quot;Supplementable.h&quot;
</del><span class="cx"> #include &lt;functional&gt;
</span><span class="cx"> #include &lt;memory&gt;
</span><span class="cx"> #include &lt;wtf/HashSet.h&gt;
</span><span class="lines">@@ -246,11 +247,6 @@
</span><span class="cx">         void postMessageTimerFired(PostMessageTimer&amp;);
</span><span class="cx">         void dispatchMessageEventWithOriginCheck(SecurityOrigin* intendedTargetOrigin, Event&amp;, PassRefPtr&lt;Inspector::ScriptCallStack&gt;);
</span><span class="cx"> 
</span><del>-        struct ScrollToOptions {
-            Optional&lt;double&gt; left;
-            Optional&lt;double&gt; top;
-        };
-
</del><span class="cx">         void scrollBy(const ScrollToOptions&amp;) const;
</span><span class="cx">         void scrollBy(double x, double y) const;
</span><span class="cx">         void scrollTo(const ScrollToOptions&amp;) const;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMWindowidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMWindow.idl (206876 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMWindow.idl        2016-10-06 20:13:50 UTC (rev 206876)
+++ trunk/Source/WebCore/page/DOMWindow.idl        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -211,12 +211,6 @@
</span><span class="cx">     [NotEnumerable, Conditional=PROXIMITY_EVENTS] attribute EventHandler onwebkitdeviceproximity;
</span><span class="cx"> };
</span><span class="cx"> 
</span><del>-// FIXME: Support ScrollBehavior.
-dictionary ScrollToOptions {
-    unrestricted double left;
-    unrestricted double top;
-};
-
</del><span class="cx"> DOMWindow implements GlobalCrypto;
</span><span class="cx"> DOMWindow implements GlobalEventHandlers;
</span><span class="cx"> DOMWindow implements WindowEventHandlers;
</span></span></pre></div>
<a id="trunkSourceWebCorepageScrollToOptionsh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/ScrollToOptions.h (0 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ScrollToOptions.h                                (rev 0)
+++ trunk/Source/WebCore/page/ScrollToOptions.h        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include &lt;wtf/Optional.h&gt;
+
+namespace WebCore {
+
+struct ScrollToOptions {
+    Optional&lt;double&gt; left;
+    Optional&lt;double&gt; top;
+};
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCorepageScrollToOptionsidl"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/page/ScrollToOptions.idl (0 => 206877)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ScrollToOptions.idl                                (rev 0)
+++ trunk/Source/WebCore/page/ScrollToOptions.idl        2016-10-06 20:22:16 UTC (rev 206877)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+// FIXME: Support ScrollBehavior.
+dictionary ScrollToOptions {
+    unrestricted double left;
+    unrestricted double top;
+};
</ins></span></pre>
</div>
</div>

</body>
</html>