<!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>[210928] trunk/Source/WebInspectorUI</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/210928">210928</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2017-01-19 09:59:12 -0800 (Thu, 19 Jan 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Dashboard's log/error/warning help tag says &quot;click to show the Console&quot; even when clicking does nothing
https://bugs.webkit.org/show_bug.cgi?id=167102

Patch by Devin Rousso &lt;dcrousso+webkit@gmail.com&gt; on 2017-01-19
Reviewed by Brian Burg.

* UserInterface/Base/Main.js:
(WebInspector.showConsoleTab):
Don't revert to the All scopes if the requested scope is already selected.

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Views/DefaultDashboardView.js:
(WebInspector.DefaultDashboardView):
(WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem):
(WebInspector.DefaultDashboardView.prototype._setItemEnabled):
Only apply a title to the element when it is enabled.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs">trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceBaseMainjs">trunk/Source/WebInspectorUI/UserInterface/Base/Main.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceViewsDefaultDashboardViewjs">trunk/Source/WebInspectorUI/UserInterface/Views/DefaultDashboardView.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (210927 => 210928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2017-01-19 17:52:36 UTC (rev 210927)
+++ trunk/Source/WebInspectorUI/ChangeLog        2017-01-19 17:59:12 UTC (rev 210928)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2017-01-19  Devin Rousso  &lt;dcrousso+webkit@gmail.com&gt;
+
+        Web Inspector: Dashboard's log/error/warning help tag says &quot;click to show the Console&quot; even when clicking does nothing
+        https://bugs.webkit.org/show_bug.cgi?id=167102
+
+        Reviewed by Brian Burg.
+
+        * UserInterface/Base/Main.js:
+        (WebInspector.showConsoleTab):
+        Don't revert to the All scopes if the requested scope is already selected.
+
+        * Localizations/en.lproj/localizedStrings.js:
+        * UserInterface/Views/DefaultDashboardView.js:
+        (WebInspector.DefaultDashboardView):
+        (WebInspector.DefaultDashboardView.prototype._appendElementForNamedItem):
+        (WebInspector.DefaultDashboardView.prototype._setItemEnabled):
+        Only apply a title to the element when it is enabled.
+
</ins><span class="cx"> 2017-01-18  Devin Rousso  &lt;dcrousso+webkit@gmail.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Web Inspector: split console should be allowed for Network and Timeline tabs when Inspector is not docked
</span></span></pre></div>
<a id="trunkSourceWebInspectorUILocalizationsenlprojlocalizedStringsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (210927 => 210928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2017-01-19 17:52:36 UTC (rev 210927)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js        2017-01-19 17:59:12 UTC (rev 210928)
</span><span class="lines">@@ -195,10 +195,7 @@
</span><span class="cx"> localizedStrings[&quot;Console Evaluation %d&quot;] = &quot;Console Evaluation %d&quot;;
</span><span class="cx"> localizedStrings[&quot;Console Profile Recorded&quot;] = &quot;Console Profile Recorded&quot;;
</span><span class="cx"> localizedStrings[&quot;Console cleared at %s&quot;] = &quot;Console cleared at %s&quot;;
</span><del>-localizedStrings[&quot;Console errors, click to show the Console tab&quot;] = &quot;Console errors, click to show the Console tab&quot;;
-localizedStrings[&quot;Console logs, click to show the Console tab&quot;] = &quot;Console logs, click to show the Console tab&quot;;
</del><span class="cx"> localizedStrings[&quot;Console opened at %s&quot;] = &quot;Console opened at %s&quot;;
</span><del>-localizedStrings[&quot;Console warnings, click to show the Console tab&quot;] = &quot;Console warnings, click to show the Console tab&quot;;
</del><span class="cx"> localizedStrings[&quot;Console:&quot;] = &quot;Console:&quot;;
</span><span class="cx"> localizedStrings[&quot;Container Regions&quot;] = &quot;Container Regions&quot;;
</span><span class="cx"> localizedStrings[&quot;Content&quot;] = &quot;Content&quot;;
</span><span class="lines">@@ -699,10 +696,16 @@
</span><span class="cx"> localizedStrings[&quot;Show all resources&quot;] = &quot;Show all resources&quot;;
</span><span class="cx"> localizedStrings[&quot;Show compositing borders&quot;] = &quot;Show compositing borders&quot;;
</span><span class="cx"> localizedStrings[&quot;Show console tab&quot;] = &quot;Show console tab&quot;;
</span><ins>+localizedStrings[&quot;Show errors logged to the Console&quot;] = &quot;Show errors logged to the Console&quot;;
+localizedStrings[&quot;Show messages logged to the Console&quot;] = &quot;Show messages logged to the Console&quot;;
+localizedStrings[&quot;Show network information&quot;] = &quot;Show network information&quot;;
+localizedStrings[&quot;Show page load timing&quot;] = &quot;Show page load timing&quot;;
+localizedStrings[&quot;Show page resources&quot;] = &quot;Show page resources&quot;;
</ins><span class="cx"> localizedStrings[&quot;Show shadow DOM nodes&quot;] = &quot;Show shadow DOM nodes&quot;;
</span><span class="cx"> localizedStrings[&quot;Show the details sidebar (%s)&quot;] = &quot;Show the details sidebar (%s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Show the navigation sidebar (%s)&quot;] = &quot;Show the navigation sidebar (%s)&quot;;
</span><span class="cx"> localizedStrings[&quot;Show type information&quot;] = &quot;Show type information&quot;;
</span><ins>+localizedStrings[&quot;Show warnings logged to the Console&quot;] = &quot;Show warnings logged to the Console&quot;;
</ins><span class="cx"> localizedStrings[&quot;Shrink&quot;] = &quot;Shrink&quot;;
</span><span class="cx"> localizedStrings[&quot;Size&quot;] = &quot;Size&quot;;
</span><span class="cx"> localizedStrings[&quot;Size of the current object plus the size of all objects it keeps alive.&quot;] = &quot;Size of the current object plus the size of all objects it keeps alive.&quot;;
</span><span class="lines">@@ -776,7 +779,6 @@
</span><span class="cx"> localizedStrings[&quot;This object is referenced by internal objects&quot;] = &quot;This object is referenced by internal objects&quot;;
</span><span class="cx"> localizedStrings[&quot;This property needs a value.\nClick to open autocomplete.&quot;] = &quot;This property needs a value.\nClick to open autocomplete.&quot;;
</span><span class="cx"> localizedStrings[&quot;Time&quot;] = &quot;Time&quot;;
</span><del>-localizedStrings[&quot;Time until the load event fired, click to show the Network Requests timeline&quot;] = &quot;Time until the load event fired, click to show the Network Requests timeline&quot;;
</del><span class="cx"> localizedStrings[&quot;Timeline&quot;] = &quot;Timeline&quot;;
</span><span class="cx"> localizedStrings[&quot;Timeline Recording %d&quot;] = &quot;Timeline Recording %d&quot;;
</span><span class="cx"> localizedStrings[&quot;Timelines&quot;] = &quot;Timelines&quot;;
</span><span class="lines">@@ -793,8 +795,6 @@
</span><span class="cx"> localizedStrings[&quot;Top Functions&quot;] = &quot;Top Functions&quot;;
</span><span class="cx"> localizedStrings[&quot;Total Time&quot;] = &quot;Total Time&quot;;
</span><span class="cx"> localizedStrings[&quot;Total memory size at the end of the selected time range&quot;] = &quot;Total memory size at the end of the selected time range&quot;;
</span><del>-localizedStrings[&quot;Total number of resources, click to show the Resources tab&quot;] = &quot;Total number of resources, click to show the Resources tab&quot;;
-localizedStrings[&quot;Total size of all resources, click to show the Network Requests timeline&quot;] = &quot;Total size of all resources, click to show the Network Requests timeline&quot;;
</del><span class="cx"> localizedStrings[&quot;Total time&quot;] = &quot;Total time&quot;;
</span><span class="cx"> localizedStrings[&quot;Trace&quot;] = &quot;Trace&quot;;
</span><span class="cx"> localizedStrings[&quot;Trace: %s&quot;] = &quot;Trace: %s&quot;;
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceBaseMainjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (210927 => 210928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2017-01-19 17:52:36 UTC (rev 210927)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js        2017-01-19 17:59:12 UTC (rev 210928)
</span><span class="lines">@@ -954,17 +954,12 @@
</span><span class="cx"> 
</span><span class="cx"> WebInspector.showConsoleTab = function(requestedScope)
</span><span class="cx"> {
</span><ins>+    requestedScope = requestedScope || WebInspector.LogContentView.Scopes.All;
+
</ins><span class="cx">     this.hideSplitConsole();
</span><span class="cx"> 
</span><del>-    var scope = requestedScope || WebInspector.LogContentView.Scopes.All;
</del><ins>+    this.consoleContentView.scopeBar.item(requestedScope).selected = true;
</ins><span class="cx"> 
</span><del>-    // If the requested scope is already selected and the console is showing, then switch back to All.
-    if (this.isShowingConsoleTab() &amp;&amp; this.consoleContentView.scopeBar.item(scope).selected)
-        scope = WebInspector.LogContentView.Scopes.All;
-
-    if (requestedScope || !this.consoleContentView.scopeBar.selectedItems.length)
-        this.consoleContentView.scopeBar.item(scope).selected = true;
-
</del><span class="cx">     this.showRepresentedObject(this._consoleRepresentedObject);
</span><span class="cx"> 
</span><span class="cx">     console.assert(this.isShowingConsoleTab());
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceViewsDefaultDashboardViewjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DefaultDashboardView.js (210927 => 210928)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/Views/DefaultDashboardView.js        2017-01-19 17:52:36 UTC (rev 210927)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DefaultDashboardView.js        2017-01-19 17:59:12 UTC (rev 210928)
</span><span class="lines">@@ -34,27 +34,27 @@
</span><span class="cx"> 
</span><span class="cx">         this._items = {
</span><span class="cx">             resourcesCount: {
</span><del>-                tooltip: WebInspector.UIString(&quot;Total number of resources, click to show the Resources tab&quot;),
</del><ins>+                tooltip: WebInspector.UIString(&quot;Show page resources&quot;),
</ins><span class="cx">                 handler: this._resourcesItemWasClicked
</span><span class="cx">             },
</span><span class="cx">             resourcesSize: {
</span><del>-                tooltip: WebInspector.UIString(&quot;Total size of all resources, click to show the Network Requests timeline&quot;),
</del><ins>+                tooltip: WebInspector.UIString(&quot;Show network information&quot;),
</ins><span class="cx">                 handler: this._networkItemWasClicked
</span><span class="cx">             },
</span><span class="cx">             time: {
</span><del>-                tooltip: WebInspector.UIString(&quot;Time until the load event fired, click to show the Network Requests timeline&quot;),
</del><ins>+                tooltip: WebInspector.UIString(&quot;Show page load timing&quot;),
</ins><span class="cx">                 handler: this._timelineItemWasClicked
</span><span class="cx">             },
</span><span class="cx">             logs: {
</span><del>-                tooltip: WebInspector.UIString(&quot;Console logs, click to show the Console tab&quot;),
</del><ins>+                tooltip: WebInspector.UIString(&quot;Show messages logged to the Console&quot;),
</ins><span class="cx">                 handler: this._consoleItemWasClicked.bind(this, WebInspector.LogContentView.Scopes.Logs)
</span><span class="cx">             },
</span><span class="cx">             errors: {
</span><del>-                tooltip: WebInspector.UIString(&quot;Console errors, click to show the Console tab&quot;),
</del><ins>+                tooltip: WebInspector.UIString(&quot;Show errors logged to the Console&quot;),
</ins><span class="cx">                 handler: this._consoleItemWasClicked.bind(this, WebInspector.LogContentView.Scopes.Errors)
</span><span class="cx">             },
</span><span class="cx">             issues: {
</span><del>-                tooltip: WebInspector.UIString(&quot;Console warnings, click to show the Console tab&quot;),
</del><ins>+                tooltip: WebInspector.UIString(&quot;Show warnings logged to the Console&quot;),
</ins><span class="cx">                 handler: this._consoleItemWasClicked.bind(this, WebInspector.LogContentView.Scopes.Warnings)
</span><span class="cx">             }
</span><span class="cx">         };
</span><span class="lines">@@ -101,7 +101,6 @@
</span><span class="cx"> 
</span><span class="cx">         item.container = this._element.appendChild(document.createElement(&quot;div&quot;));
</span><span class="cx">         item.container.className = &quot;item &quot; + name;
</span><del>-        item.container.title = item.tooltip;
</del><span class="cx"> 
</span><span class="cx">         item.container.appendChild(document.createElement(&quot;img&quot;));
</span><span class="cx"> 
</span><span class="lines">@@ -188,10 +187,13 @@
</span><span class="cx"> 
</span><span class="cx">     _setItemEnabled(item, enabled)
</span><span class="cx">     {
</span><del>-        if (enabled)
</del><ins>+        if (enabled) {
+            item.container.title = item.tooltip;
</ins><span class="cx">             item.container.classList.add(WebInspector.DefaultDashboardView.EnabledItemStyleClassName);
</span><del>-        else
</del><ins>+        } else {
+            item.container.title = &quot;&quot;;
</ins><span class="cx">             item.container.classList.remove(WebInspector.DefaultDashboardView.EnabledItemStyleClassName);
</span><ins>+        }
</ins><span class="cx">     }
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>