<!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>[194259] 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/194259">194259</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-12-17 20:18:01 -0800 (Thu, 17 Dec 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Remove &quot;local&quot; scope type from the protocol
https://bugs.webkit.org/show_bug.cgi?id=152409

Patch by Joseph Pecoraro &lt;pecoraro@apple.com&gt; on 2015-12-17
Reviewed by Timothy Hatcher.

Source/JavaScriptCore:

After <a href="http://trac.webkit.org/projects/webkit/changeset/194251">r194251</a> the backend no longer sends this scope type.
So remove it from the protocol.

The concept of a Local Scope should be calculatable by the
frontend. In fact the way the backend used to do this could
easily be done by the frontend. To be done in a follow-up.

* inspector/InjectedScriptSource.js:
* inspector/JSJavaScriptCallFrame.h:
* inspector/protocol/Debugger.json:

Source/WebInspectorUI:

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorInjectedScriptSourcejs">trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorJSJavaScriptCallFrameh">trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorprotocolDebuggerjson">trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json</a></li>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceControllersDebuggerManagerjs">trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (194258 => 194259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2015-12-18 04:14:40 UTC (rev 194258)
+++ trunk/Source/JavaScriptCore/ChangeLog        2015-12-18 04:18:01 UTC (rev 194259)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2015-12-17  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
+        Web Inspector: Remove &quot;local&quot; scope type from the protocol
+        https://bugs.webkit.org/show_bug.cgi?id=152409
+
+        Reviewed by Timothy Hatcher.
+
+        After r194251 the backend no longer sends this scope type.
+        So remove it from the protocol.
+
+        The concept of a Local Scope should be calculatable by the
+        frontend. In fact the way the backend used to do this could
+        easily be done by the frontend. To be done in a follow-up.
+
+        * inspector/InjectedScriptSource.js:
+        * inspector/JSJavaScriptCallFrame.h:
+        * inspector/protocol/Debugger.json:
+
</ins><span class="cx"> 2015-12-17  Sukolsak Sakshuwong  &lt;sukolsak@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [INTL] Implement Collator Compare Functions
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorInjectedScriptSourcejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js (194258 => 194259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2015-12-18 04:14:40 UTC (rev 194258)
+++ trunk/Source/JavaScriptCore/inspector/InjectedScriptSource.js        2015-12-18 04:18:01 UTC (rev 194259)
</span><span class="lines">@@ -1363,13 +1363,12 @@
</span><span class="cx"> 
</span><span class="cx"> InjectedScript.CallFrameProxy._scopeTypeNames = {
</span><span class="cx">     0: &quot;global&quot;, // GLOBAL_SCOPE
</span><del>-    1: &quot;local&quot;, // LOCAL_SCOPE
-    2: &quot;with&quot;, // WITH_SCOPE
-    3: &quot;closure&quot;, // CLOSURE_SCOPE
-    4: &quot;catch&quot;, // CATCH_SCOPE
-    5: &quot;functionName&quot;, // FUNCTION_NAME_SCOPE
-    6: &quot;globalLexicalEnvironment&quot;, // GLOBAL_LEXICAL_ENVIRONMENT_SCOPE
-    7: &quot;nestedLexical&quot;, // NESTED_LEXICAL_SCOPE
</del><ins>+    1: &quot;with&quot;, // WITH_SCOPE
+    2: &quot;closure&quot;, // CLOSURE_SCOPE
+    3: &quot;catch&quot;, // CATCH_SCOPE
+    4: &quot;functionName&quot;, // FUNCTION_NAME_SCOPE
+    5: &quot;globalLexicalEnvironment&quot;, // GLOBAL_LEXICAL_ENVIRONMENT_SCOPE
+    6: &quot;nestedLexical&quot;, // NESTED_LEXICAL_SCOPE
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> InjectedScript.CallFrameProxy._createScopeJson = function(scopeTypeCode, scopeObject, groupId)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorJSJavaScriptCallFrameh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.h (194258 => 194259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.h        2015-12-18 04:14:40 UTC (rev 194258)
+++ trunk/Source/JavaScriptCore/inspector/JSJavaScriptCallFrame.h        2015-12-18 04:18:01 UTC (rev 194259)
</span><span class="lines">@@ -72,13 +72,12 @@
</span><span class="cx"> 
</span><span class="cx">     // Constants.
</span><span class="cx">     static const unsigned short GLOBAL_SCOPE = 0;
</span><del>-    static const unsigned short LOCAL_SCOPE = 1;
-    static const unsigned short WITH_SCOPE = 2;
-    static const unsigned short CLOSURE_SCOPE = 3;
-    static const unsigned short CATCH_SCOPE = 4;
-    static const unsigned short FUNCTION_NAME_SCOPE = 5;
-    static const unsigned short GLOBAL_LEXICAL_ENVIRONMENT_SCOPE = 6;
-    static const unsigned short NESTED_LEXICAL_SCOPE = 7;
</del><ins>+    static const unsigned short WITH_SCOPE = 1;
+    static const unsigned short CLOSURE_SCOPE = 2;
+    static const unsigned short CATCH_SCOPE = 3;
+    static const unsigned short FUNCTION_NAME_SCOPE = 4;
+    static const unsigned short GLOBAL_LEXICAL_ENVIRONMENT_SCOPE = 5;
+    static const unsigned short NESTED_LEXICAL_SCOPE = 6;
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     void finishCreation(JSC::VM&amp;);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorprotocolDebuggerjson"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json (194258 => 194259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json        2015-12-18 04:14:40 UTC (rev 194258)
+++ trunk/Source/JavaScriptCore/inspector/protocol/Debugger.json        2015-12-18 04:18:01 UTC (rev 194259)
</span><span class="lines">@@ -81,7 +81,7 @@
</span><span class="cx">             &quot;id&quot;: &quot;Scope&quot;,
</span><span class="cx">             &quot;type&quot;: &quot;object&quot;,
</span><span class="cx">             &quot;properties&quot;: [
</span><del>-                { &quot;name&quot;: &quot;type&quot;, &quot;type&quot;: &quot;string&quot;, &quot;enum&quot;: [&quot;global&quot;, &quot;local&quot;, &quot;with&quot;, &quot;closure&quot;, &quot;catch&quot;, &quot;functionName&quot;, &quot;globalLexicalEnvironment&quot;, &quot;nestedLexical&quot;], &quot;description&quot;: &quot;Scope type.&quot; },
</del><ins>+                { &quot;name&quot;: &quot;type&quot;, &quot;type&quot;: &quot;string&quot;, &quot;enum&quot;: [&quot;global&quot;, &quot;with&quot;, &quot;closure&quot;, &quot;catch&quot;, &quot;functionName&quot;, &quot;globalLexicalEnvironment&quot;, &quot;nestedLexical&quot;], &quot;description&quot;: &quot;Scope type.&quot; },
</ins><span class="cx">                 { &quot;name&quot;: &quot;object&quot;, &quot;$ref&quot;: &quot;Runtime.RemoteObject&quot;, &quot;description&quot;: &quot;Object representing the scope. For &lt;code&gt;global&lt;/code&gt; and &lt;code&gt;with&lt;/code&gt; scopes it represents the actual object; for the rest of the scopes, it is artificial transient object enumerating scope variables as its properties.&quot; }
</span><span class="cx">             ],
</span><span class="cx">             &quot;description&quot;: &quot;Scope description.&quot;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (194258 => 194259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2015-12-18 04:14:40 UTC (rev 194258)
+++ trunk/Source/WebInspectorUI/ChangeLog        2015-12-18 04:18:01 UTC (rev 194259)
</span><span class="lines">@@ -1,5 +1,15 @@
</span><span class="cx"> 2015-12-17  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Remove &quot;local&quot; scope type from the protocol
+        https://bugs.webkit.org/show_bug.cgi?id=152409
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Controllers/DebuggerManager.js:
+        (WebInspector.DebuggerManager.prototype._scopeChainNodeFromPayload):
+
+2015-12-17  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: CSS warning's fake CallFrame is not creating a valid payload
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=152413
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceControllersDebuggerManagerjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js (194258 => 194259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js        2015-12-18 04:14:40 UTC (rev 194258)
+++ trunk/Source/WebInspectorUI/UserInterface/Controllers/DebuggerManager.js        2015-12-18 04:18:01 UTC (rev 194259)
</span><span class="lines">@@ -585,9 +585,6 @@
</span><span class="cx">     {
</span><span class="cx">         var type = null;
</span><span class="cx">         switch (payload.type) {
</span><del>-        case DebuggerAgent.ScopeType.Local:
-            type = WebInspector.ScopeChainNode.Type.Local;
-            break;
</del><span class="cx">         case DebuggerAgent.ScopeType.Global:
</span><span class="cx">             type = WebInspector.ScopeChainNode.Type.Global;
</span><span class="cx">             break;
</span><span class="lines">@@ -609,6 +606,13 @@
</span><span class="cx">         case DebuggerAgent.ScopeType.GlobalLexicalEnvironment:
</span><span class="cx">             type = WebInspector.ScopeChainNode.Type.GlobalLexicalEnvironment;
</span><span class="cx">             break;
</span><ins>+
+        // COMPATIBILITY (iOS 9): Debugger.ScopeType.Local used to be provided by the backend.
+        // Newer backends no longer send this enum value, it should be computed by the frontend.
+        case DebuggerAgent.ScopeType.Local:
+            type = WebInspector.ScopeChainNode.Type.Local;
+            break;
+
</ins><span class="cx">         default:
</span><span class="cx">             console.error(&quot;Unknown type: &quot; + payload.type);
</span><span class="cx">         }
</span></span></pre>
</div>
</div>

</body>
</html>