<!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>[207766] 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/207766">207766</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-10-24 11:12:01 -0700 (Mon, 24 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[CodeGeneratorJS] Standalone dictionaries have misplaced build guards
https://bugs.webkit.org/show_bug.cgi?id=163881

Patch by Zan Dobersek &lt;zdobersek@igalia.com&gt; on 2016-10-24
Reviewed by Chris Dumez.

Build guards that are generated from the Conditional attribute
on WebIDL dictionary declarations properly guard the relevant
convertDictionary() functions for WebIDL files that also specify
interfaces. But for standalone dictionaries these build guards
should guard the complete header and implementation files, much
like this is done for files that originate from interfaces or
callbacks.

Before this patch, guarding a standalone dictionary resulted in
malformed output because GenerateHeaderContentHeader() and
GenerateImplementationContentHeader() functions both generated
the #if macro that would guard the whole file, but
GenerateDictionary{Header,Implementation}() didn't generate the
closing #endif.

CodeGeneratorJS.pm now passes the conditional string, if any,
to GenerateDictionary{Header,Implementation}Content() functions
in case of a non-standalone dictionary. Otherwise, the
conditional string, if any, is used to guard the complete
header and implementation files.

Generator tests are updated to cover various build guard
combinations on dictionaries in TestObj.idl, and the standalone
dictionary WebIDL file now has a Conditional attribute to check
that the build guards cover complete generated header and
implementation files.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateDictionaryHeaderContent):
(GenerateDictionariesHeaderContent):
(GenerateDictionaryImplementationContent):
(GenerateDictionariesImplementationContent):
(GenerateDictionaryHeader):
(GenerateDictionaryImplementation):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::convertDictionary&lt;TestObj::ConditionalDictionaryA&gt;):
(WebCore::convertDictionary&lt;TestObj::ConditionalDictionaryB&gt;):
(WebCore::convertDictionary&lt;TestObj::ConditionalDictionaryC&gt;):
* bindings/scripts/test/JS/JSTestObj.h:
* bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
* bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestStandaloneDictionary.idl:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjh">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h</a></li>
<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="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestStandaloneDictionaryidl">trunk/Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207765 => 207766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-24 17:53:40 UTC (rev 207765)
+++ trunk/Source/WebCore/ChangeLog        2016-10-24 18:12:01 UTC (rev 207766)
</span><span class="lines">@@ -1,3 +1,54 @@
</span><ins>+2016-10-24  Zan Dobersek  &lt;zdobersek@igalia.com&gt;
+
+        [CodeGeneratorJS] Standalone dictionaries have misplaced build guards
+        https://bugs.webkit.org/show_bug.cgi?id=163881
+
+        Reviewed by Chris Dumez.
+
+        Build guards that are generated from the Conditional attribute
+        on WebIDL dictionary declarations properly guard the relevant
+        convertDictionary() functions for WebIDL files that also specify
+        interfaces. But for standalone dictionaries these build guards
+        should guard the complete header and implementation files, much
+        like this is done for files that originate from interfaces or
+        callbacks.
+
+        Before this patch, guarding a standalone dictionary resulted in
+        malformed output because GenerateHeaderContentHeader() and
+        GenerateImplementationContentHeader() functions both generated
+        the #if macro that would guard the whole file, but
+        GenerateDictionary{Header,Implementation}() didn't generate the
+        closing #endif.
+
+        CodeGeneratorJS.pm now passes the conditional string, if any,
+        to GenerateDictionary{Header,Implementation}Content() functions
+        in case of a non-standalone dictionary. Otherwise, the
+        conditional string, if any, is used to guard the complete
+        header and implementation files.
+
+        Generator tests are updated to cover various build guard
+        combinations on dictionaries in TestObj.idl, and the standalone
+        dictionary WebIDL file now has a Conditional attribute to check
+        that the build guards cover complete generated header and
+        implementation files.
+
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (GenerateDictionaryHeaderContent):
+        (GenerateDictionariesHeaderContent):
+        (GenerateDictionaryImplementationContent):
+        (GenerateDictionariesImplementationContent):
+        (GenerateDictionaryHeader):
+        (GenerateDictionaryImplementation):
+        * bindings/scripts/test/JS/JSTestObj.cpp:
+        (WebCore::convertDictionary&lt;TestObj::ConditionalDictionaryA&gt;):
+        (WebCore::convertDictionary&lt;TestObj::ConditionalDictionaryB&gt;):
+        (WebCore::convertDictionary&lt;TestObj::ConditionalDictionaryC&gt;):
+        * bindings/scripts/test/JS/JSTestObj.h:
+        * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
+        * bindings/scripts/test/JS/JSTestStandaloneDictionary.h:
+        * bindings/scripts/test/TestObj.idl:
+        * bindings/scripts/test/TestStandaloneDictionary.idl:
+
</ins><span class="cx"> 2016-10-24  Eric Carlson  &lt;eric.carlson@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [MediaStream] Separate media capture and audio playback muting
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (207765 => 207766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-24 17:53:40 UTC (rev 207765)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-10-24 18:12:01 UTC (rev 207766)
</span><span class="lines">@@ -1053,10 +1053,9 @@
</span><span class="cx"> 
</span><span class="cx"> sub GenerateDictionaryHeaderContent
</span><span class="cx"> {
</span><del>-    my ($dictionary, $className) = @_;
</del><ins>+    my ($dictionary, $className, $conditionalString) = @_;
</ins><span class="cx"> 
</span><span class="cx">     my $result = &quot;&quot;;
</span><del>-    my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
</del><span class="cx">     $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
</span><span class="cx">     $result .= &quot;template&lt;&gt; $className convertDictionary&lt;$className&gt;(JSC::ExecState&amp;, JSC::JSValue);\n\n&quot;;
</span><span class="cx">     $result .= &quot;#endif\n\n&quot; if $conditionalString;
</span><span class="lines">@@ -1075,7 +1074,8 @@
</span><span class="cx">     foreach my $dictionary (@$allDictionaries) {
</span><span class="cx">         $headerIncludes{$interface-&gt;name . &quot;.h&quot;} = 1;
</span><span class="cx">         my $className = GetDictionaryClassName($dictionary-&gt;name, $interface);
</span><del>-        $result .= GenerateDictionaryHeaderContent($dictionary, $className);
</del><ins>+        my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
+        $result .= GenerateDictionaryHeaderContent($dictionary, $className, $conditionalString);
</ins><span class="cx">     }
</span><span class="cx">     return $result;
</span><span class="cx"> }
</span><span class="lines">@@ -1082,13 +1082,12 @@
</span><span class="cx"> 
</span><span class="cx"> sub GenerateDictionaryImplementationContent
</span><span class="cx"> {
</span><del>-    my ($dictionary, $className, $interface) = @_;
</del><ins>+    my ($dictionary, $className, $interface, $conditionalString) = @_;
</ins><span class="cx"> 
</span><span class="cx">     my $result = &quot;&quot;;
</span><span class="cx"> 
</span><span class="cx">     my $name = $dictionary-&gt;name;
</span><span class="cx"> 
</span><del>-    my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
</del><span class="cx">     $result .= &quot;#if ${conditionalString}\n\n&quot; if $conditionalString;
</span><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="lines">@@ -1186,7 +1185,8 @@
</span><span class="cx">     my $result = &quot;&quot;;
</span><span class="cx">     foreach my $dictionary (@$allDictionaries) {
</span><span class="cx">         my $className = GetDictionaryClassName($dictionary-&gt;name, $interface);
</span><del>-        $result .= GenerateDictionaryImplementationContent($dictionary, $className, $interface);
</del><ins>+        my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
+        $result .= GenerateDictionaryImplementationContent($dictionary, $className, $interface, $conditionalString);
</ins><span class="cx">     }
</span><span class="cx">     return $result;
</span><span class="cx"> }
</span><span class="lines">@@ -4467,6 +4467,9 @@
</span><span class="cx">     push(@headerContent, &quot;\nnamespace WebCore {\n\n&quot;);
</span><span class="cx">     push(@headerContent, GenerateDictionaryHeaderContent($dictionary, $className));
</span><span class="cx">     push(@headerContent, &quot;} // namespace WebCore\n&quot;);
</span><ins>+
+    my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
+    push(@headerContent, &quot;\n#endif // ${conditionalString}\n&quot;) if $conditionalString;
</ins><span class="cx">     
</span><span class="cx">     # - Generate dependencies.
</span><span class="cx">     if ($writeDependencies) {
</span><span class="lines">@@ -4494,6 +4497,9 @@
</span><span class="cx">     push(@implContent, &quot;namespace WebCore {\n\n&quot;);
</span><span class="cx">     push(@implContent, GenerateDictionaryImplementationContent($dictionary, $className));
</span><span class="cx">     push(@implContent, &quot;} // namespace WebCore\n&quot;);
</span><ins>+
+    my $conditionalString = $codeGenerator-&gt;GenerateConditionalString($dictionary);
+    push(@implContent, &quot;\n#endif // ${conditionalString}\n&quot;) if $conditionalString;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> sub GenerateCallbackHeader
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (207765 => 207766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-10-24 17:53:40 UTC (rev 207765)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-10-24 18:12:01 UTC (rev 207766)
</span><span class="lines">@@ -857,6 +857,87 @@
</span><span class="cx">     return result;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(Condition1)
+
+template&lt;&gt; TestObj::ConditionalDictionaryA convertDictionary&lt;TestObj::ConditionalDictionaryA&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 { };
+    }
+    if (UNLIKELY(object &amp;&amp; object-&gt;type() == RegExpObjectType)) {
+        throwTypeError(&amp;state, throwScope);
+        return { };
+    }
+    TestObj::ConditionalDictionaryA result;
+    JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;stringWithoutDefault&quot;));
+    if (!stringWithoutDefaultValue.isUndefined()) {
+        result.stringWithoutDefault = convert&lt;IDLDOMString&gt;(state, stringWithoutDefaultValue);
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
+    return result;
+}
+
+#endif
+
+#if ENABLE(Condition1) &amp;&amp; ENABLE(Condition2)
+
+template&lt;&gt; TestObj::ConditionalDictionaryB convertDictionary&lt;TestObj::ConditionalDictionaryB&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 { };
+    }
+    if (UNLIKELY(object &amp;&amp; object-&gt;type() == RegExpObjectType)) {
+        throwTypeError(&amp;state, throwScope);
+        return { };
+    }
+    TestObj::ConditionalDictionaryB result;
+    JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;stringWithoutDefault&quot;));
+    if (!stringWithoutDefaultValue.isUndefined()) {
+        result.stringWithoutDefault = convert&lt;IDLDOMString&gt;(state, stringWithoutDefaultValue);
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
+    return result;
+}
+
+#endif
+
+#if ENABLE(Condition1) || ENABLE(Condition2)
+
+template&lt;&gt; TestObj::ConditionalDictionaryC convertDictionary&lt;TestObj::ConditionalDictionaryC&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 { };
+    }
+    if (UNLIKELY(object &amp;&amp; object-&gt;type() == RegExpObjectType)) {
+        throwTypeError(&amp;state, throwScope);
+        return { };
+    }
+    TestObj::ConditionalDictionaryC result;
+    JSValue stringWithoutDefaultValue = isNullOrUndefined ? jsUndefined() : object-&gt;get(&amp;state, Identifier::fromString(&amp;state, &quot;stringWithoutDefault&quot;));
+    if (!stringWithoutDefaultValue.isUndefined()) {
+        result.stringWithoutDefault = convert&lt;IDLDOMString&gt;(state, stringWithoutDefaultValue);
+        RETURN_IF_EXCEPTION(throwScope, { });
+    }
+    return result;
+}
+
+#endif
+
</ins><span class="cx"> // Functions
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(TEST_FEATURE)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h (207765 => 207766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2016-10-24 17:53:40 UTC (rev 207765)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.h        2016-10-24 18:12:01 UTC (rev 207766)
</span><span class="lines">@@ -184,5 +184,23 @@
</span><span class="cx"> 
</span><span class="cx"> template&lt;&gt; TestObj::ChildDictionary convertDictionary&lt;TestObj::ChildDictionary&gt;(JSC::ExecState&amp;, JSC::JSValue);
</span><span class="cx"> 
</span><ins>+#if ENABLE(Condition1)
</ins><span class="cx"> 
</span><ins>+template&lt;&gt; TestObj::ConditionalDictionaryA convertDictionary&lt;TestObj::ConditionalDictionaryA&gt;(JSC::ExecState&amp;, JSC::JSValue);
+
+#endif
+
+#if ENABLE(Condition1) &amp;&amp; ENABLE(Condition2)
+
+template&lt;&gt; TestObj::ConditionalDictionaryB convertDictionary&lt;TestObj::ConditionalDictionaryB&gt;(JSC::ExecState&amp;, JSC::JSValue);
+
+#endif
+
+#if ENABLE(Condition1) || ENABLE(Condition2)
+
+template&lt;&gt; TestObj::ConditionalDictionaryC convertDictionary&lt;TestObj::ConditionalDictionaryC&gt;(JSC::ExecState&amp;, JSC::JSValue);
+
+#endif
+
+
</ins><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestStandaloneDictionarycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp (207765 => 207766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp        2016-10-24 17:53:40 UTC (rev 207765)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp        2016-10-24 18:12:01 UTC (rev 207766)
</span><span class="lines">@@ -19,6 +19,9 @@
</span><span class="cx"> */
</span><span class="cx"> 
</span><span class="cx"> #include &quot;config.h&quot;
</span><ins>+
+#if ENABLE(Condition1)
+
</ins><span class="cx"> #include &quot;JSTestStandaloneDictionary.h&quot;
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -55,3 +58,5 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><ins>+
+#endif // ENABLE(Condition1)
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestStandaloneDictionaryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.h (207765 => 207766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.h        2016-10-24 17:53:40 UTC (rev 207765)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestStandaloneDictionary.h        2016-10-24 18:12:01 UTC (rev 207766)
</span><span class="lines">@@ -20,6 +20,8 @@
</span><span class="cx"> 
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><ins>+#if ENABLE(Condition1)
+
</ins><span class="cx"> #include &quot;DictionaryImplName.h&quot;
</span><span class="cx"> #include &quot;JSDOMConvert.h&quot;
</span><span class="cx"> 
</span><span class="lines">@@ -28,3 +30,5 @@
</span><span class="cx"> template&lt;&gt; DictionaryImplName convertDictionary&lt;DictionaryImplName&gt;(JSC::ExecState&amp;, JSC::JSValue);
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span><ins>+
+#endif // ENABLE(Condition1)
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (207765 => 207766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-10-24 17:53:40 UTC (rev 207765)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-10-24 18:12:01 UTC (rev 207766)
</span><span class="lines">@@ -512,3 +512,20 @@
</span><span class="cx">     boolean childMember1;
</span><span class="cx"> };
</span><span class="cx"> 
</span><ins>+[
+    Conditional=Condition1
+] dictionary TestConditionalDictionaryA {
+    DOMString stringWithoutDefault;
+};
+
+[
+    Conditional=Condition1&amp;Condition2
+] dictionary TestConditionalDictionaryB {
+    DOMString stringWithoutDefault;
+};
+
+[
+    Conditional=Condition1|Condition2
+] dictionary TestConditionalDictionaryC {
+    DOMString stringWithoutDefault;
+};
</ins></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestStandaloneDictionaryidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl (207765 => 207766)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl        2016-10-24 17:53:40 UTC (rev 207765)
+++ trunk/Source/WebCore/bindings/scripts/test/TestStandaloneDictionary.idl        2016-10-24 18:12:01 UTC (rev 207766)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx"> 
</span><span class="cx"> [
</span><span class="cx">     ImplementedAs=DictionaryImplName,
</span><ins>+    Conditional=Condition1,
</ins><span class="cx"> ] dictionary TestStandaloneDictionary {
</span><span class="cx">     boolean boolMember;
</span><span class="cx">     DOMString stringMember;
</span></span></pre>
</div>
</div>

</body>
</html>