Title: [259101] trunk/Source/WebInspectorUI
Revision
259101
Author
drou...@apple.com
Date
2020-03-26 20:07:25 -0700 (Thu, 26 Mar 2020)

Log Message

Web Inspector: add keyboard shortcut to tooltip of pinned tabs
https://bugs.webkit.org/show_bug.cgi?id=209640

Reviewed by Timothy Hatcher.

* UserInterface/Views/TabBarItem.js:
(WI.TabBarItem):
(WI.TabBarItem.prototype.get displayName): Added.
(WI.TabBarItem.prototype.set displayName): Added.
(WI.TabBarItem.prototype.set title):
(WI.TabBarItem.prototype.titleDidChange): Deleted.
* UserInterface/Views/GeneralTabBarItem.js:
(WI.GeneralTabBarItem.fromTabContentView):
(WI.GeneralTabBarItem.prototype.get displayName): Added.
(WI.GeneralTabBarItem.prototype.set displayName): Added.
(WI.GeneralTabBarItem.prototype.get title): Deleted.
(WI.GeneralTabBarItem.prototype.set title): Deleted.
* UserInterface/Views/PinnedTabBarItem.js:
(WI.PinnedTabBarItem):
(WI.PinnedTabBarItem.fromTabContentView):
(WI.PinnedTabBarItem.titleDidChange): Deleted.
* UserInterface/Views/TabBar.css:
(.tab-bar > .tabs > .item > .name): Added.
(body.window-inactive .tab-bar > .tabs > .item > .name): Added.
(.tab-bar > .tabs > .item > .name > .content): Added.
(.tab-bar > .tabs > .item:not(.selected):hover > .name): Added.
(.tab-bar > .tabs > .item:not(.disabled).selected > .name): Added.
(body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .name): Added.
(.tab-bar > .tabs > .item > .title): Deleted.
(body.window-inactive .tab-bar > .tabs > .item > .title): Deleted.
(.tab-bar > .tabs > .item > .title > .content): Deleted.
(.tab-bar > .tabs > .item:not(.selected):hover > .title): Deleted.
(.tab-bar > .tabs > .item:not(.disabled).selected > .title): Deleted.
(body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .title): Deleted.
Separate the shown name of the tab (`displayName`) from the tooltip text (`title`).

* UserInterface/Views/SearchTabContentView.js:
(WI.SearchTabContentView.tabInfo):
* UserInterface/Views/SettingsTabContentView.js:
(WI.SettingsTabContentView.tabInfo):
Move the current `title` value to `displayName` and add a new `title` value with the
keyboard shortcut in parenthesis.

* UserInterface/Views/AuditTabContentView.js:
(WI.AuditTabContentView.tabInfo):
* UserInterface/Views/ConsoleTabContentView.js:
(WI.ConsoleTabContentView.tabInfo):
* UserInterface/Views/ElementsTabContentView.js:
(WI.ElementsTabContentView.tabInfo):
* UserInterface/Views/GraphicsTabContentView.js:
(WI.GraphicsTabContentView.tabInfo):
* UserInterface/Views/LayersTabContentView.js:
(WI.LayersTabContentView.tabInfo):
* UserInterface/Views/NetworkTabContentView.js:
(WI.NetworkTabContentView.tabInfo):
* UserInterface/Views/SourcesTabContentView.js:
(WI.SourcesTabContentView.tabInfo):
* UserInterface/Views/StorageTabContentView.js:
(WI.StorageTabContentView.tabInfo):
* UserInterface/Views/TimelineTabContentView.js:
(WI.TimelineTabContentView.tabInfo):
Use `displayName` instead of `title` since the name is shown in the UI.

* UserInterface/Base/Main.js:
(WI.contentLoaded):
Make the Settings Tab shortcut public.

* Localizations/en.lproj/localizedStrings.js:

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (259100 => 259101)


--- trunk/Source/WebInspectorUI/ChangeLog	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/ChangeLog	2020-03-27 03:07:25 UTC (rev 259101)
@@ -1,3 +1,74 @@
+2020-03-26  Devin Rousso  <drou...@apple.com>
+
+        Web Inspector: add keyboard shortcut to tooltip of pinned tabs
+        https://bugs.webkit.org/show_bug.cgi?id=209640
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/TabBarItem.js:
+        (WI.TabBarItem):
+        (WI.TabBarItem.prototype.get displayName): Added.
+        (WI.TabBarItem.prototype.set displayName): Added.
+        (WI.TabBarItem.prototype.set title):
+        (WI.TabBarItem.prototype.titleDidChange): Deleted.
+        * UserInterface/Views/GeneralTabBarItem.js:
+        (WI.GeneralTabBarItem.fromTabContentView):
+        (WI.GeneralTabBarItem.prototype.get displayName): Added.
+        (WI.GeneralTabBarItem.prototype.set displayName): Added.
+        (WI.GeneralTabBarItem.prototype.get title): Deleted.
+        (WI.GeneralTabBarItem.prototype.set title): Deleted.
+        * UserInterface/Views/PinnedTabBarItem.js:
+        (WI.PinnedTabBarItem):
+        (WI.PinnedTabBarItem.fromTabContentView):
+        (WI.PinnedTabBarItem.titleDidChange): Deleted.
+        * UserInterface/Views/TabBar.css:
+        (.tab-bar > .tabs > .item > .name): Added.
+        (body.window-inactive .tab-bar > .tabs > .item > .name): Added.
+        (.tab-bar > .tabs > .item > .name > .content): Added.
+        (.tab-bar > .tabs > .item:not(.selected):hover > .name): Added.
+        (.tab-bar > .tabs > .item:not(.disabled).selected > .name): Added.
+        (body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .name): Added.
+        (.tab-bar > .tabs > .item > .title): Deleted.
+        (body.window-inactive .tab-bar > .tabs > .item > .title): Deleted.
+        (.tab-bar > .tabs > .item > .title > .content): Deleted.
+        (.tab-bar > .tabs > .item:not(.selected):hover > .title): Deleted.
+        (.tab-bar > .tabs > .item:not(.disabled).selected > .title): Deleted.
+        (body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .title): Deleted.
+        Separate the shown name of the tab (`displayName`) from the tooltip text (`title`).
+
+        * UserInterface/Views/SearchTabContentView.js:
+        (WI.SearchTabContentView.tabInfo):
+        * UserInterface/Views/SettingsTabContentView.js:
+        (WI.SettingsTabContentView.tabInfo):
+        Move the current `title` value to `displayName` and add a new `title` value with the
+        keyboard shortcut in parenthesis.
+
+        * UserInterface/Views/AuditTabContentView.js:
+        (WI.AuditTabContentView.tabInfo):
+        * UserInterface/Views/ConsoleTabContentView.js:
+        (WI.ConsoleTabContentView.tabInfo):
+        * UserInterface/Views/ElementsTabContentView.js:
+        (WI.ElementsTabContentView.tabInfo):
+        * UserInterface/Views/GraphicsTabContentView.js:
+        (WI.GraphicsTabContentView.tabInfo):
+        * UserInterface/Views/LayersTabContentView.js:
+        (WI.LayersTabContentView.tabInfo):
+        * UserInterface/Views/NetworkTabContentView.js:
+        (WI.NetworkTabContentView.tabInfo):
+        * UserInterface/Views/SourcesTabContentView.js:
+        (WI.SourcesTabContentView.tabInfo):
+        * UserInterface/Views/StorageTabContentView.js:
+        (WI.StorageTabContentView.tabInfo):
+        * UserInterface/Views/TimelineTabContentView.js:
+        (WI.TimelineTabContentView.tabInfo):
+        Use `displayName` instead of `title` since the name is shown in the UI.
+
+        * UserInterface/Base/Main.js:
+        (WI.contentLoaded):
+        Make the Settings Tab shortcut public.
+
+        * Localizations/en.lproj/localizedStrings.js:
+
 2020-03-26  Nikita Vasilyev  <nvasil...@apple.com>
 
         Web Inspector: RTL: ArrowLeft and ArrowRight keys select wrong navigation bar items

Modified: trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/Localizations/en.lproj/localizedStrings.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -165,8 +165,9 @@
 /* A submenu item of 'Break On' that breaks (pauses) before DOM attribute is modified */
 localizedStrings["Attribute Modified"] = "Attribute Modified";
 localizedStrings["Attributes"] = "Attributes";
-localizedStrings["Audit"] = "Audit";
 localizedStrings["Audit Error: %s"] = "Audit Error: %s";
+/* Name of Audit Tab */
+localizedStrings["Audit Tab Name"] = "Audit";
 localizedStrings["Audit Warning: %s"] = "Audit Warning: %s";
 localizedStrings["Audit version: %s"] = "Audit version: %s";
 localizedStrings["Audits"] = "Audits";
@@ -316,6 +317,8 @@
 localizedStrings["Console Evaluation"] = "Console Evaluation";
 localizedStrings["Console Evaluation %d"] = "Console Evaluation %d";
 localizedStrings["Console Profile Recorded"] = "Console Profile Recorded";
+/* Name of Console Tab */
+localizedStrings["Console Tab Name"] = "Console";
 localizedStrings["Console cleared at %s"] = "Console cleared at %s";
 localizedStrings["Console opened at %s"] = "Console opened at %s";
 localizedStrings["Console prompt"] = "Console prompt";
@@ -480,6 +483,8 @@
 localizedStrings["Element may overlap another compositing element"] = "Element may overlap another compositing element";
 localizedStrings["Element overlaps other compositing element"] = "Element overlaps other compositing element";
 localizedStrings["Elements"] = "Elements";
+/* Name of Elements Tab */
+localizedStrings["Elements Tab Name"] = "Elements";
 localizedStrings["Emulate User Gesture"] = "Emulate User Gesture";
 localizedStrings["Enable Breakpoint"] = "Enable Breakpoint";
 localizedStrings["Enable Breakpoints"] = "Enable Breakpoints";
@@ -605,7 +610,8 @@
 localizedStrings["Global Lexical Environment"] = "Global Lexical Environment";
 localizedStrings["Global Variables"] = "Global Variables";
 localizedStrings["Grammar"] = "Grammar";
-localizedStrings["Graphics"] = "Graphics";
+/* Name of Graphics Tab */
+localizedStrings["Graphics Tab Name"] = "Graphics";
 localizedStrings["Group"] = "Group";
 localizedStrings["Group By Resource"] = "Group By Resource";
 localizedStrings["Group Media Requests"] = "Group Media Requests";
@@ -698,6 +704,8 @@
 localizedStrings["Layer Count: %d"] = "Layer Count: %d";
 localizedStrings["Layer Info"] = "Layer Info";
 localizedStrings["Layers"] = "Layers";
+/* Name of Layers Tab */
+localizedStrings["Layers Tab Name"] = "Layers";
 localizedStrings["Layout & Rendering"] = "Layout & Rendering";
 /* Layout phase timeline records */
 localizedStrings["Layout @ Timeline record"] = "Layout";
@@ -779,6 +787,8 @@
 localizedStrings["Network Issue"] = "Network Issue";
 localizedStrings["Network Requests"] = "Network Requests";
 localizedStrings["Network Requests:"] = "Network Requests:";
+/* Name of Network Tab */
+localizedStrings["Network Tab Name"] = "Network";
 /* A submenu item of 'Add' to add DOM nodes after the selected DOM node */
 localizedStrings["Next Sibling"] = "Next Sibling";
 localizedStrings["No"] = "No";
@@ -1043,6 +1053,10 @@
 localizedStrings["Search"] = "Search";
 localizedStrings["Search Again"] = "Search Again";
 localizedStrings["Search Resource Content"] = "Search Resource Content";
+/* Name of Search Tab */
+localizedStrings["Search Tab Name"] = "Search";
+/* Title of Search Tab with keyboard shortcut */
+localizedStrings["Search Tab Title"] = "Search (%s)";
 /* Settings tab label for search related settings */
 localizedStrings["Search: @ Settings"] = "Search:";
 localizedStrings["Searching %s"] = "Searching %s";
@@ -1077,7 +1091,10 @@
 localizedStrings["Session Storage"] = "Session Storage";
 localizedStrings["Set to Automatically Continue"] = "Set to Automatically Continue";
 localizedStrings["Setter"] = "Setter";
-localizedStrings["Settings"] = "Settings";
+/* Name of Settings Tab */
+localizedStrings["Settings Tab Name"] = "Settings";
+/* Title of Settings Tab with keyboard shortcut */
+localizedStrings["Settings Tab Title"] = "Settings (%s)";
 localizedStrings["Shader Programs"] = "Shader Programs";
 localizedStrings["Shadow Content"] = "Shadow Content";
 localizedStrings["Shadow Content (%s)"] = "Shadow Content (%s)";
@@ -1123,6 +1140,8 @@
 localizedStrings["Source"] = "Source";
 localizedStrings["Source Maps:"] = "Source Maps:";
 localizedStrings["Sources"] = "Sources";
+/* Name of Sources Tab */
+localizedStrings["Sources Tab Name"] = "Sources";
 localizedStrings["Space"] = "Space";
 localizedStrings["Spaces"] = "Spaces";
 localizedStrings["Specially Exposed Data"] = "Specially Exposed Data";
@@ -1155,6 +1174,8 @@
 localizedStrings["Stop recording once page loads"] = "Stop recording once page loads";
 localizedStrings["Stopping the \u201C%s\u201D audit"] = "Stopping the \u201C%s\u201D audit";
 localizedStrings["Storage"] = "Storage";
+/* Name of Storage Tab */
+localizedStrings["Storage Tab Name"] = "Storage";
 /* CSS properties defined via HTML style attribute */
 localizedStrings["Style Attribute"] = "Style Attribute";
 localizedStrings["Style Sheet"] = "Style Sheet";
@@ -1242,7 +1263,8 @@
 localizedStrings["Timeline"] = "Timeline";
 localizedStrings["Timeline Recording %d"] = "Timeline Recording %d";
 localizedStrings["Timeline Recording Import Error: %s"] = "Timeline Recording Import Error: %s";
-localizedStrings["Timelines"] = "Timelines";
+/* Name of Timelines Tab */
+localizedStrings["Timelines Tab Name"] = "Timelines";
 localizedStrings["Timer %d Fired"] = "Timer %d Fired";
 localizedStrings["Timer %d Installed"] = "Timer %d Installed";
 localizedStrings["Timer %d Removed"] = "Timer %d Removed";

Modified: trunk/Source/WebInspectorUI/UserInterface/Base/Main.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Base/Main.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -362,7 +362,7 @@
     WI.stepIntoAlternateKeyboardShortcut = new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.CommandOrControl, WI.KeyboardShortcut.Key.Semicolon, WI.debuggerStepInto);
     WI.stepOutAlternateKeyboardShortcut = new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.Shift | WI.KeyboardShortcut.Modifier.CommandOrControl, WI.KeyboardShortcut.Key.Semicolon, WI.debuggerStepOut);
 
-    WI._settingsKeyboardShortcut = new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.CommandOrControl, WI.KeyboardShortcut.Key.Comma, WI._handleSettingsKeyboardShortcut);
+    WI.settingsKeyboardShortcut = new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.CommandOrControl, WI.KeyboardShortcut.Key.Comma, WI._handleSettingsKeyboardShortcut);
 
     WI._togglePreviousDockConfigurationKeyboardShortcut = new WI.KeyboardShortcut(WI.KeyboardShortcut.Modifier.CommandOrControl | WI.KeyboardShortcut.Modifier.Shift, "D", WI._togglePreviousDockConfiguration);
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/AuditTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -43,7 +43,7 @@
         return {
             identifier: AuditTabContentView.Type,
             image: "Images/Audit.svg",
-            title: WI.UIString("Audit"),
+            displayName: WI.UIString("Audit", "Audit Tab Name", "Name of Audit Tab"),
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ConsoleTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -35,7 +35,7 @@
         return {
             identifier: ConsoleTabContentView.Type,
             image: "Images/Console.svg",
-            title: WI.UIString("Console"),
+            displayName: WI.UIString("Console", "Console Tab Name", "Name of Console Tab"),
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ElementsTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ElementsTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ElementsTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -47,7 +47,7 @@
         return {
             identifier: ElementsTabContentView.Type,
             image: "Images/Elements.svg",
-            title: WI.UIString("Elements"),
+            displayName: WI.UIString("Elements", "Elements Tab Name", "Name of Elements Tab"),
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTabBarItem.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTabBarItem.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/GeneralTabBarItem.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -32,36 +32,35 @@
     {
         console.assert(tabContentView instanceof WI.TabContentView);
 
-        let {image, title} = tabContentView.constructor.tabInfo();
-        return new WI.GeneralTabBarItem(tabContentView, image, title);
+        let {image, displayName, title} = tabContentView.constructor.tabInfo();
+        return new WI.GeneralTabBarItem(tabContentView, image, displayName, title);
     }
 
     // Public
 
-    get title()
+    get displayName()
     {
-        return super.title;
+        return super.displayName;
     }
 
-    set title(title)
+    set displayName(displayName)
     {
-        if (title) {
-            this._titleElement = document.createElement("span");
-            this._titleElement.classList.add("title");
+        if (displayName) {
+            this._displayNameElement = document.createElement("span");
+            this._displayNameElement.className = "name";
 
-            let titleContentElement = document.createElement("span");
-            titleContentElement.classList.add("content");
-            titleContentElement.textContent = title;
-            this._titleElement.appendChild(titleContentElement);
+            let displayNameContentElement = this._displayNameElement.appendChild(document.createElement("span"));
+            displayNameContentElement.className = "content";
+            displayNameContentElement.textContent = displayName;
 
-            this.element.insertBefore(this._titleElement, this.element.lastChild);
+            this.element.insertBefore(this._displayNameElement, this.element.lastChild);
         } else {
-            if (this._titleElement)
-                this._titleElement.remove();
+            if (this._displayNameElement)
+                this._displayNameElement.remove();
 
-            this._titleElement = null;
+            this._displayNameElement = null;
         }
 
-        super.title = title;
+        super.displayName = displayName;
     }
 };

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/GraphicsTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/GraphicsTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/GraphicsTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -66,7 +66,7 @@
         return {
             identifier: GraphicsTabContentView.Type,
             image: "Images/Graphics.svg",
-            title: WI.UIString("Graphics"),
+            displayName: WI.UIString("Graphics", "Graphics Tab Name", "Name of Graphics Tab"),
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/LayersTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/LayersTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/LayersTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -45,7 +45,7 @@
         return {
             identifier: LayersTabContentView.Type,
             image: "Images/Layers.svg",
-            title: WI.UIString("Layers"),
+            displayName: WI.UIString("Layers", "Layers Tab Name", "Name of Layers Tab"),
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/NetworkTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -50,7 +50,7 @@
         return {
             identifier: NetworkTabContentView.Type,
             image: "Images/Network.svg",
-            title: WI.UIString("Network"),
+            displayName: WI.UIString("Network", "Network Tab Name", "Name of Network Tab"),
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/PinnedTabBarItem.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/PinnedTabBarItem.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/PinnedTabBarItem.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -25,9 +25,9 @@
 
 WI.PinnedTabBarItem = class PinnedTabBarItem extends WI.TabBarItem
 {
-    constructor(representedObject, image, title)
+    constructor(representedObject, image, displayName, title)
     {
-        super(representedObject, image, title);
+        super(representedObject, image, displayName, title);
 
         this.element.classList.add("pinned");
     }
@@ -38,14 +38,7 @@
     {
         console.assert(tabContentView instanceof WI.TabContentView);
 
-        let {image, title} = tabContentView.constructor.tabInfo();
-        return new WI.PinnedTabBarItem(tabContentView, image, title);
+        let {image, displayName, title} = tabContentView.constructor.tabInfo();
+        return new WI.PinnedTabBarItem(tabContentView, image, displayName, title);
     }
-
-    // Protected
-
-    titleDidChange()
-    {
-        this.element.title = this.title;
-    }
 };

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SearchTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -50,7 +50,8 @@
         return {
             identifier: SearchTabContentView.Type,
             image: "Images/Search.svg",
-            title: WI.UIString("Search"),
+            displayName: WI.UIString("Search", "Search Tab Name", "Name of Search Tab"),
+            title: WI.UIString("Search (%s)", "Search Tab Title", "Title of Search Tab with keyboard shortcut").format(WI.searchKeyboardShortcut.displayName),
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SettingsTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -39,7 +39,8 @@
         return {
             identifier: SettingsTabContentView.Type,
             image: "Images/Gear.svg",
-            title: WI.UIString("Settings"),
+            displayName: WI.UIString("Settings", "Settings Tab Name", "Name of Settings Tab"),
+            title: WI.UIString("Settings (%s)", "Settings Tab Title", "Title of Settings Tab with keyboard shortcut").format(WI.settingsKeyboardShortcut.displayName),
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/SourcesTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/SourcesTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/SourcesTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -47,7 +47,7 @@
         return {
             identifier: SourcesTabContentView.Type,
             image: "Images/Sources.svg",
-            title: WI.UIString("Sources"),
+            displayName: WI.UIString("Sources", "Sources Tab Name", "Name of Sources Tab"),
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/StorageTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/StorageTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/StorageTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -46,7 +46,7 @@
         return {
             identifier: StorageTabContentView.Type,
             image: "Images/Storage.svg",
-            title: WI.UIString("Storage"),
+            displayName: WI.UIString("Storage", "Storage Tab Name", "Name of Storage Tab"),
         };
     }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.css (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.css	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBar.css	2020-03-27 03:07:25 UTC (rev 259101)
@@ -299,7 +299,7 @@
     opacity: 0.4;
 }
 
-.tab-bar > .tabs > .item > .title {
+.tab-bar > .tabs > .item > .name {
     color: hsla(0, 0%, var(--foreground-lightness), 0.6);
 
     display: flex;
@@ -309,11 +309,11 @@
     -webkit-margin-start: 6px;
 }
 
-body.window-inactive .tab-bar > .tabs > .item > .title {
+body.window-inactive .tab-bar > .tabs > .item > .name {
     color: hsla(0, 0%, var(--foreground-lightness), 0.4);
 }
 
-.tab-bar > .tabs > .item > .title > .content {
+.tab-bar > .tabs > .item > .name > .content {
     min-width: 0;
     width: 100%;
     overflow: hidden;
@@ -321,15 +321,15 @@
     white-space: nowrap;
 }
 
-.tab-bar > .tabs > .item:not(.selected):hover > .title {
+.tab-bar > .tabs > .item:not(.selected):hover > .name {
     color: hsla(0, 0%, var(--foreground-lightness), 0.7);
 }
 
-.tab-bar > .tabs > .item:not(.disabled).selected > .title {
+.tab-bar > .tabs > .item:not(.disabled).selected > .name {
     color: hsla(0, 0%, var(--foreground-lightness), 0.8);
 }
 
-body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .title {
+body.window-inactive .tab-bar > .tabs > .item:not(.disabled).selected > .name {
     color: hsla(0, 0%, var(--foreground-lightness), 0.5);
 }
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TabBarItem.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TabBarItem.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TabBarItem.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -26,7 +26,7 @@
 
 WI.TabBarItem = class TabBarItem
 {
-    constructor(representedObject, image, title)
+    constructor(representedObject, image, displayName, title)
     {
         this._representedObject = representedObject || null;
         this._parentTabBar = null;
@@ -45,7 +45,8 @@
 
         this._element.createChild("div", "flex-space");
 
-        this.title = title;
+        this.displayName = displayName;
+        this.title = title || displayName;
         this.image = image;
     }
 
@@ -102,6 +103,20 @@
     get image() { return this._iconElement.src; }
     set image(url) { this._iconElement.src = "" || ""; }
 
+    get displayName()
+    {
+        return this._displayName;
+    }
+
+    set displayName(displayName)
+    {
+        displayName = displayName || "";
+        if (this._displayName === displayName)
+            return;
+
+        this._displayName = displayName;
+    }
+
     get title()
     {
         return this._title;
@@ -114,14 +129,8 @@
             return;
 
         this._title = title;
-        this.titleDidChange();
-    }
 
-    // Protected
-
-    titleDidChange()
-    {
-        // Implemented by subclasses.
+        this._element.title = this._title;
     }
 };
 

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js (259100 => 259101)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js	2020-03-27 02:31:53 UTC (rev 259100)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TimelineTabContentView.js	2020-03-27 03:07:25 UTC (rev 259101)
@@ -103,7 +103,7 @@
         return {
             identifier: TimelineTabContentView.Type,
             image: "Images/Timeline.svg",
-            title: WI.UIString("Timelines"),
+            displayName: WI.UIString("Timelines", "Timelines Tab Name", "Name of Timelines Tab"),
         };
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to