Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(86)

Side by Side Diff: Source/devtools/front_end/ui/ShortcutRegistry.js

Issue 344443003: DevTools: Code fixes for the Closure compiler roll (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @param {!WebInspector.ActionRegistry} actionRegistry 7 * @param {!WebInspector.ActionRegistry} actionRegistry
8 */ 8 */
9 WebInspector.ShortcutRegistry = function(actionRegistry) 9 WebInspector.ShortcutRegistry = function(actionRegistry)
10 { 10 {
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 this._pendingActionTimer = setTimeout(handler.bind(this, actionI ds[i]), 0); 94 this._pendingActionTimer = setTimeout(handler.bind(this, actionI ds[i]), 0);
95 break; 95 break;
96 } 96 }
97 } 97 }
98 98
99 /** 99 /**
100 * @return {boolean} 100 * @return {boolean}
101 */ 101 */
102 function isPossiblyInputKey() 102 function isPossiblyInputKey()
103 { 103 {
104 if (!event || !WebInspector.isBeingEdited(event.target) || /^F\d+|Co ntrol|Shift|Alt|Meta|Win|U\+001B$/.test(keyIdentifier)) 104 if (!event || !WebInspector.isBeingEdited(/** @type {!Node} */ (even t.target)) || /^F\d+|Control|Shift|Alt|Meta|Win|U\+001B$/.test(keyIdentifier))
105 return false; 105 return false;
106 106
107 if (!keyModifiers) 107 if (!keyModifiers)
108 return true; 108 return true;
109 109
110 var modifiers = WebInspector.KeyboardShortcut.Modifiers; 110 var modifiers = WebInspector.KeyboardShortcut.Modifiers;
111 if ((keyModifiers & (modifiers.Ctrl | modifiers.Alt)) === (modifiers .Ctrl | modifiers.Alt)) 111 if ((keyModifiers & (modifiers.Ctrl | modifiers.Alt)) === (modifiers .Ctrl | modifiers.Alt))
112 return WebInspector.isWin(); 112 return WebInspector.isWin();
113 113
114 return !hasModifier(modifiers.Ctrl) && !hasModifier(modifiers.Alt) & & !hasModifier(modifiers.Meta); 114 return !hasModifier(modifiers.Ctrl) && !hasModifier(modifiers.Alt) & & !hasModifier(modifiers.Meta);
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 * @constructor 205 * @constructor
206 */ 206 */
207 WebInspector.ShortcutRegistry.ForwardedShortcut = function() 207 WebInspector.ShortcutRegistry.ForwardedShortcut = function()
208 { 208 {
209 } 209 }
210 210
211 WebInspector.ShortcutRegistry.ForwardedShortcut.instance = new WebInspector.Shor tcutRegistry.ForwardedShortcut(); 211 WebInspector.ShortcutRegistry.ForwardedShortcut.instance = new WebInspector.Shor tcutRegistry.ForwardedShortcut();
212 212
213 /** @type {!WebInspector.ShortcutRegistry} */ 213 /** @type {!WebInspector.ShortcutRegistry} */
214 WebInspector.shortcutRegistry; 214 WebInspector.shortcutRegistry;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sources/StyleSheetOutlineDialog.js ('k') | Source/devtools/front_end/ui/UIUtils.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698