RESOLVED FIXED Bug 37579
Web Inspector: Ctrl-L (Clear Console) does nothing on Windows
https://bugs.webkit.org/show_bug.cgi?id=37579
Summary Web Inspector: Ctrl-L (Clear Console) does nothing on Windows
Alexander Pavlov (apavlov)
Reported 2010-04-14 09:18:39 PDT
The console is not cleared on non-Mac platforms when Ctrl-L is hit in the text prompt.
Attachments
[PATCH] Trivial fix (1.31 KB, patch)
2010-04-14 09:23 PDT, Alexander Pavlov (apavlov)
no flags
[PATCH] Comments addressed (1.56 KB, patch)
2010-04-14 10:02 PDT, Alexander Pavlov (apavlov)
no flags
Alexander Pavlov (apavlov)
Comment 1 2010-04-14 09:23:55 PDT
Created attachment 53337 [details] [PATCH] Trivial fix
Joseph Pecoraro
Comment 2 2010-04-14 09:42:31 PDT
Comment on attachment 53337 [details] [PATCH] Trivial fix I don't understand how this fixes Ctrl "L" on Windows. > 1 var clearConsoleHandler = this.requestClearMessages.bind(this); > 2 > 3 shortcut = WebInspector.KeyboardShortcut.makeKey("k", WebInspector.KeyboardShortcut.Modifiers.Meta); > 4 - this._shortcuts[shortcut] = clearConsoleHandler; > 5 + this._shortcuts[shortcut] = this.requestClearMessages.bind(this); > 6 this._shortcuts[shortcut].isMacOnly = true; > 7 shortcut = WebInspector.KeyboardShortcut.makeKey("l", WebInspector.KeyboardShortcut.Modifiers.Ctrl); > 8 this._shortcuts[shortcut] = clearConsoleHandler; Line 1 shows that the clearConsoleHandler variable already has the requestClearMessages bound to this already. So the change doesn't appear to do anything. Also, the change is made to the Mac only <Cmd>K clear shortcut, not to the Windows <Ctrl>L part. Is there something I am missing?
Joseph Pecoraro
Comment 3 2010-04-14 09:46:04 PDT
Comment on attachment 53337 [details] [PATCH] Trivial fix Ahhhh, I think I got it. The "isMacOnly" property was being set on the shared bound function, and so all other cases (like Windows) see the isMacOnly property and don't run. Thats unfortunate. r=me if you Provide a comment explaining this (because its tricky). You might even want to reorder the code slightly if that helps make it clearer as well.
Alexander Pavlov (apavlov)
Comment 4 2010-04-14 10:02:34 PDT
Created attachment 53342 [details] [PATCH] Comments addressed
Joseph Pecoraro
Comment 5 2010-04-14 10:10:25 PDT
Comment on attachment 53342 [details] [PATCH] Comments addressed Excellent. Thanks!
WebKit Commit Bot
Comment 6 2010-04-14 11:18:43 PDT
Comment on attachment 53342 [details] [PATCH] Comments addressed Clearing flags on attachment: 53342 Committed r57590: <http://trac.webkit.org/changeset/57590>
WebKit Commit Bot
Comment 7 2010-04-14 11:18:50 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.