<!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>[169889] trunk/Source/JavaScriptCore</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/169889">169889</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-06-12 03:10:51 -0700 (Thu, 12 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Allow enum guards to be generated from the replay json files
https://bugs.webkit.org/show_bug.cgi?id=133399

Patch by Zsolt Borbely &lt;zsborbely.u-szeged@partner.samsung.com&gt; on 2014-06-12
Reviewed by Csaba Osztrogonác.

* replay/scripts/CodeGeneratorReplayInputs.py:
(Type.__init__):
(InputsModel.parse_type_with_framework_name):
(Generator.generate_header):
(Generator.generate_implementation):
* replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.cpp: Added.
(Test::HandleWheelEvent::HandleWheelEvent):
(Test::HandleWheelEvent::~HandleWheelEvent):
(JSC::InputTraits&lt;Test::HandleWheelEvent&gt;::type):
(JSC::InputTraits&lt;Test::HandleWheelEvent&gt;::encode):
(JSC::InputTraits&lt;Test::HandleWheelEvent&gt;::decode):
(JSC::EncodingTraits&lt;WebCore::PlatformWheelEventPhase&gt;::encodeValue):
(JSC::EncodingTraits&lt;WebCore::PlatformWheelEventPhase&gt;::decodeValue):
* replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.h: Added.
(JSC::InputTraits&lt;Test::HandleWheelEvent&gt;::queue):
(Test::HandleWheelEvent::platformEvent):
* replay/scripts/tests/generate-enum-with-guard.json: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptsCodeGeneratorReplayInputspy">trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumwithguardjsonTestReplayInputscpp">trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumwithguardjsonTestReplayInputsh">trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.h</a></li>
<li><a href="#trunkSourceJavaScriptCorereplayscriptstestsgenerateenumwithguardjson">trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enum-with-guard.json</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (169888 => 169889)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2014-06-12 09:41:57 UTC (rev 169888)
+++ trunk/Source/JavaScriptCore/ChangeLog        2014-06-12 10:10:51 UTC (rev 169889)
</span><span class="lines">@@ -1,3 +1,28 @@
</span><ins>+2014-06-12  Zsolt Borbely  &lt;zsborbely.u-szeged@partner.samsung.com&gt;
+
+        Allow enum guards to be generated from the replay json files
+        https://bugs.webkit.org/show_bug.cgi?id=133399
+
+        Reviewed by Csaba Osztrogonác.
+
+        * replay/scripts/CodeGeneratorReplayInputs.py:
+        (Type.__init__):
+        (InputsModel.parse_type_with_framework_name):
+        (Generator.generate_header):
+        (Generator.generate_implementation):
+        * replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.cpp: Added.
+        (Test::HandleWheelEvent::HandleWheelEvent):
+        (Test::HandleWheelEvent::~HandleWheelEvent):
+        (JSC::InputTraits&lt;Test::HandleWheelEvent&gt;::type):
+        (JSC::InputTraits&lt;Test::HandleWheelEvent&gt;::encode):
+        (JSC::InputTraits&lt;Test::HandleWheelEvent&gt;::decode):
+        (JSC::EncodingTraits&lt;WebCore::PlatformWheelEventPhase&gt;::encodeValue):
+        (JSC::EncodingTraits&lt;WebCore::PlatformWheelEventPhase&gt;::decodeValue):
+        * replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.h: Added.
+        (JSC::InputTraits&lt;Test::HandleWheelEvent&gt;::queue):
+        (Test::HandleWheelEvent::platformEvent):
+        * replay/scripts/tests/generate-enum-with-guard.json: Added.
+
</ins><span class="cx"> 2014-06-12  Carlos Garcia Campos  &lt;cgarcia@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed. Fix GTK+ build after r169823.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptsCodeGeneratorReplayInputspy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py (169888 => 169889)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py        2014-06-12 09:41:57 UTC (rev 169888)
+++ trunk/Source/JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py        2014-06-12 10:10:51 UTC (rev 169889)
</span><span class="lines">@@ -281,7 +281,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class Type:
</span><del>-    def __init__(self, name, mode, framework, header, enclosing_class, values, guard_values_map, underlying_storage, flags):
</del><ins>+    def __init__(self, name, mode, framework, header, enclosing_class, values, guard_values_map, underlying_storage, flags, guard=None):
</ins><span class="cx">         self._name = name
</span><span class="cx">         self.mode = mode
</span><span class="cx">         self.framework = framework
</span><span class="lines">@@ -291,6 +291,7 @@
</span><span class="cx">         self.guard_values_map = guard_values_map
</span><span class="cx">         self.underlying_storage = underlying_storage
</span><span class="cx">         self._flags = flags
</span><ins>+        self.guard = guard
</ins><span class="cx"> 
</span><span class="cx">     def __eq__(self, other):
</span><span class="cx">         return self.type_name() == other.type_name() and self.mode == other.mode
</span><span class="lines">@@ -449,7 +450,8 @@
</span><span class="cx">         guarded_enum_values = json.get('guarded_values', {})
</span><span class="cx">         type_storage = json.get('storage')
</span><span class="cx">         type_flags = json.get('flags', [])
</span><del>-        _type = Type(type_name, type_mode, framework, header, enclosing_class, enum_values, guarded_enum_values, type_storage, type_flags)
</del><ins>+        guard = json.get('guard', None)
+        _type = Type(type_name, type_mode, framework, header, enclosing_class, enum_values, guarded_enum_values, type_storage, type_flags, guard)
</ins><span class="cx">         if _type.is_enum() or _type.is_enum_class():
</span><span class="cx">             check_for_required_properties(['values'], json, 'enum')
</span><span class="cx">             if not isinstance(json['values'], list) or len(_type.values) == 0:
</span><span class="lines">@@ -597,7 +599,7 @@
</span><span class="cx">             'inputForwardDeclarations': &quot;\n&quot;.join([wrap_with_guard(&quot;class %s;&quot;, _input.guard) % _input.name for _input in self._model.inputs]),
</span><span class="cx">             'inputClassDeclarations': &quot;\n\n&quot;.join([self.generate_class_declaration(_input) for _input in self._model.inputs]),
</span><span class="cx">             'inputTraitDeclarations': &quot;\n\n&quot;.join([self.generate_input_trait_declaration(_input) for _input in self._model.inputs]),
</span><del>-            'enumTraitDeclarations': &quot;\n\n&quot;.join([self.generate_enum_trait_declaration(_type) for _type in self._model.enum_types()]),
</del><ins>+            'enumTraitDeclarations': &quot;\n\n&quot;.join([wrap_with_guard(self.generate_enum_trait_declaration(_type), _type.guard) for _type in self._model.enum_types()]),
</ins><span class="cx">             'forEachMacro': self.generate_for_each_macro(),
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -613,7 +615,7 @@
</span><span class="cx">             'includes': self.generate_includes(defaults=self.setting('implIncludes'), includes_for_types=True),
</span><span class="cx">             'inputClassImplementations': &quot;\n\n&quot;.join([self.generate_class_implementation(_input) for _input in self._model.inputs]),
</span><span class="cx">             'inputTraitImplementations': &quot;\n\n&quot;.join([self.generate_input_trait_implementation(_input) for _input in self._model.inputs]),
</span><del>-            'enumTraitImplementations': &quot;\n\n&quot;.join([self.generate_enum_trait_implementation(_type) for _type in self._model.enum_types()]),
</del><ins>+            'enumTraitImplementations': &quot;\n\n&quot;.join([wrap_with_guard(self.generate_enum_trait_implementation(_type), _type.guard) for _type in self._model.enum_types()]),
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return Template(Templates.ImplementationSkeleton).substitute(template_arguments)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumwithguardjsonTestReplayInputscpp"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.cpp (0 => 169889)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.cpp                                (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.cpp        2014-06-12 10:10:51 UTC (rev 169889)
</span><span class="lines">@@ -0,0 +1,99 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * HOLDER OR 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-enum-with-guard.json
+// by the script: JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py
+
+#include &quot;config.h&quot;
+#include &quot;generate-enum-with-guard.json-TestReplayInputs.h&quot;
+
+#if ENABLE(WEB_REPLAY)
+#include &quot;InternalNamespaceImplIncludeDummy.h&quot;
+#include &lt;platform/ExternalNamespaceImplIncludeDummy.h&gt;
+#include &lt;platform/PlatformWheelEvent.h&gt;
+
+namespace Test {
+HandleWheelEvent::HandleWheelEvent(std::unique_ptr&lt;PlatformWheelEvent&gt; platformEvent)
+    : EventLoopInput&lt;HandleWheelEvent&gt;()
+    , m_platformEvent(std::move(platformEvent))
+{
+}
+
+HandleWheelEvent::~HandleWheelEvent()
+{
+}
+} // namespace Test
+
+namespace JSC {
+const AtomicString&amp; InputTraits&lt;Test::HandleWheelEvent&gt;::type()
+{
+    static NeverDestroyed&lt;const AtomicString&gt; type(&quot;HandleWheelEvent&quot;, AtomicString::ConstructFromLiteral);
+    return type;
+}
+
+void InputTraits&lt;Test::HandleWheelEvent&gt;::encode(EncodedValue&amp; encodedValue, const Test::HandleWheelEvent&amp; input)
+{
+    encodedValue.put&lt;WebCore::PlatformWheelEvent&gt;(ASCIILiteral(&quot;platformEvent&quot;), input.platformEvent());
+}
+
+bool InputTraits&lt;Test::HandleWheelEvent&gt;::decode(EncodedValue&amp; encodedValue, std::unique_ptr&lt;Test::HandleWheelEvent&gt;&amp; input)
+{
+    std::unique_ptr&lt;WebCore::PlatformWheelEvent&gt; platformEvent;
+    if (!encodedValue.get&lt;WebCore::PlatformWheelEvent&gt;(ASCIILiteral(&quot;platformEvent&quot;), platformEvent))
+        return false;
+
+    input = std::make_unique&lt;Test::HandleWheelEvent&gt;(std::move(platformEvent));
+    return true;
+}
+#if ENABLE(DUMMY_FEATURE)
+EncodedValue EncodingTraits&lt;WebCore::PlatformWheelEventPhase&gt;::encodeValue(const WebCore::PlatformWheelEventPhase&amp; enumValue)
+{
+    EncodedValue encodedValue = EncodedValue::createArray();
+    if (enumValue &amp; WebCore::PlatformWheelEventPhaseNone) {
+        encodedValue.append&lt;String&gt;(ASCIILiteral(&quot;PlatformWheelEventPhaseNone&quot;));
+        if (enumValue == WebCore::PlatformWheelEventPhaseNone)
+            return encodedValue;
+    }
+    return encodedValue;
+}
+
+bool EncodingTraits&lt;WebCore::PlatformWheelEventPhase&gt;::decodeValue(EncodedValue&amp; encodedValue, WebCore::PlatformWheelEventPhase&amp; enumValue)
+{
+    Vector&lt;String&gt; enumStrings;
+    if (!EncodingTraits&lt;Vector&lt;String&gt;&gt;::decodeValue(encodedValue, enumStrings))
+        return false;
+
+    for (String enumString : enumStrings) {
+        if (enumString == &quot;PlatformWheelEventPhaseNone&quot;)
+            enumValue = static_cast&lt;WebCore::PlatformWheelEventPhase&gt;(enumValue | WebCore::PlatformWheelEventPhaseNone);
+    }
+
+    return true;
+}
+#endif // ENABLE(DUMMY_FEATURE)
+} // namespace JSC
+
+#endif // ENABLE(WEB_REPLAY)
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsexpectedgenerateenumwithguardjsonTestReplayInputsh"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.h (0 => 169889)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.h                                (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/expected/generate-enum-with-guard.json-TestReplayInputs.h        2014-06-12 10:10:51 UTC (rev 169889)
</span><span class="lines">@@ -0,0 +1,86 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * HOLDER OR 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.
+ */
+
+// DO NOT EDIT THIS FILE. It is automatically generated from generate-enum-with-guard.json
+// by the script: JavaScriptCore/replay/scripts/CodeGeneratorReplayInputs.py
+
+#ifndef generate_enum_with_guard_json_TestReplayInputs_h
+#define generate_enum_with_guard_json_TestReplayInputs_h
+
+#if ENABLE(WEB_REPLAY)
+#include &quot;InternalNamespaceHeaderIncludeDummy.h&quot;
+#include &lt;platform/ExternalNamespaceHeaderIncludeDummy.h&gt;
+
+namespace WebCore {
+class PlatformWheelEvent;
+enum PlatformWheelEventPhase : uint64_t;
+}
+
+
+namespace Test {
+class HandleWheelEvent;
+} // namespace Test
+
+namespace JSC {
+template&lt;&gt; struct InputTraits&lt;Test::HandleWheelEvent&gt; {
+    static InputQueue queue() { return InputQueue::EventLoopInput; }
+    static const AtomicString&amp; type();
+
+    static void encode(JSC::EncodedValue&amp;, const Test::HandleWheelEvent&amp;);
+    static bool decode(JSC::EncodedValue&amp;, std::unique_ptr&lt;Test::HandleWheelEvent&gt;&amp;);
+};
+#if ENABLE(DUMMY_FEATURE)
+template&lt;&gt; struct EncodingTraits&lt;WebCore::PlatformWheelEventPhase&gt; {
+    typedef WebCore::PlatformWheelEventPhase DecodedType;
+
+    static EncodedValue encodeValue(const WebCore::PlatformWheelEventPhase&amp; value);
+    static bool decodeValue(EncodedValue&amp;, WebCore::PlatformWheelEventPhase&amp; value);
+};
+#endif // ENABLE(DUMMY_FEATURE)
+} // namespace JSC
+
+namespace Test {
+class HandleWheelEvent : public EventLoopInput&lt;HandleWheelEvent&gt; {
+public:
+    HandleWheelEvent(std::unique_ptr&lt;PlatformWheelEvent&gt; platformEvent);
+    virtual ~HandleWheelEvent();
+
+    // EventLoopInput API
+    virtual void dispatch(ReplayController&amp;) override final;
+    const PlatformWheelEvent&amp; platformEvent() const { return *m_platformEvent; }
+private:
+    std::unique_ptr&lt;PlatformWheelEvent&gt; m_platformEvent;
+};
+} // namespace Test
+
+#define TEST_REPLAY_INPUT_NAMES_FOR_EACH(macro) \
+    macro(HandleWheelEvent) \
+    \
+// end of TEST_REPLAY_INPUT_NAMES_FOR_EACH
+
+#endif // ENABLE(WEB_REPLAY)
+
+#endif // generate-enum-with-guard.json-TestReplayInputs_h
</ins></span></pre></div>
<a id="trunkSourceJavaScriptCorereplayscriptstestsgenerateenumwithguardjson"></a>
<div class="addfile"><h4>Added: trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enum-with-guard.json (0 => 169889)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enum-with-guard.json                                (rev 0)
+++ trunk/Source/JavaScriptCore/replay/scripts/tests/generate-enum-with-guard.json        2014-06-12 10:10:51 UTC (rev 169889)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+{
+    &quot;types&quot;: {
+        &quot;Global&quot;: [
+            { &quot;name&quot;: &quot;uint64_t&quot;, &quot;mode&quot;: &quot;SCALAR&quot; }
+        ],
+        &quot;WebCore&quot;: [
+            {
+                &quot;name&quot;: &quot;PlatformWheelEvent&quot;, &quot;mode&quot;: &quot;OWNED&quot;,
+                &quot;header&quot;: &quot;platform/PlatformWheelEvent.h&quot;
+            },
+            {
+                &quot;name&quot;: &quot;PlatformWheelEventPhase&quot;, &quot;mode&quot;: &quot;SCALAR&quot;, &quot;storage&quot;: &quot;uint64_t&quot;,
+                &quot;flags&quot;: [&quot;ENUM&quot;],
+                &quot;guard&quot;: &quot;ENABLE(DUMMY_FEATURE)&quot;,
+                &quot;values&quot;: [&quot;PlatformWheelEventPhaseNone&quot;],
+                &quot;header&quot;: &quot;platform/PlatformWheelEvent.h&quot;
+            }
+        ]
+    },
+
+    &quot;inputs&quot;: [
+        {
+            &quot;name&quot;: &quot;HandleWheelEvent&quot;,
+            &quot;description&quot;: &quot;&quot;,
+            &quot;queue&quot;: &quot;EVENT_LOOP&quot;,
+            &quot;members&quot;: [
+                { &quot;name&quot;: &quot;platformEvent&quot;, &quot;type&quot;: &quot;PlatformWheelEvent&quot; }
+            ]
+        }
+    ]
+}
</ins></span></pre>
</div>
</div>

</body>
</html>