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