Title: [94758] trunk/Source/WebCore
Revision
94758
Author
[email protected]
Date
2011-09-08 06:58:27 -0700 (Thu, 08 Sep 2011)

Log Message

Web Inspector: [REGRESSION] Clear console shortcut Ctrl + L broken
https://bugs.webkit.org/show_bug.cgi?id=67711

Reviewed by Yury Semikhatsky.

* inspector/front-end/ConsoleView.js:
(WebInspector.ConsoleView.prototype._consoleCleared):
(WebInspector.ConsoleView.prototype._registerShortcuts):
(WebInspector.ConsoleView.prototype._promptKeyDown):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (94757 => 94758)


--- trunk/Source/WebCore/ChangeLog	2011-09-08 13:52:04 UTC (rev 94757)
+++ trunk/Source/WebCore/ChangeLog	2011-09-08 13:58:27 UTC (rev 94758)
@@ -1,3 +1,15 @@
+2011-09-08  Alexander Pavlov  <[email protected]>
+
+        Web Inspector: [REGRESSION] Clear console shortcut Ctrl + L broken
+        https://bugs.webkit.org/show_bug.cgi?id=67711
+
+        Reviewed by Yury Semikhatsky.
+
+        * inspector/front-end/ConsoleView.js:
+        (WebInspector.ConsoleView.prototype._consoleCleared):
+        (WebInspector.ConsoleView.prototype._registerShortcuts):
+        (WebInspector.ConsoleView.prototype._promptKeyDown):
+
 2011-09-08  Andras Becsi  <[email protected]>
 
         [Qt] Build fails with strict compiler

Modified: trunk/Source/WebCore/inspector/front-end/ConsoleView.js (94757 => 94758)


--- trunk/Source/WebCore/inspector/front-end/ConsoleView.js	2011-09-08 13:52:04 UTC (rev 94757)
+++ trunk/Source/WebCore/inspector/front-end/ConsoleView.js	2011-09-08 13:58:27 UTC (rev 94758)
@@ -489,14 +489,14 @@
         this._shortcuts = {};
 
         var shortcut = WebInspector.KeyboardShortcut;
-        var shortcutK = shortcut.makeDescriptor("k", WebInspector.KeyboardShortcut.Modifiers.Meta);
-        // This case requires a separate bound function as its isMacOnly property should not be shared among different shortcut handlers.
-        var clearConsoleHandler = this._requestClearMessages.bind(this);
-        this._shortcuts[shortcutK.key] = clearConsoleHandler;
-        this._shortcuts[shortcutK.key].isMacOnly = true;
 
+        if (WebInspector.isMac()) {
+            var shortcutK = shortcut.makeDescriptor("k", WebInspector.KeyboardShortcut.Modifiers.Meta);
+            this._shortcuts[shortcutK.key] = this._requestClearMessages.bind(this);
+        }
+
         var shortcutL = shortcut.makeDescriptor("l", WebInspector.KeyboardShortcut.Modifiers.Ctrl);
-        this._shortcuts[shortcutL.key] = clearConsoleHandler;
+        this._shortcuts[shortcutL.key] = this._requestClearMessages.bind(this);
 
         var section = WebInspector.shortcutsScreen.section(WebInspector.UIString("Console"));
         var keys = WebInspector.isMac() ? [ shortcutK.name, shortcutL.name ] : [ shortcutL.name ];
@@ -537,11 +537,9 @@
         var shortcut = WebInspector.KeyboardShortcut.makeKeyFromEvent(event);
         var handler = this._shortcuts[shortcut];
         if (handler) {
-            if (!this._shortcuts[shortcut].isMacOnly || WebInspector.isMac()) {
-                handler();
-                event.preventDefault();
-                return;
-            }
+            handler();
+            event.preventDefault();
+            return;
         }
     },
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to