<!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>[212116] trunk/Source</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/212116">212116</a></dd>
<dt>Author</dt> <dd>bburg@apple.com</dd>
<dt>Date</dt> <dd>2017-02-10 09:29:36 -0800 (Fri, 10 Feb 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[Cocoa] Web Inspector: generate an NS_ENUM containing platforms supported by the protocol code generator
https://bugs.webkit.org/show_bug.cgi?id=168019
&lt;rdar://problem/28718990&gt;

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

It's useful to have an symbolic value (not a string) for each of the supported platform values.
Generate this once per protocol for the Objective-C bindings. Covered by existing tests.

* inspector/scripts/codegen/generate_objc_header.py:
(ObjCHeaderGenerator.generate_output):
(ObjCHeaderGenerator._generate_enum_for_platforms):
Create an NS_ENUM for Platform values in Platforms.

* inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:
(ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
(ObjCProtocolTypeConversionsHeaderGenerator._generate_enum_conversion_for_platforms):
Add type conversion/parsing methods for the newly added enum.

* inspector/scripts/codegen/generator.py:
(Generator.stylized_name_for_enum_value):
(Generator.stylized_name_for_enum_value.replaceCallback):
Support arbitrary special-cased substrings in enums, not just all-caps. Add 'IOS' and 'MacOS'.

* inspector/scripts/codegen/models.py:
(Platforms):
Use lower-case string values for platform names, to avoid guesswork.

(Platforms.__metaclass__):
(Platforms.__metaclass__.__iter__):
Make it possible to iterate over Platform instances of Platforms.

* inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
* inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
* inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/generic/expected/domain-availability.json-result:
* inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
* inspector/scripts/tests/generic/expected/enum-values.json-result:
* inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
* inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
* inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
* inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
* inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
* inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
* inspector/scripts/tests/generic/expected/worker-supported-domains.json-result:
* inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
* inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
Rebaseline results.

Source/WebKit2:

* UIProcess/Automation/Automation.json: Fix the platform values to be lowercase.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptscodegengenerate_objc_headerpy">trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptscodegengenerate_objc_protocol_type_conversions_headerpy">trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptscodegengeneratorpy">trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptscodegenmodelspy">trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsallexpecteddefinitionswithmacplatformjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedcommandswithasyncattributejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedcommandswithoptionalcallreturnparametersjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpecteddefinitionswithmacplatformjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpecteddomainavailabilityjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpecteddomainswithvaryingcommandsizesjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedenumvaluesjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedeventswithoptionalparametersjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedgeneratedomainswithfeatureguardsjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedsametypeiddifferentdomainjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedshadowedoptionaltypesettersjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationaliasedprimitivetypejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationarraytypejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationenumtypejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationobjecttypejsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtyperequiringruntimecastsjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedworkersupporteddomainsjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsiosexpecteddefinitionswithmacplatformjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorscriptstestsmacexpecteddefinitionswithmacplatformjsonresult">trunk/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAutomationAutomationjson">trunk/Source/WebKit2/UIProcess/Automation/Automation.json</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/ChangeLog        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -1,3 +1,58 @@
</span><ins>+2017-02-10  Brian Burg  &lt;bburg@apple.com&gt;
+
+        [Cocoa] Web Inspector: generate an NS_ENUM containing platforms supported by the protocol code generator
+        https://bugs.webkit.org/show_bug.cgi?id=168019
+        &lt;rdar://problem/28718990&gt;
+
+        Reviewed by Joseph Pecoraro.
+
+        It's useful to have an symbolic value (not a string) for each of the supported platform values.
+        Generate this once per protocol for the Objective-C bindings. Covered by existing tests.
+
+        * inspector/scripts/codegen/generate_objc_header.py:
+        (ObjCHeaderGenerator.generate_output):
+        (ObjCHeaderGenerator._generate_enum_for_platforms):
+        Create an NS_ENUM for Platform values in Platforms.
+
+        * inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py:
+        (ObjCProtocolTypeConversionsHeaderGenerator.generate_output):
+        (ObjCProtocolTypeConversionsHeaderGenerator._generate_enum_conversion_for_platforms):
+        Add type conversion/parsing methods for the newly added enum.
+
+        * inspector/scripts/codegen/generator.py:
+        (Generator.stylized_name_for_enum_value):
+        (Generator.stylized_name_for_enum_value.replaceCallback):
+        Support arbitrary special-cased substrings in enums, not just all-caps. Add 'IOS' and 'MacOS'.
+
+        * inspector/scripts/codegen/models.py:
+        (Platforms):
+        Use lower-case string values for platform names, to avoid guesswork.
+
+        (Platforms.__metaclass__):
+        (Platforms.__metaclass__.__iter__):
+        Make it possible to iterate over Platform instances of Platforms.
+
+        * inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result:
+        * inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result:
+        * inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result:
+        * inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result:
+        * inspector/scripts/tests/generic/expected/domain-availability.json-result:
+        * inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result:
+        * inspector/scripts/tests/generic/expected/enum-values.json-result:
+        * inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result:
+        * inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result:
+        * inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result:
+        * inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result:
+        * inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result:
+        * inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result:
+        * inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result:
+        * inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result:
+        * inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result:
+        * inspector/scripts/tests/generic/expected/worker-supported-domains.json-result:
+        * inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result:
+        * inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result:
+        Rebaseline results.
+
</ins><span class="cx"> 2017-02-09  Filip Pizlo  &lt;fpizlo@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         SharedArrayBuffer does not need to be in the transfer list
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptscodegengenerate_objc_headerpy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_header.py        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> from string import Template
</span><span class="cx"> 
</span><span class="cx"> from generator import Generator, ucfirst
</span><del>-from models import ObjectType, EnumType
</del><ins>+from models import ObjectType, EnumType, Platforms
</ins><span class="cx"> from objc_generator import ObjCGenerator, join_type_and_name
</span><span class="cx"> from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates
</span><span class="cx"> 
</span><span class="lines">@@ -73,6 +73,7 @@
</span><span class="cx">         sections.append(self.generate_license())
</span><span class="cx">         sections.append(Template(ObjCTemplates.HeaderPrelude).substitute(None, **header_args))
</span><span class="cx">         sections.append('\n'.join(filter(None, map(self._generate_forward_declarations, type_domains))))
</span><ins>+        sections.append(self._generate_enum_for_platforms())
</ins><span class="cx">         sections.append('\n'.join(filter(None, map(self._generate_enums, type_domains))))
</span><span class="cx">         sections.append('\n'.join(filter(None, map(self._generate_types, type_domains))))
</span><span class="cx"> 
</span><span class="lines">@@ -134,6 +135,11 @@
</span><span class="cx">                 lines.append(self._generate_type_interface(domain, declaration))
</span><span class="cx">         return '\n'.join(lines)
</span><span class="cx"> 
</span><ins>+    def _generate_enum_for_platforms(self):
+        objc_enum_name = '%sPlatform' % self.objc_prefix()
+        enum_values = [platform.name for platform in Platforms]
+        return self._generate_enum(objc_enum_name, enum_values)
+
</ins><span class="cx">     def _generate_anonymous_enum_for_declaration(self, domain, declaration):
</span><span class="cx">         objc_enum_name = self.objc_enum_name_for_anonymous_enum_declaration(declaration)
</span><span class="cx">         return self._generate_enum(objc_enum_name, declaration.type.enum_values())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptscodegengenerate_objc_protocol_type_conversions_headerpy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_protocol_type_conversions_header.py        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> from string import Template
</span><span class="cx"> 
</span><span class="cx"> from generator import Generator
</span><del>-from models import EnumType, Frameworks
</del><ins>+from models import EnumType, Frameworks, Platforms
</ins><span class="cx"> from objc_generator import ObjCGenerator
</span><span class="cx"> from objc_generator_templates import ObjCGeneratorTemplates as ObjCTemplates
</span><span class="cx"> 
</span><span class="lines">@@ -69,6 +69,7 @@
</span><span class="cx">         sections.append(self.generate_license())
</span><span class="cx">         sections.append(Template(ObjCTemplates.TypeConversionsHeaderPrelude).substitute(None, **header_args))
</span><span class="cx">         sections.append(Template(ObjCTemplates.TypeConversionsHeaderStandard).substitute(None))
</span><ins>+        sections.append(self._generate_enum_conversion_for_platforms())
</ins><span class="cx">         sections.extend(map(self._generate_enum_conversion_functions, domains))
</span><span class="cx">         sections.append(Template(ObjCTemplates.TypeConversionsHeaderPostlude).substitute(None, **header_args))
</span><span class="cx">         return '\n\n'.join(sections)
</span><span class="lines">@@ -107,6 +108,14 @@
</span><span class="cx"> 
</span><span class="cx">         return '\n'.join(lines)
</span><span class="cx"> 
</span><ins>+    def _generate_enum_conversion_for_platforms(self):
+        objc_enum_name = '%sPlatform' % self.objc_prefix()
+        enum_values = [platform.name for platform in Platforms]
+        lines = []
+        lines.append(self._generate_enum_objc_to_protocol_string(objc_enum_name, enum_values))
+        lines.append(self._generate_enum_from_protocol_string(objc_enum_name, enum_values))
+        return '\n\n'.join(lines)
+
</ins><span class="cx">     def _generate_anonymous_enum_conversion_for_declaration(self, domain, declaration):
</span><span class="cx">         objc_enum_name = self.objc_enum_name_for_anonymous_enum_declaration(declaration)
</span><span class="cx">         enum_values = declaration.type.enum_values()
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptscodegengeneratorpy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator.py (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator.py        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/codegen/generator.py        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -38,7 +38,8 @@
</span><span class="cx"> def ucfirst(str):
</span><span class="cx">     return str[:1].upper() + str[1:]
</span><span class="cx"> 
</span><del>-_ALWAYS_UPPERCASED_ENUM_VALUE_SUBSTRINGS = set(['API', 'CSS', 'DOM', 'HTML', 'JIT', 'XHR', 'XML'])
</del><ins>+_ALWAYS_SPECIALCASED_ENUM_VALUE_SUBSTRINGS = set(['API', 'CSS', 'DOM', 'HTML', 'JIT', 'XHR', 'XML', 'IOS', 'MacOS'])
+_ALWAYS_SPECIALCASED_ENUM_VALUE_LOOKUP_TABLE = dict([(s.upper(), s) for s in _ALWAYS_SPECIALCASED_ENUM_VALUE_SUBSTRINGS])
</ins><span class="cx"> 
</span><span class="cx"> # These objects are built manually by creating and setting InspectorValues.
</span><span class="cx"> # Before sending these over the protocol, their shapes are checked against the specification.
</span><span class="lines">@@ -238,10 +239,10 @@
</span><span class="cx"> 
</span><span class="cx">     @staticmethod
</span><span class="cx">     def stylized_name_for_enum_value(enum_value):
</span><del>-        regex = '(%s)' % &quot;|&quot;.join(_ALWAYS_UPPERCASED_ENUM_VALUE_SUBSTRINGS)
</del><ins>+        regex = '(%s)' % &quot;|&quot;.join(_ALWAYS_SPECIALCASED_ENUM_VALUE_SUBSTRINGS)
</ins><span class="cx"> 
</span><span class="cx">         def replaceCallback(match):
</span><del>-            return match.group(1).upper()
</del><ins>+            return _ALWAYS_SPECIALCASED_ENUM_VALUE_LOOKUP_TABLE[match.group(1).upper()]
</ins><span class="cx"> 
</span><span class="cx">         # Split on hyphen, introduce camelcase, and force uppercasing of acronyms.
</span><span class="cx">         subwords = map(ucfirst, enum_value.split('-'))
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptscodegenmodelspy"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/codegen/models.py        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -132,11 +132,17 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> class Platforms:
</span><del>-    All = Platform(&quot;All&quot;)
</del><ins>+    All = Platform(&quot;all&quot;)
</ins><span class="cx">     Generic = Platform(&quot;generic&quot;)
</span><del>-    iOS = Platform(&quot;iOS&quot;)
-    macOS = Platform(&quot;macOS&quot;)
</del><ins>+    iOS = Platform(&quot;ios&quot;)
+    macOS = Platform(&quot;macos&quot;)
</ins><span class="cx"> 
</span><ins>+    # Allow iteration over all platforms. See &lt;http://stackoverflow.com/questions/5434400/&gt;.
+    class __metaclass__(type):
+        def __iter__(self):
+            for attr in dir(Platforms):
+                if not attr.startswith(&quot;__&quot;):
+                    yield getattr(Platforms, attr)
</ins><span class="cx"> 
</span><span class="cx"> class TypeReference:
</span><span class="cx">     def __init__(self, type_kind, referenced_type_name, enum_values, array_items):
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsallexpecteddefinitionswithmacplatformjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/all/expected/definitions-with-mac-platform.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -894,9 +894,16 @@
</span><span class="cx"> 
</span><span class="cx"> @class TestProtocolNetworkError;
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> __attribute__((visibility (&quot;default&quot;)))
</span><span class="cx"> @interface TestProtocolNetworkError : RWIProtocolJSONObject
</span><span class="cx"> - (instancetype)initWithPayload:(NSDictionary&lt;NSString *, id&gt; *)payload;
</span><span class="lines">@@ -1001,8 +1008,37 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
</ins><span class="cx"> 
</span><ins>+
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedcommandswithasyncattributejsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-async-attribute.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -1282,7 +1282,14 @@
</span><span class="cx"> 
</span><span class="cx"> @class TestProtocolDatabaseError;
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> typedef NS_ENUM(NSInteger, TestProtocolDatabasePrimaryColors) {
</span><span class="cx">     TestProtocolDatabasePrimaryColorsRed,
</span><span class="cx">     TestProtocolDatabasePrimaryColorsGreen,
</span><span class="lines">@@ -1420,7 +1427,36 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
+
</ins><span class="cx"> inline String toProtocolString(TestProtocolDatabasePrimaryColors value)
</span><span class="cx"> {
</span><span class="cx">     switch(value) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedcommandswithoptionalcallreturnparametersjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/commands-with-optional-call-return-parameters.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -1139,7 +1139,14 @@
</span><span class="cx"> 
</span><span class="cx"> @class TestProtocolDatabaseError;
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> typedef NS_ENUM(NSInteger, TestProtocolDatabasePrimaryColors) {
</span><span class="cx">     TestProtocolDatabasePrimaryColorsRed,
</span><span class="cx">     TestProtocolDatabasePrimaryColorsGreen,
</span><span class="lines">@@ -1275,7 +1282,36 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
+
</ins><span class="cx"> inline String toProtocolString(TestProtocolDatabasePrimaryColors value)
</span><span class="cx"> {
</span><span class="cx">     switch(value) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpecteddefinitionswithmacplatformjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/definitions-with-mac-platform.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -646,6 +646,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -655,6 +661,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> ### End File: TestProtocol.h
</span><span class="cx"> 
</span><span class="cx"> ### Begin File: TestProtocolInternal.h
</span><span class="lines">@@ -737,6 +744,35 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
+
+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpecteddomainavailabilityjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domain-availability.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -892,10 +892,17 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> @protocol TestProtocolDomainADomainHandler &lt;NSObject&gt;
</span><span class="cx"> @required
</span><span class="cx"> - (void)enableWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
</span><span class="lines">@@ -991,6 +998,35 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
+
+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpecteddomainswithvaryingcommandsizesjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/domains-with-varying-command-sizes.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -1149,10 +1149,17 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> @protocol TestProtocolNetwork1DomainHandler &lt;NSObject&gt;
</span><span class="cx"> @required
</span><span class="cx"> - (void)loadResource1WithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
</span><span class="lines">@@ -1254,8 +1261,37 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
</ins><span class="cx"> 
</span><ins>+
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedenumvaluesjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/enum-values.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -929,7 +929,14 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> typedef NS_ENUM(NSInteger, TestProtocolTypeDomainEnum) {
</span><span class="cx">     TestProtocolTypeDomainEnumShared,
</span><span class="cx">     TestProtocolTypeDomainEnumRed,
</span><span class="lines">@@ -1034,7 +1041,36 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
+
</ins><span class="cx"> inline String toProtocolString(TestProtocolTypeDomainEnum value)
</span><span class="cx"> {
</span><span class="cx">     switch(value) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedeventswithoptionalparametersjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/events-with-optional-parameters.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -882,9 +882,16 @@
</span><span class="cx"> 
</span><span class="cx"> @class TestProtocolDatabaseError;
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> __attribute__((visibility (&quot;default&quot;)))
</span><span class="cx"> @interface TestProtocolDatabaseError : RWIProtocolJSONObject
</span><span class="cx"> - (instancetype)initWithPayload:(NSDictionary&lt;NSString *, id&gt; *)payload;
</span><span class="lines">@@ -987,8 +994,37 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
</ins><span class="cx"> 
</span><ins>+
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedgeneratedomainswithfeatureguardsjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/generate-domains-with-feature-guards.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -921,9 +921,16 @@
</span><span class="cx"> 
</span><span class="cx"> @class TestProtocolNetwork2NetworkError;
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> __attribute__((visibility (&quot;default&quot;)))
</span><span class="cx"> @interface TestProtocolNetwork2NetworkError : RWIProtocolJSONObject
</span><span class="cx"> - (instancetype)initWithPayload:(NSDictionary&lt;NSString *, id&gt; *)payload;
</span><span class="lines">@@ -1028,8 +1035,37 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
</ins><span class="cx"> 
</span><ins>+
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedsametypeiddifferentdomainjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/same-type-id-different-domain.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -656,6 +656,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -665,6 +671,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> ### End File: TestProtocol.h
</span><span class="cx"> 
</span><span class="cx"> ### Begin File: TestProtocolInternal.h
</span><span class="lines">@@ -747,10 +754,39 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedshadowedoptionaltypesettersjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/shadowed-optional-type-setters.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -779,7 +779,14 @@
</span><span class="cx"> 
</span><span class="cx"> @class TestProtocolRuntimeKeyPath;
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> typedef NS_ENUM(NSInteger, TestProtocolRuntimeKeyPathType) {
</span><span class="cx">     TestProtocolRuntimeKeyPathTypeNull,
</span><span class="cx">     TestProtocolRuntimeKeyPathTypeString,
</span><span class="lines">@@ -884,7 +891,36 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
+
</ins><span class="cx"> inline String toProtocolString(TestProtocolRuntimeKeyPathType value)
</span><span class="cx"> {
</span><span class="cx">     switch(value) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationaliasedprimitivetypejsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-aliased-primitive-type.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -651,6 +651,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -660,6 +666,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> ### End File: TestProtocol.h
</span><span class="cx"> 
</span><span class="cx"> ### Begin File: TestProtocolInternal.h
</span><span class="lines">@@ -742,8 +749,37 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
</ins><span class="cx"> 
</span><ins>+
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationarraytypejsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-array-type.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -729,7 +729,14 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> typedef NS_ENUM(NSInteger, TestProtocolDebuggerReason) {
</span><span class="cx">     TestProtocolDebuggerReasonDied,
</span><span class="cx">     TestProtocolDebuggerReasonFainted,
</span><span class="lines">@@ -825,7 +832,36 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
+
</ins><span class="cx"> inline String toProtocolString(TestProtocolDebuggerReason value)
</span><span class="cx"> {
</span><span class="cx">     switch(value) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationenumtypejsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-enum-type.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -749,7 +749,14 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> typedef NS_ENUM(NSInteger, TestProtocolRuntimeFarmAnimals) {
</span><span class="cx">     TestProtocolRuntimeFarmAnimalsPigs,
</span><span class="cx">     TestProtocolRuntimeFarmAnimalsCows,
</span><span class="lines">@@ -853,7 +860,36 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
+
</ins><span class="cx"> inline String toProtocolString(TestProtocolRuntimeFarmAnimals value)
</span><span class="cx"> {
</span><span class="cx">     switch(value) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtypedeclarationobjecttypejsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-declaration-object-type.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -1121,9 +1121,16 @@
</span><span class="cx"> @class TestProtocolDatabaseDummyObject;
</span><span class="cx"> @class TestProtocolTestParameterBundle;
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> __attribute__((visibility (&quot;default&quot;)))
</span><span class="cx"> @interface TestProtocolDatabaseError : RWIProtocolJSONObject
</span><span class="cx"> - (instancetype)initWithPayload:(NSDictionary&lt;NSString *, id&gt; *)payload;
</span><span class="lines">@@ -1278,10 +1285,39 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedtyperequiringruntimecastsjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/type-requiring-runtime-casts.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -1078,7 +1078,14 @@
</span><span class="cx"> @class TestProtocolTestRecursiveObject1;
</span><span class="cx"> @class TestProtocolTestRecursiveObject2;
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><ins>+
</ins><span class="cx"> typedef NS_ENUM(NSInteger, TestProtocolTestUncastedAnimals) {
</span><span class="cx">     TestProtocolTestUncastedAnimalsPigs,
</span><span class="cx">     TestProtocolTestUncastedAnimalsCows,
</span><span class="lines">@@ -1207,7 +1214,36 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
+
</ins><span class="cx"> inline String toProtocolString(TestProtocolTestUncastedAnimals value)
</span><span class="cx"> {
</span><span class="cx">     switch(value) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsgenericexpectedworkersupporteddomainsjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/generic/expected/worker-supported-domains.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -893,10 +893,17 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> @protocol TestProtocolDomainADomainHandler &lt;NSObject&gt;
</span><span class="cx"> @required
</span><span class="cx"> - (void)enableWithErrorCallback:(void(^)(NSString *error))errorCallback successCallback:(void(^)())successCallback;
</span><span class="lines">@@ -992,6 +999,35 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
+
+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsiosexpecteddefinitionswithmacplatformjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/ios/expected/definitions-with-mac-platform.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -646,6 +646,12 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="lines">@@ -655,6 +661,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> ### End File: TestProtocol.h
</span><span class="cx"> 
</span><span class="cx"> ### Begin File: TestProtocolInternal.h
</span><span class="lines">@@ -737,6 +744,35 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
+
+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorscriptstestsmacexpecteddefinitionswithmacplatformjsonresult"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/JavaScriptCore/inspector/scripts/tests/mac/expected/definitions-with-mac-platform.json-result        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -894,9 +894,16 @@
</span><span class="cx"> 
</span><span class="cx"> @class TestProtocolNetworkError;
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, TestProtocolPlatform) {
+    TestProtocolPlatformAll,
+    TestProtocolPlatformGeneric,
+    TestProtocolPlatformIOS,
+    TestProtocolPlatformMacOS,
+};
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> 
</span><ins>+
</ins><span class="cx"> __attribute__((visibility (&quot;default&quot;)))
</span><span class="cx"> @interface TestProtocolNetworkError : RWIProtocolJSONObject
</span><span class="cx"> - (instancetype)initWithPayload:(NSDictionary&lt;NSString *, id&gt; *)payload;
</span><span class="lines">@@ -1001,8 +1008,37 @@
</span><span class="cx"> template&lt;typename ObjCEnumType&gt;
</span><span class="cx"> ObjCEnumType fromProtocolString(const String&amp; value);
</span><span class="cx"> 
</span><ins>+inline String toProtocolString(TestProtocolPlatform value)
+{
+    switch(value) {
+    case TestProtocolPlatformAll:
+        return ASCIILiteral(&quot;all&quot;);
+    case TestProtocolPlatformGeneric:
+        return ASCIILiteral(&quot;generic&quot;);
+    case TestProtocolPlatformIOS:
+        return ASCIILiteral(&quot;ios&quot;);
+    case TestProtocolPlatformMacOS:
+        return ASCIILiteral(&quot;macos&quot;);
+    }
+}
</ins><span class="cx"> 
</span><ins>+template&lt;&gt;
+inline TestProtocolPlatform fromProtocolString(const String&amp; value)
+{
+    if (value == &quot;all&quot;)
+        return TestProtocolPlatformAll;
+    if (value == &quot;generic&quot;)
+        return TestProtocolPlatformGeneric;
+    if (value == &quot;ios&quot;)
+        return TestProtocolPlatformIOS;
+    if (value == &quot;macos&quot;)
+        return TestProtocolPlatformMacOS;
+    ASSERT_NOT_REACHED();
+    return TestProtocolPlatformAll;
+}
</ins><span class="cx"> 
</span><ins>+
+
</ins><span class="cx"> } // namespace Inspector
</span><span class="cx"> 
</span><span class="cx"> ### End File: TestProtocolTypeConversions.h
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/WebKit2/ChangeLog        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -1,5 +1,15 @@
</span><span class="cx"> 2017-02-10  Brian Burg  &lt;bburg@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        [Cocoa] Web Inspector: generate an NS_ENUM containing platforms supported by the protocol code generator
+        https://bugs.webkit.org/show_bug.cgi?id=168019
+        &lt;rdar://problem/28718990&gt;
+
+        Reviewed by Joseph Pecoraro.
+
+        * UIProcess/Automation/Automation.json: Fix the platform values to be lowercase.
+
+2017-02-10  Brian Burg  &lt;bburg@apple.com&gt;
+
</ins><span class="cx">         Web Automation: fail gracefully when a screenshot cannot be encoded as base64
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=168095
</span><span class="cx">         &lt;rdar://problem/30297427&gt;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAutomationAutomationjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Automation/Automation.json (212115 => 212116)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Automation/Automation.json        2017-02-10 17:25:36 UTC (rev 212115)
+++ trunk/Source/WebKit2/UIProcess/Automation/Automation.json        2017-02-10 17:29:36 UTC (rev 212116)
</span><span class="lines">@@ -248,7 +248,7 @@
</span><span class="cx">         {
</span><span class="cx">             &quot;name&quot;: &quot;resizeWindowOfBrowsingContext&quot;,
</span><span class="cx">             &quot;description&quot;: &quot;Resizes the window of the specified browsing context to the specified size.&quot;,
</span><del>-            &quot;platform&quot;: &quot;macOS&quot;,
</del><ins>+            &quot;platform&quot;: &quot;macos&quot;,
</ins><span class="cx">             &quot;parameters&quot;: [
</span><span class="cx">                 { &quot;name&quot;: &quot;handle&quot;, &quot;$ref&quot;: &quot;BrowsingContextHandle&quot;, &quot;description&quot;: &quot;The handle for the browsing context to be resized.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;size&quot;, &quot;$ref&quot;: &quot;Size&quot;, &quot;description&quot;: &quot;The new size for the browsing context's window.&quot; }
</span><span class="lines">@@ -257,7 +257,7 @@
</span><span class="cx">         {
</span><span class="cx">             &quot;name&quot;: &quot;moveWindowOfBrowsingContext&quot;,
</span><span class="cx">             &quot;description&quot;: &quot;Moves the window of the specified browsing context to the specified position.&quot;,
</span><del>-            &quot;platform&quot;: &quot;macOS&quot;,
</del><ins>+            &quot;platform&quot;: &quot;macos&quot;,
</ins><span class="cx">             &quot;parameters&quot;: [
</span><span class="cx">                 { &quot;name&quot;: &quot;handle&quot;, &quot;$ref&quot;: &quot;BrowsingContextHandle&quot;, &quot;description&quot;: &quot;The handle for the browsing context to be moved.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;origin&quot;, &quot;$ref&quot;: &quot;Point&quot;, &quot;description&quot;: &quot;The new origin for the browsing context's window. The position is interpreted in screen coordinate space, relative to the upper left corner of the screen.&quot; }
</span><span class="lines">@@ -299,7 +299,7 @@
</span><span class="cx">         {
</span><span class="cx">             &quot;name&quot;: &quot;inspectBrowsingContext&quot;,
</span><span class="cx">             &quot;description&quot;: &quot;Inspect the specified browsing context using Web Inspector.&quot;,
</span><del>-            &quot;platform&quot;: &quot;macOS&quot;,
</del><ins>+            &quot;platform&quot;: &quot;macos&quot;,
</ins><span class="cx">             &quot;parameters&quot;: [
</span><span class="cx">                 { &quot;name&quot;: &quot;handle&quot;, &quot;$ref&quot;: &quot;BrowsingContextHandle&quot;, &quot;description&quot;: &quot;The handle for the browsing context that should be inspected.&quot; },
</span><span class="cx">                 { &quot;name&quot;: &quot;enableAutoCapturing&quot;, &quot;type&quot;: &quot;boolean&quot;, &quot;optional&quot;: true, &quot;description&quot;: &quot;If this option is present and set to true, the Web Inspector will automatically start a timeline recording of the specified browsing context once it is attached. Note that this disables the debugger for the duration of the recording.&quot; }
</span></span></pre>
</div>
</div>

</body>
</html>