Title: [185121] trunk/Source/WebInspectorUI
Revision
185121
Author
commit-qu...@webkit.org
Date
2015-06-02 14:14:25 -0700 (Tue, 02 Jun 2015)

Log Message

Web Inspector: ⌘F no longer brings up the find-in-page bar after typing in the quick console
https://bugs.webkit.org/show_bug.cgi?id=145546

Patch by Joseph Pecoraro <pecor...@apple.com> on 2015-06-02
Reviewed by Timothy Hatcher.

Scope ContentBrowser keyboard events within the ContentBrowser instead
of global, where they might conflict between ContentBrowsers. The scoped
shortcuts now no longer need to be enabled/disabled.

* UserInterface/Views/ContentBrowser.js:
(WebInspector.ContentBrowser):
Scope the keyboard shortcuts.

(WebInspector.ContentBrowser.prototype.shown):
(WebInspector.ContentBrowser.prototype.hidden):
No longer need to control enabling / disabling these non-global shortcuts.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (185120 => 185121)


--- trunk/Source/WebInspectorUI/ChangeLog	2015-06-02 21:04:55 UTC (rev 185120)
+++ trunk/Source/WebInspectorUI/ChangeLog	2015-06-02 21:14:25 UTC (rev 185121)
@@ -1,3 +1,22 @@
+2015-06-02  Joseph Pecoraro  <pecor...@apple.com>
+
+        Web Inspector: ⌘F no longer brings up the find-in-page bar after typing in the quick console
+        https://bugs.webkit.org/show_bug.cgi?id=145546
+
+        Reviewed by Timothy Hatcher.
+
+        Scope ContentBrowser keyboard events within the ContentBrowser instead
+        of global, where they might conflict between ContentBrowsers. The scoped
+        shortcuts now no longer need to be enabled/disabled.
+
+        * UserInterface/Views/ContentBrowser.js:
+        (WebInspector.ContentBrowser):
+        Scope the keyboard shortcuts.
+
+        (WebInspector.ContentBrowser.prototype.shown):
+        (WebInspector.ContentBrowser.prototype.hidden):
+        No longer need to control enabling / disabling these non-global shortcuts.
+
 2015-06-01  Jono Wells  <jonowe...@apple.com>
 
         Web Inspector: Type token text descenders touch bottom of container

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js (185120 => 185121)


--- trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js	2015-06-02 21:04:55 UTC (rev 185120)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ContentBrowser.js	2015-06-02 21:14:25 UTC (rev 185121)
@@ -42,21 +42,14 @@
     this._findBanner.addEventListener(WebInspector.FindBanner.Event.DidShow, this._findBannerDidShow, this);
     this._findBanner.addEventListener(WebInspector.FindBanner.Event.DidHide, this._findBannerDidHide, this);
 
-    this._findKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "F", this._showFindBanner.bind(this));
-    this._saveKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "S", this._save.bind(this));
-    this._saveAsKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Shift | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "S", this._saveAs.bind(this));
+    this._findKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "F", this._showFindBanner.bind(this), this._element);
+    this._saveKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "S", this._save.bind(this), this._element);
+    this._saveAsKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.Shift | WebInspector.KeyboardShortcut.Modifier.CommandOrControl, "S", this._saveAs.bind(this), this._element);
 
-    this._findKeyboardShortcut.disabled = true;
-    this._saveKeyboardShortcut.disabled = true;
-    this._saveAsKeyboardShortcut.disabled = true;
-
     if (!disableBackForward) {
-        this._backKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Left, this._backButtonClicked.bind(this));
-        this._forwardKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Right, this._forwardButtonClicked.bind(this));
+        this._backKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Left, this._backButtonClicked.bind(this), this._element);
+        this._forwardKeyboardShortcut = new WebInspector.KeyboardShortcut(WebInspector.KeyboardShortcut.Modifier.CommandOrControl | WebInspector.KeyboardShortcut.Modifier.Control, WebInspector.KeyboardShortcut.Key.Right, this._forwardButtonClicked.bind(this), this._element);
 
-        this._backKeyboardShortcut.disabled = true;
-        this._forwardKeyboardShortcut.disabled = true;
-
         this._backButtonNavigationItem = new WebInspector.ButtonNavigationItem("back", WebInspector.UIString("Back (%s)").format(this._backKeyboardShortcut.displayName), "Images/BackArrow.svg", 8, 13);
         this._backButtonNavigationItem.addEventListener(WebInspector.ButtonNavigationItem.Event.Clicked, this._backButtonClicked, this);
         this._backButtonNavigationItem.enabled = false;
@@ -277,15 +270,6 @@
     {
         this._contentViewContainer.shown();
 
-        if (this._backKeyboardShortcut)
-            this._backKeyboardShortcut.disabled = false;
-        if (this._forwardKeyboardShortcut)
-            this._forwardKeyboardShortcut.disabled = false;
-
-        this._findKeyboardShortcut.disabled = false;
-        this._saveKeyboardShortcut.disabled = false;
-        this._saveAsKeyboardShortcut.disabled = false;
-
         this._findBanner.enableKeyboardShortcuts();
     },
 
@@ -293,15 +277,6 @@
     {
         this._contentViewContainer.hidden();
 
-        if (this._backKeyboardShortcut)
-            this._backKeyboardShortcut.disabled = false;
-        if (this._forwardKeyboardShortcut)
-            this._forwardKeyboardShortcut.disabled = true;
-
-        this._findKeyboardShortcut.disabled = true;
-        this._saveKeyboardShortcut.disabled = true;
-        this._saveAsKeyboardShortcut.disabled = true;
-
         this._findBanner.disableKeyboardShortcuts();
     },
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to