| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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; |
| OLD | NEW |