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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/components/ShortcutsScreen.js

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 13 matching lines...) Expand all
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @unrestricted 32 * @unrestricted
33 */ 33 */
34 WebInspector.ShortcutsScreen = class { 34 Components.ShortcutsScreen = class {
35 constructor() { 35 constructor() {
36 /** @type {!Object.<string, !WebInspector.ShortcutsSection>} */ 36 /** @type {!Object.<string, !Components.ShortcutsSection>} */
37 this._sections = {}; 37 this._sections = {};
38 } 38 }
39 39
40 static registerShortcuts() { 40 static registerShortcuts() {
41 // Elements panel 41 // Elements panel
42 var elementsSection = WebInspector.shortcutsScreen.section(WebInspector.UISt ring('Elements Panel')); 42 var elementsSection = Components.shortcutsScreen.section(Common.UIString('El ements Panel'));
43 43
44 var navigate = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NavigateU p.concat( 44 var navigate = Components.ShortcutsScreen.ElementsPanelShortcuts.NavigateUp. concat(
45 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.NavigateDown); 45 Components.ShortcutsScreen.ElementsPanelShortcuts.NavigateDown);
46 elementsSection.addRelatedKeys(navigate, WebInspector.UIString('Navigate ele ments')); 46 elementsSection.addRelatedKeys(navigate, Common.UIString('Navigate elements' ));
47 47
48 var expandCollapse = WebInspector.ShortcutsScreen.ElementsPanelShortcuts.Exp and.concat( 48 var expandCollapse = Components.ShortcutsScreen.ElementsPanelShortcuts.Expan d.concat(
49 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.Collapse); 49 Components.ShortcutsScreen.ElementsPanelShortcuts.Collapse);
50 elementsSection.addRelatedKeys(expandCollapse, WebInspector.UIString('Expand /collapse')); 50 elementsSection.addRelatedKeys(expandCollapse, Common.UIString('Expand/colla pse'));
51 51
52 elementsSection.addAlternateKeys( 52 elementsSection.addAlternateKeys(
53 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.EditAttribute, WebIn spector.UIString('Edit attribute')); 53 Components.ShortcutsScreen.ElementsPanelShortcuts.EditAttribute, Common. UIString('Edit attribute'));
54 elementsSection.addAlternateKeys( 54 elementsSection.addAlternateKeys(
55 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.HideElement, WebInsp ector.UIString('Hide element')); 55 Components.ShortcutsScreen.ElementsPanelShortcuts.HideElement, Common.UI String('Hide element'));
56 elementsSection.addAlternateKeys( 56 elementsSection.addAlternateKeys(
57 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.ToggleEditAsHTML, 57 Components.ShortcutsScreen.ElementsPanelShortcuts.ToggleEditAsHTML,
58 WebInspector.UIString('Toggle edit as HTML')); 58 Common.UIString('Toggle edit as HTML'));
59 59
60 var stylesPaneSection = WebInspector.shortcutsScreen.section(WebInspector.UI String('Styles Pane')); 60 var stylesPaneSection = Components.shortcutsScreen.section(Common.UIString(' Styles Pane'));
61 61
62 var nextPreviousProperty = WebInspector.ShortcutsScreen.ElementsPanelShortcu ts.NextProperty.concat( 62 var nextPreviousProperty = Components.ShortcutsScreen.ElementsPanelShortcuts .NextProperty.concat(
63 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.PreviousProperty); 63 Components.ShortcutsScreen.ElementsPanelShortcuts.PreviousProperty);
64 stylesPaneSection.addRelatedKeys(nextPreviousProperty, WebInspector.UIString ('Next/previous property')); 64 stylesPaneSection.addRelatedKeys(nextPreviousProperty, Common.UIString('Next /previous property'));
65 65
66 stylesPaneSection.addRelatedKeys( 66 stylesPaneSection.addRelatedKeys(
67 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementValue, WebI nspector.UIString('Increment value')); 67 Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementValue, Common .UIString('Increment value'));
68 stylesPaneSection.addRelatedKeys( 68 stylesPaneSection.addRelatedKeys(
69 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementValue, WebI nspector.UIString('Decrement value')); 69 Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementValue, Common .UIString('Decrement value'));
70 70
71 stylesPaneSection.addAlternateKeys( 71 stylesPaneSection.addAlternateKeys(
72 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy10, 72 Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy10,
73 WebInspector.UIString('Increment by %f', 10)); 73 Common.UIString('Increment by %f', 10));
74 stylesPaneSection.addAlternateKeys( 74 stylesPaneSection.addAlternateKeys(
75 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy10, 75 Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy10,
76 WebInspector.UIString('Decrement by %f', 10)); 76 Common.UIString('Decrement by %f', 10));
77 77
78 stylesPaneSection.addAlternateKeys( 78 stylesPaneSection.addAlternateKeys(
79 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy100, 79 Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy100,
80 WebInspector.UIString('Increment by %f', 100)); 80 Common.UIString('Increment by %f', 100));
81 stylesPaneSection.addAlternateKeys( 81 stylesPaneSection.addAlternateKeys(
82 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy100, 82 Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy100,
83 WebInspector.UIString('Decrement by %f', 100)); 83 Common.UIString('Decrement by %f', 100));
84 84
85 stylesPaneSection.addAlternateKeys( 85 stylesPaneSection.addAlternateKeys(
86 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy01, 86 Components.ShortcutsScreen.ElementsPanelShortcuts.IncrementBy01,
87 WebInspector.UIString('Increment by %f', 0.1)); 87 Common.UIString('Increment by %f', 0.1));
88 stylesPaneSection.addAlternateKeys( 88 stylesPaneSection.addAlternateKeys(
89 WebInspector.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy01, 89 Components.ShortcutsScreen.ElementsPanelShortcuts.DecrementBy01,
90 WebInspector.UIString('Decrement by %f', 0.1)); 90 Common.UIString('Decrement by %f', 0.1));
91 91
92 // Debugger 92 // Debugger
93 var section = WebInspector.shortcutsScreen.section(WebInspector.UIString('De bugger')); 93 var section = Components.shortcutsScreen.section(Common.UIString('Debugger') );
94 94
95 section.addAlternateKeys( 95 section.addAlternateKeys(
96 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('debugger.tog gle-pause'), 96 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.toggle-pause' ),
97 WebInspector.UIString('Pause/ Continue')); 97 Common.UIString('Pause/ Continue'));
98 section.addAlternateKeys( 98 section.addAlternateKeys(
99 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('debugger.ste p-over'), 99 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.step-over'),
100 WebInspector.UIString('Step over')); 100 Common.UIString('Step over'));
101 section.addAlternateKeys( 101 section.addAlternateKeys(
102 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('debugger.ste p-into'), 102 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.step-into'),
103 WebInspector.UIString('Step into')); 103 Common.UIString('Step into'));
104 section.addAlternateKeys( 104 section.addAlternateKeys(
105 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('debugger.ste p-out'), 105 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.step-out'),
106 WebInspector.UIString('Step out')); 106 Common.UIString('Step out'));
107 107
108 var nextAndPrevFrameKeys = WebInspector.ShortcutsScreen.SourcesPanelShortcut s.NextCallFrame.concat( 108 var nextAndPrevFrameKeys = Components.ShortcutsScreen.SourcesPanelShortcuts. NextCallFrame.concat(
109 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame); 109 Components.ShortcutsScreen.SourcesPanelShortcuts.PrevCallFrame);
110 section.addRelatedKeys(nextAndPrevFrameKeys, WebInspector.UIString('Next/pre vious call frame')); 110 section.addRelatedKeys(nextAndPrevFrameKeys, Common.UIString('Next/previous call frame'));
111 111
112 section.addAlternateKeys( 112 section.addAlternateKeys(
113 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.EvaluateSelectionInCo nsole, 113 Components.ShortcutsScreen.SourcesPanelShortcuts.EvaluateSelectionInCons ole,
114 WebInspector.UIString('Evaluate selection in console')); 114 Common.UIString('Evaluate selection in console'));
115 section.addAlternateKeys( 115 section.addAlternateKeys(
116 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.AddSelectionToWatch, 116 Components.ShortcutsScreen.SourcesPanelShortcuts.AddSelectionToWatch,
117 WebInspector.UIString('Add selection to watch')); 117 Common.UIString('Add selection to watch'));
118 section.addAlternateKeys( 118 section.addAlternateKeys(
119 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleBreakpoint, 119 Components.ShortcutsScreen.SourcesPanelShortcuts.ToggleBreakpoint,
120 WebInspector.UIString('Toggle breakpoint')); 120 Common.UIString('Toggle breakpoint'));
121 section.addAlternateKeys( 121 section.addAlternateKeys(
122 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('debugger.tog gle-breakpoints-active'), 122 UI.shortcutRegistry.shortcutDescriptorsForAction('debugger.toggle-breakp oints-active'),
123 WebInspector.UIString('Toggle all breakpoints')); 123 Common.UIString('Toggle all breakpoints'));
124 124
125 // Editing 125 // Editing
126 section = WebInspector.shortcutsScreen.section(WebInspector.UIString('Text E ditor')); 126 section = Components.shortcutsScreen.section(Common.UIString('Text Editor')) ;
127 section.addAlternateKeys( 127 section.addAlternateKeys(
128 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToMember, WebInspec tor.UIString('Go to member')); 128 Components.ShortcutsScreen.SourcesPanelShortcuts.GoToMember, Common.UISt ring('Go to member'));
129 section.addAlternateKeys( 129 section.addAlternateKeys(
130 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleAutocompletion, 130 Components.ShortcutsScreen.SourcesPanelShortcuts.ToggleAutocompletion,
131 WebInspector.UIString('Autocompletion')); 131 Common.UIString('Autocompletion'));
132 section.addAlternateKeys( 132 section.addAlternateKeys(
133 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GoToLine, WebInspecto r.UIString('Go to line')); 133 Components.ShortcutsScreen.SourcesPanelShortcuts.GoToLine, Common.UIStri ng('Go to line'));
134 section.addAlternateKeys( 134 section.addAlternateKeys(
135 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToPreviousLocatio n, 135 Components.ShortcutsScreen.SourcesPanelShortcuts.JumpToPreviousLocation,
136 WebInspector.UIString('Jump to previous editing location')); 136 Common.UIString('Jump to previous editing location'));
137 section.addAlternateKeys( 137 section.addAlternateKeys(
138 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.JumpToNextLocation, 138 Components.ShortcutsScreen.SourcesPanelShortcuts.JumpToNextLocation,
139 WebInspector.UIString('Jump to next editing location')); 139 Common.UIString('Jump to next editing location'));
140 section.addAlternateKeys( 140 section.addAlternateKeys(
141 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.ToggleComment, WebIns pector.UIString('Toggle comment')); 141 Components.ShortcutsScreen.SourcesPanelShortcuts.ToggleComment, Common.U IString('Toggle comment'));
142 section.addAlternateKeys( 142 section.addAlternateKeys(
143 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByOne, 143 Components.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByOne,
144 WebInspector.UIString('Increment CSS unit by 1')); 144 Common.UIString('Increment CSS unit by 1'));
145 section.addAlternateKeys( 145 section.addAlternateKeys(
146 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByOne, 146 Components.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByOne,
147 WebInspector.UIString('Decrement CSS unit by 1')); 147 Common.UIString('Decrement CSS unit by 1'));
148 section.addAlternateKeys( 148 section.addAlternateKeys(
149 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByTen, 149 Components.ShortcutsScreen.SourcesPanelShortcuts.IncreaseCSSUnitByTen,
150 WebInspector.UIString('Increment CSS unit by 10')); 150 Common.UIString('Increment CSS unit by 10'));
151 section.addAlternateKeys( 151 section.addAlternateKeys(
152 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByTen, 152 Components.ShortcutsScreen.SourcesPanelShortcuts.DecreaseCSSUnitByTen,
153 WebInspector.UIString('Decrement CSS unit by 10')); 153 Common.UIString('Decrement CSS unit by 10'));
154 section.addAlternateKeys( 154 section.addAlternateKeys(
155 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.SelectNextOccurrence, 155 Components.ShortcutsScreen.SourcesPanelShortcuts.SelectNextOccurrence,
156 WebInspector.UIString('Select next occurrence')); 156 Common.UIString('Select next occurrence'));
157 section.addAlternateKeys( 157 section.addAlternateKeys(
158 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.SoftUndo, WebInspecto r.UIString('Soft undo')); 158 Components.ShortcutsScreen.SourcesPanelShortcuts.SoftUndo, Common.UIStri ng('Soft undo'));
159 section.addAlternateKeys( 159 section.addAlternateKeys(
160 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.GotoMatchingBracket, 160 Components.ShortcutsScreen.SourcesPanelShortcuts.GotoMatchingBracket,
161 WebInspector.UIString('Go to matching bracket')); 161 Common.UIString('Go to matching bracket'));
162 section.addAlternateKeys( 162 section.addAlternateKeys(
163 WebInspector.ShortcutsScreen.SourcesPanelShortcuts.CloseEditorTab, WebIn spector.UIString('Close editor tab')); 163 Components.ShortcutsScreen.SourcesPanelShortcuts.CloseEditorTab, Common. UIString('Close editor tab'));
164 section.addAlternateKeys( 164 section.addAlternateKeys(
165 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('sources.swit ch-file'), 165 UI.shortcutRegistry.shortcutDescriptorsForAction('sources.switch-file'),
166 WebInspector.UIString('Switch between files with the same name and diffe rent extensions.')); 166 Common.UIString('Switch between files with the same name and different e xtensions.'));
167 167
168 // Timeline panel 168 // Timeline panel
169 section = WebInspector.shortcutsScreen.section(WebInspector.UIString('Timeli ne Panel')); 169 section = Components.shortcutsScreen.section(Common.UIString('Timeline Panel '));
170 section.addAlternateKeys( 170 section.addAlternateKeys(
171 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('timeline.tog gle-recording'), 171 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.toggle-record ing'),
172 WebInspector.UIString('Start/stop recording')); 172 Common.UIString('Start/stop recording'));
173 section.addAlternateKeys( 173 section.addAlternateKeys(
174 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('main.reload' ), 174 UI.shortcutRegistry.shortcutDescriptorsForAction('main.reload'),
175 WebInspector.UIString('Record page reload')); 175 Common.UIString('Record page reload'));
176 section.addAlternateKeys( 176 section.addAlternateKeys(
177 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('timeline.sav e-to-file'), 177 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.save-to-file' ),
178 WebInspector.UIString('Save timeline data')); 178 Common.UIString('Save timeline data'));
179 section.addAlternateKeys( 179 section.addAlternateKeys(
180 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('timeline.loa d-from-file'), 180 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.load-from-fil e'),
181 WebInspector.UIString('Load timeline data')); 181 Common.UIString('Load timeline data'));
182 section.addRelatedKeys( 182 section.addRelatedKeys(
183 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('timeline.jum p-to-previous-frame') 183 UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.jump-to-previ ous-frame')
184 .concat(WebInspector.shortcutRegistry.shortcutDescriptorsForAction(' timeline.jump-to-next-frame')), 184 .concat(UI.shortcutRegistry.shortcutDescriptorsForAction('timeline.j ump-to-next-frame')),
185 WebInspector.UIString('Jump to previous/next frame')); 185 Common.UIString('Jump to previous/next frame'));
186 186
187 // Profiles panel 187 // Profiles panel
188 section = WebInspector.shortcutsScreen.section(WebInspector.UIString('Profil es Panel')); 188 section = Components.shortcutsScreen.section(Common.UIString('Profiles Panel '));
189 section.addAlternateKeys( 189 section.addAlternateKeys(
190 WebInspector.shortcutRegistry.shortcutDescriptorsForAction('profiler.tog gle-recording'), 190 UI.shortcutRegistry.shortcutDescriptorsForAction('profiler.toggle-record ing'),
191 WebInspector.UIString('Start/stop recording')); 191 Common.UIString('Start/stop recording'));
192 192
193 // Layers panel 193 // Layers panel
194 if (Runtime.experiments.isEnabled('layersPanel')) { 194 if (Runtime.experiments.isEnabled('layersPanel')) {
195 section = WebInspector.shortcutsScreen.section(WebInspector.UIString('Laye rs Panel')); 195 section = Components.shortcutsScreen.section(Common.UIString('Layers Panel '));
196 section.addAlternateKeys( 196 section.addAlternateKeys(
197 WebInspector.ShortcutsScreen.LayersPanelShortcuts.ResetView, WebInspec tor.UIString('Reset view')); 197 Components.ShortcutsScreen.LayersPanelShortcuts.ResetView, Common.UISt ring('Reset view'));
198 section.addAlternateKeys( 198 section.addAlternateKeys(
199 WebInspector.ShortcutsScreen.LayersPanelShortcuts.PanMode, WebInspecto r.UIString('Switch to pan mode')); 199 Components.ShortcutsScreen.LayersPanelShortcuts.PanMode, Common.UIStri ng('Switch to pan mode'));
200 section.addAlternateKeys( 200 section.addAlternateKeys(
201 WebInspector.ShortcutsScreen.LayersPanelShortcuts.RotateMode, WebInspe ctor.UIString('Switch to rotate mode')); 201 Components.ShortcutsScreen.LayersPanelShortcuts.RotateMode, Common.UIS tring('Switch to rotate mode'));
202 section.addAlternateKeys( 202 section.addAlternateKeys(
203 WebInspector.ShortcutsScreen.LayersPanelShortcuts.TogglePanRotate, 203 Components.ShortcutsScreen.LayersPanelShortcuts.TogglePanRotate,
204 WebInspector.UIString('Temporarily toggle pan/rotate mode while held') ); 204 Common.UIString('Temporarily toggle pan/rotate mode while held'));
205 section.addAlternateKeys( 205 section.addAlternateKeys(
206 WebInspector.ShortcutsScreen.LayersPanelShortcuts.ZoomIn, WebInspector .UIString('Zoom in')); 206 Components.ShortcutsScreen.LayersPanelShortcuts.ZoomIn, Common.UIStrin g('Zoom in'));
207 section.addAlternateKeys( 207 section.addAlternateKeys(
208 WebInspector.ShortcutsScreen.LayersPanelShortcuts.ZoomOut, WebInspecto r.UIString('Zoom out')); 208 Components.ShortcutsScreen.LayersPanelShortcuts.ZoomOut, Common.UIStri ng('Zoom out'));
209 section.addRelatedKeys( 209 section.addRelatedKeys(
210 WebInspector.ShortcutsScreen.LayersPanelShortcuts.Up.concat( 210 Components.ShortcutsScreen.LayersPanelShortcuts.Up.concat(
211 WebInspector.ShortcutsScreen.LayersPanelShortcuts.Down), 211 Components.ShortcutsScreen.LayersPanelShortcuts.Down),
212 WebInspector.UIString('Pan or rotate up/down')); 212 Common.UIString('Pan or rotate up/down'));
213 section.addRelatedKeys( 213 section.addRelatedKeys(
214 WebInspector.ShortcutsScreen.LayersPanelShortcuts.Left.concat( 214 Components.ShortcutsScreen.LayersPanelShortcuts.Left.concat(
215 WebInspector.ShortcutsScreen.LayersPanelShortcuts.Right), 215 Components.ShortcutsScreen.LayersPanelShortcuts.Right),
216 WebInspector.UIString('Pan or rotate left/right')); 216 Common.UIString('Pan or rotate left/right'));
217 } 217 }
218 } 218 }
219 219
220 /** 220 /**
221 * @param {string} name 221 * @param {string} name
222 * @return {!WebInspector.ShortcutsSection} 222 * @return {!Components.ShortcutsSection}
223 */ 223 */
224 section(name) { 224 section(name) {
225 var section = this._sections[name]; 225 var section = this._sections[name];
226 if (!section) 226 if (!section)
227 this._sections[name] = section = new WebInspector.ShortcutsSection(name); 227 this._sections[name] = section = new Components.ShortcutsSection(name);
228 return section; 228 return section;
229 } 229 }
230 230
231 /** 231 /**
232 * @return {!WebInspector.Widget} 232 * @return {!UI.Widget}
233 */ 233 */
234 createShortcutsTabView() { 234 createShortcutsTabView() {
235 var orderedSections = []; 235 var orderedSections = [];
236 for (var section in this._sections) 236 for (var section in this._sections)
237 orderedSections.push(this._sections[section]); 237 orderedSections.push(this._sections[section]);
238 function compareSections(a, b) { 238 function compareSections(a, b) {
239 return a.order - b.order; 239 return a.order - b.order;
240 } 240 }
241 orderedSections.sort(compareSections); 241 orderedSections.sort(compareSections);
242 242
243 var widget = new WebInspector.Widget(); 243 var widget = new UI.Widget();
244 244
245 widget.element.className = 'settings-tab-container'; // Override 245 widget.element.className = 'settings-tab-container'; // Override
246 widget.element.createChild('header').createChild('h3').createTextChild(WebIn spector.UIString('Shortcuts')); 246 widget.element.createChild('header').createChild('h3').createTextChild(Commo n.UIString('Shortcuts'));
247 var scrollPane = widget.element.createChild('div', 'help-container-wrapper') ; 247 var scrollPane = widget.element.createChild('div', 'help-container-wrapper') ;
248 var container = scrollPane.createChild('div'); 248 var container = scrollPane.createChild('div');
249 container.className = 'help-content help-container'; 249 container.className = 'help-content help-container';
250 for (var i = 0; i < orderedSections.length; ++i) 250 for (var i = 0; i < orderedSections.length; ++i)
251 orderedSections[i].renderSection(container); 251 orderedSections[i].renderSection(container);
252 252
253 var note = scrollPane.createChild('p', 'help-footnote'); 253 var note = scrollPane.createChild('p', 'help-footnote');
254 note.appendChild(WebInspector.linkifyDocumentationURLAsNode( 254 note.appendChild(UI.linkifyDocumentationURLAsNode(
255 'iterate/inspect-styles/shortcuts', 255 'iterate/inspect-styles/shortcuts',
256 WebInspector.UIString('Full list of DevTools keyboard shortcuts and gest ures'))); 256 Common.UIString('Full list of DevTools keyboard shortcuts and gestures') ));
257 257
258 return widget; 258 return widget;
259 } 259 }
260 }; 260 };
261 261
262 /** 262 /**
263 * We cannot initialize it here as localized strings are not loaded yet. 263 * We cannot initialize it here as localized strings are not loaded yet.
264 * @type {!WebInspector.ShortcutsScreen} 264 * @type {!Components.ShortcutsScreen}
265 */ 265 */
266 WebInspector.shortcutsScreen; 266 Components.shortcutsScreen;
267 267
268 /** 268 /**
269 * @unrestricted 269 * @unrestricted
270 */ 270 */
271 WebInspector.ShortcutsSection = class { 271 Components.ShortcutsSection = class {
272 /** 272 /**
273 * @param {string} name 273 * @param {string} name
274 */ 274 */
275 constructor(name) { 275 constructor(name) {
276 this.name = name; 276 this.name = name;
277 this._lines = /** @type {!Array.<!{key: !Node, text: string}>} */ ([]); 277 this._lines = /** @type {!Array.<!{key: !Node, text: string}>} */ ([]);
278 this.order = ++WebInspector.ShortcutsSection._sequenceNumber; 278 this.order = ++Components.ShortcutsSection._sequenceNumber;
279 } 279 }
280 280
281 /** 281 /**
282 * @param {!WebInspector.KeyboardShortcut.Descriptor} key 282 * @param {!UI.KeyboardShortcut.Descriptor} key
283 * @param {string} description 283 * @param {string} description
284 */ 284 */
285 addKey(key, description) { 285 addKey(key, description) {
286 this._addLine(this._renderKey(key), description); 286 this._addLine(this._renderKey(key), description);
287 } 287 }
288 288
289 /** 289 /**
290 * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys 290 * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} keys
291 * @param {string} description 291 * @param {string} description
292 */ 292 */
293 addRelatedKeys(keys, description) { 293 addRelatedKeys(keys, description) {
294 this._addLine(this._renderSequence(keys, '/'), description); 294 this._addLine(this._renderSequence(keys, '/'), description);
295 } 295 }
296 296
297 /** 297 /**
298 * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} keys 298 * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} keys
299 * @param {string} description 299 * @param {string} description
300 */ 300 */
301 addAlternateKeys(keys, description) { 301 addAlternateKeys(keys, description) {
302 this._addLine(this._renderSequence(keys, WebInspector.UIString('or')), descr iption); 302 this._addLine(this._renderSequence(keys, Common.UIString('or')), description );
303 } 303 }
304 304
305 /** 305 /**
306 * @param {!Node} keyElement 306 * @param {!Node} keyElement
307 * @param {string} description 307 * @param {string} description
308 */ 308 */
309 _addLine(keyElement, description) { 309 _addLine(keyElement, description) {
310 this._lines.push({key: keyElement, text: description}); 310 this._lines.push({key: keyElement, text: description});
311 } 311 }
312 312
(...skipping 10 matching lines...) Expand all
323 for (var i = 0; i < this._lines.length; ++i) { 323 for (var i = 0; i < this._lines.length; ++i) {
324 var line = parent.createChild('div', 'help-line'); 324 var line = parent.createChild('div', 'help-line');
325 var keyCell = line.createChild('div', 'help-key-cell'); 325 var keyCell = line.createChild('div', 'help-key-cell');
326 keyCell.appendChild(this._lines[i].key); 326 keyCell.appendChild(this._lines[i].key);
327 keyCell.appendChild(this._createSpan('help-key-delimiter', ':')); 327 keyCell.appendChild(this._createSpan('help-key-delimiter', ':'));
328 line.createChild('div', 'help-cell').textContent = this._lines[i].text; 328 line.createChild('div', 'help-cell').textContent = this._lines[i].text;
329 } 329 }
330 } 330 }
331 331
332 /** 332 /**
333 * @param {!Array.<!WebInspector.KeyboardShortcut.Descriptor>} sequence 333 * @param {!Array.<!UI.KeyboardShortcut.Descriptor>} sequence
334 * @param {string} delimiter 334 * @param {string} delimiter
335 * @return {!Node} 335 * @return {!Node}
336 */ 336 */
337 _renderSequence(sequence, delimiter) { 337 _renderSequence(sequence, delimiter) {
338 var delimiterSpan = this._createSpan('help-key-delimiter', delimiter); 338 var delimiterSpan = this._createSpan('help-key-delimiter', delimiter);
339 return this._joinNodes(sequence.map(this._renderKey.bind(this)), delimiterSp an); 339 return this._joinNodes(sequence.map(this._renderKey.bind(this)), delimiterSp an);
340 } 340 }
341 341
342 /** 342 /**
343 * @param {!WebInspector.KeyboardShortcut.Descriptor} key 343 * @param {!UI.KeyboardShortcut.Descriptor} key
344 * @return {!Node} 344 * @return {!Node}
345 */ 345 */
346 _renderKey(key) { 346 _renderKey(key) {
347 var keyName = key.name; 347 var keyName = key.name;
348 var plus = this._createSpan('help-combine-keys', '+'); 348 var plus = this._createSpan('help-combine-keys', '+');
349 return this._joinNodes(keyName.split(' + ').map(this._createSpan.bind(this, 'help-key')), plus); 349 return this._joinNodes(keyName.split(' + ').map(this._createSpan.bind(this, 'help-key')), plus);
350 } 350 }
351 351
352 /** 352 /**
353 * @param {string} className 353 * @param {string} className
(...skipping 16 matching lines...) Expand all
370 var result = createDocumentFragment(); 370 var result = createDocumentFragment();
371 for (var i = 0; i < nodes.length; ++i) { 371 for (var i = 0; i < nodes.length; ++i) {
372 if (i > 0) 372 if (i > 0)
373 result.appendChild(delimiter.cloneNode(true)); 373 result.appendChild(delimiter.cloneNode(true));
374 result.appendChild(nodes[i]); 374 result.appendChild(nodes[i]);
375 } 375 }
376 return result; 376 return result;
377 } 377 }
378 }; 378 };
379 379
380 WebInspector.ShortcutsSection._sequenceNumber = 0; 380 Components.ShortcutsSection._sequenceNumber = 0;
381 381
382 382
383 WebInspector.ShortcutsScreen.ElementsPanelShortcuts = { 383 Components.ShortcutsScreen.ElementsPanelShortcuts = {
384 NavigateUp: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.Keyboar dShortcut.Keys.Up)], 384 NavigateUp: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up)],
385 385
386 NavigateDown: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.Keybo ardShortcut.Keys.Down)], 386 NavigateDown: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Dow n)],
387 387
388 Expand: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardSho rtcut.Keys.Right)], 388 Expand: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Right)],
389 389
390 Collapse: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardS hortcut.Keys.Left)], 390 Collapse: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Left)],
391 391
392 EditAttribute: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.Keyb oardShortcut.Keys.Enter)], 392 EditAttribute: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.En ter)],
393 393
394 HideElement: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.Keyboa rdShortcut.Keys.H)], 394 HideElement: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.H)],
395 395
396 ToggleEditAsHTML: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.K eyboardShortcut.Keys.F2)], 396 ToggleEditAsHTML: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys .F2)],
397 397
398 NextProperty: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.Keybo ardShortcut.Keys.Tab)], 398 NextProperty: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Tab )],
399 399
400 PreviousProperty: [WebInspector.KeyboardShortcut.makeDescriptor( 400 PreviousProperty: [UI.KeyboardShortcut.makeDescriptor(
401 WebInspector.KeyboardShortcut.Keys.Tab, WebInspector.KeyboardShortcut.Modi fiers.Shift)], 401 UI.KeyboardShortcut.Keys.Tab, UI.KeyboardShortcut.Modifiers.Shift)],
402 402
403 IncrementValue: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.Key boardShortcut.Keys.Up)], 403 IncrementValue: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.U p)],
404 404
405 DecrementValue: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.Key boardShortcut.Keys.Down)], 405 DecrementValue: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.D own)],
406 406
407 IncrementBy10: [ 407 IncrementBy10: [
408 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.K eys.PageUp), 408 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageUp),
409 WebInspector.KeyboardShortcut.makeDescriptor( 409 UI.KeyboardShortcut.makeDescriptor(
410 WebInspector.KeyboardShortcut.Keys.Up, WebInspector.KeyboardShortcut.Mod ifiers.Shift) 410 UI.KeyboardShortcut.Keys.Up, UI.KeyboardShortcut.Modifiers.Shift)
411 ], 411 ],
412 412
413 DecrementBy10: [ 413 DecrementBy10: [
414 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.K eys.PageDown), 414 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.PageDown),
415 WebInspector.KeyboardShortcut.makeDescriptor( 415 UI.KeyboardShortcut.makeDescriptor(
416 WebInspector.KeyboardShortcut.Keys.Down, WebInspector.KeyboardShortcut.M odifiers.Shift) 416 UI.KeyboardShortcut.Keys.Down, UI.KeyboardShortcut.Modifiers.Shift)
417 ], 417 ],
418 418
419 IncrementBy100: [WebInspector.KeyboardShortcut.makeDescriptor( 419 IncrementBy100: [UI.KeyboardShortcut.makeDescriptor(
420 WebInspector.KeyboardShortcut.Keys.PageUp, WebInspector.KeyboardShortcut.M odifiers.Shift)], 420 UI.KeyboardShortcut.Keys.PageUp, UI.KeyboardShortcut.Modifiers.Shift)],
421 421
422 DecrementBy100: [WebInspector.KeyboardShortcut.makeDescriptor( 422 DecrementBy100: [UI.KeyboardShortcut.makeDescriptor(
423 WebInspector.KeyboardShortcut.Keys.PageDown, WebInspector.KeyboardShortcut .Modifiers.Shift)], 423 UI.KeyboardShortcut.Keys.PageDown, UI.KeyboardShortcut.Modifiers.Shift)],
424 424
425 IncrementBy01: [WebInspector.KeyboardShortcut.makeDescriptor( 425 IncrementBy01: [UI.KeyboardShortcut.makeDescriptor(
426 WebInspector.KeyboardShortcut.Keys.Up, WebInspector.KeyboardShortcut.Modif iers.Alt)], 426 UI.KeyboardShortcut.Keys.Up, UI.KeyboardShortcut.Modifiers.Alt)],
427 427
428 DecrementBy01: [WebInspector.KeyboardShortcut.makeDescriptor( 428 DecrementBy01: [UI.KeyboardShortcut.makeDescriptor(
429 WebInspector.KeyboardShortcut.Keys.Down, WebInspector.KeyboardShortcut.Mod ifiers.Alt)] 429 UI.KeyboardShortcut.Keys.Down, UI.KeyboardShortcut.Modifiers.Alt)]
430 }; 430 };
431 431
432 WebInspector.ShortcutsScreen.SourcesPanelShortcuts = { 432 Components.ShortcutsScreen.SourcesPanelShortcuts = {
433 SelectNextOccurrence: 433 SelectNextOccurrence:
434 [WebInspector.KeyboardShortcut.makeDescriptor('d', WebInspector.KeyboardSh ortcut.Modifiers.CtrlOrMeta)], 434 [UI.KeyboardShortcut.makeDescriptor('d', UI.KeyboardShortcut.Modifiers.Ctr lOrMeta)],
435 435
436 SoftUndo: [WebInspector.KeyboardShortcut.makeDescriptor('u', WebInspector.Keyb oardShortcut.Modifiers.CtrlOrMeta)], 436 SoftUndo: [UI.KeyboardShortcut.makeDescriptor('u', UI.KeyboardShortcut.Modifie rs.CtrlOrMeta)],
437 437
438 GotoMatchingBracket: 438 GotoMatchingBracket:
439 [WebInspector.KeyboardShortcut.makeDescriptor('m', WebInspector.KeyboardSh ortcut.Modifiers.Ctrl)], 439 [UI.KeyboardShortcut.makeDescriptor('m', UI.KeyboardShortcut.Modifiers.Ctr l)],
440 440
441 ToggleAutocompletion: [WebInspector.KeyboardShortcut.makeDescriptor( 441 ToggleAutocompletion: [UI.KeyboardShortcut.makeDescriptor(
442 WebInspector.KeyboardShortcut.Keys.Space, WebInspector.KeyboardShortcut.Mo difiers.Ctrl)], 442 UI.KeyboardShortcut.Keys.Space, UI.KeyboardShortcut.Modifiers.Ctrl)],
443 443
444 IncreaseCSSUnitByOne: [WebInspector.KeyboardShortcut.makeDescriptor( 444 IncreaseCSSUnitByOne: [UI.KeyboardShortcut.makeDescriptor(
445 WebInspector.KeyboardShortcut.Keys.Up, WebInspector.KeyboardShortcut.Modif iers.Alt)], 445 UI.KeyboardShortcut.Keys.Up, UI.KeyboardShortcut.Modifiers.Alt)],
446 446
447 DecreaseCSSUnitByOne: [WebInspector.KeyboardShortcut.makeDescriptor( 447 DecreaseCSSUnitByOne: [UI.KeyboardShortcut.makeDescriptor(
448 WebInspector.KeyboardShortcut.Keys.Down, WebInspector.KeyboardShortcut.Mod ifiers.Alt)], 448 UI.KeyboardShortcut.Keys.Down, UI.KeyboardShortcut.Modifiers.Alt)],
449 449
450 IncreaseCSSUnitByTen: [WebInspector.KeyboardShortcut.makeDescriptor( 450 IncreaseCSSUnitByTen: [UI.KeyboardShortcut.makeDescriptor(
451 WebInspector.KeyboardShortcut.Keys.PageUp, WebInspector.KeyboardShortcut.M odifiers.Alt)], 451 UI.KeyboardShortcut.Keys.PageUp, UI.KeyboardShortcut.Modifiers.Alt)],
452 452
453 DecreaseCSSUnitByTen: [WebInspector.KeyboardShortcut.makeDescriptor( 453 DecreaseCSSUnitByTen: [UI.KeyboardShortcut.makeDescriptor(
454 WebInspector.KeyboardShortcut.Keys.PageDown, WebInspector.KeyboardShortcut .Modifiers.Alt)], 454 UI.KeyboardShortcut.Keys.PageDown, UI.KeyboardShortcut.Modifiers.Alt)],
455 EvaluateSelectionInConsole: [WebInspector.KeyboardShortcut.makeDescriptor( 455 EvaluateSelectionInConsole: [UI.KeyboardShortcut.makeDescriptor(
456 'e', WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.Keyboard Shortcut.Modifiers.Ctrl)], 456 'e', UI.KeyboardShortcut.Modifiers.Shift | UI.KeyboardShortcut.Modifiers.C trl)],
457 457
458 AddSelectionToWatch: [WebInspector.KeyboardShortcut.makeDescriptor( 458 AddSelectionToWatch: [UI.KeyboardShortcut.makeDescriptor(
459 'a', WebInspector.KeyboardShortcut.Modifiers.Shift | WebInspector.Keyboard Shortcut.Modifiers.Ctrl)], 459 'a', UI.KeyboardShortcut.Modifiers.Shift | UI.KeyboardShortcut.Modifiers.C trl)],
460 460
461 GoToMember: [WebInspector.KeyboardShortcut.makeDescriptor( 461 GoToMember: [UI.KeyboardShortcut.makeDescriptor(
462 'o', WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta | WebInspector.Key boardShortcut.Modifiers.Shift)], 462 'o', UI.KeyboardShortcut.Modifiers.CtrlOrMeta | UI.KeyboardShortcut.Modifi ers.Shift)],
463 463
464 GoToLine: [WebInspector.KeyboardShortcut.makeDescriptor('g', WebInspector.Keyb oardShortcut.Modifiers.Ctrl)], 464 GoToLine: [UI.KeyboardShortcut.makeDescriptor('g', UI.KeyboardShortcut.Modifie rs.Ctrl)],
465 465
466 ToggleBreakpoint: 466 ToggleBreakpoint:
467 [WebInspector.KeyboardShortcut.makeDescriptor('b', WebInspector.KeyboardSh ortcut.Modifiers.CtrlOrMeta)], 467 [UI.KeyboardShortcut.makeDescriptor('b', UI.KeyboardShortcut.Modifiers.Ctr lOrMeta)],
468 468
469 NextCallFrame: [WebInspector.KeyboardShortcut.makeDescriptor( 469 NextCallFrame: [UI.KeyboardShortcut.makeDescriptor(
470 WebInspector.KeyboardShortcut.Keys.Period, WebInspector.KeyboardShortcut.M odifiers.Ctrl)], 470 UI.KeyboardShortcut.Keys.Period, UI.KeyboardShortcut.Modifiers.Ctrl)],
471 471
472 PrevCallFrame: [WebInspector.KeyboardShortcut.makeDescriptor( 472 PrevCallFrame: [UI.KeyboardShortcut.makeDescriptor(
473 WebInspector.KeyboardShortcut.Keys.Comma, WebInspector.KeyboardShortcut.Mo difiers.Ctrl)], 473 UI.KeyboardShortcut.Keys.Comma, UI.KeyboardShortcut.Modifiers.Ctrl)],
474 474
475 ToggleComment: [WebInspector.KeyboardShortcut.makeDescriptor( 475 ToggleComment: [UI.KeyboardShortcut.makeDescriptor(
476 WebInspector.KeyboardShortcut.Keys.Slash, WebInspector.KeyboardShortcut.Mo difiers.CtrlOrMeta)], 476 UI.KeyboardShortcut.Keys.Slash, UI.KeyboardShortcut.Modifiers.CtrlOrMeta)] ,
477 477
478 JumpToPreviousLocation: [WebInspector.KeyboardShortcut.makeDescriptor( 478 JumpToPreviousLocation: [UI.KeyboardShortcut.makeDescriptor(
479 WebInspector.KeyboardShortcut.Keys.Minus, WebInspector.KeyboardShortcut.Mo difiers.Alt)], 479 UI.KeyboardShortcut.Keys.Minus, UI.KeyboardShortcut.Modifiers.Alt)],
480 480
481 JumpToNextLocation: [WebInspector.KeyboardShortcut.makeDescriptor( 481 JumpToNextLocation: [UI.KeyboardShortcut.makeDescriptor(
482 WebInspector.KeyboardShortcut.Keys.Plus, WebInspector.KeyboardShortcut.Mod ifiers.Alt)], 482 UI.KeyboardShortcut.Keys.Plus, UI.KeyboardShortcut.Modifiers.Alt)],
483 483
484 CloseEditorTab: [WebInspector.KeyboardShortcut.makeDescriptor('w', WebInspecto r.KeyboardShortcut.Modifiers.Alt)], 484 CloseEditorTab: [UI.KeyboardShortcut.makeDescriptor('w', UI.KeyboardShortcut.M odifiers.Alt)],
485 485
486 Save: [WebInspector.KeyboardShortcut.makeDescriptor('s', WebInspector.Keyboard Shortcut.Modifiers.CtrlOrMeta)], 486 Save: [UI.KeyboardShortcut.makeDescriptor('s', UI.KeyboardShortcut.Modifiers.C trlOrMeta)],
487 487
488 SaveAll: [WebInspector.KeyboardShortcut.makeDescriptor( 488 SaveAll: [UI.KeyboardShortcut.makeDescriptor(
489 's', WebInspector.KeyboardShortcut.Modifiers.CtrlOrMeta | WebInspector.Key boardShortcut.Modifiers.ShiftOrOption)], 489 's', UI.KeyboardShortcut.Modifiers.CtrlOrMeta | UI.KeyboardShortcut.Modifi ers.ShiftOrOption)],
490 }; 490 };
491 491
492 WebInspector.ShortcutsScreen.LayersPanelShortcuts = { 492 Components.ShortcutsScreen.LayersPanelShortcuts = {
493 ResetView: [WebInspector.KeyboardShortcut.makeDescriptor('0')], 493 ResetView: [UI.KeyboardShortcut.makeDescriptor('0')],
494 494
495 PanMode: [WebInspector.KeyboardShortcut.makeDescriptor('x')], 495 PanMode: [UI.KeyboardShortcut.makeDescriptor('x')],
496 496
497 RotateMode: [WebInspector.KeyboardShortcut.makeDescriptor('v')], 497 RotateMode: [UI.KeyboardShortcut.makeDescriptor('v')],
498 498
499 TogglePanRotate: [WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.Ke yboardShortcut.Keys.Shift)], 499 TogglePanRotate: [UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys. Shift)],
500 500
501 ZoomIn: [ 501 ZoomIn: [
502 WebInspector.KeyboardShortcut.makeDescriptor( 502 UI.KeyboardShortcut.makeDescriptor(
503 WebInspector.KeyboardShortcut.Keys.Plus, WebInspector.KeyboardShortcut.M odifiers.Shift), 503 UI.KeyboardShortcut.Keys.Plus, UI.KeyboardShortcut.Modifiers.Shift),
504 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.K eys.NumpadPlus) 504 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.NumpadPlus)
505 ], 505 ],
506 506
507 ZoomOut: [ 507 ZoomOut: [
508 WebInspector.KeyboardShortcut.makeDescriptor( 508 UI.KeyboardShortcut.makeDescriptor(
509 WebInspector.KeyboardShortcut.Keys.Minus, WebInspector.KeyboardShortcut. Modifiers.Shift), 509 UI.KeyboardShortcut.Keys.Minus, UI.KeyboardShortcut.Modifiers.Shift),
510 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.K eys.NumpadMinus) 510 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.NumpadMinus)
511 ], 511 ],
512 512
513 Up: [ 513 Up: [
514 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.K eys.Up), 514 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Up),
515 WebInspector.KeyboardShortcut.makeDescriptor('w') 515 UI.KeyboardShortcut.makeDescriptor('w')
516 ], 516 ],
517 517
518 Down: [ 518 Down: [
519 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.K eys.Down), 519 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Down),
520 WebInspector.KeyboardShortcut.makeDescriptor('s') 520 UI.KeyboardShortcut.makeDescriptor('s')
521 ], 521 ],
522 522
523 Left: [ 523 Left: [
524 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.K eys.Left), 524 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Left),
525 WebInspector.KeyboardShortcut.makeDescriptor('a') 525 UI.KeyboardShortcut.makeDescriptor('a')
526 ], 526 ],
527 527
528 Right: [ 528 Right: [
529 WebInspector.KeyboardShortcut.makeDescriptor(WebInspector.KeyboardShortcut.K eys.Right), 529 UI.KeyboardShortcut.makeDescriptor(UI.KeyboardShortcut.Keys.Right),
530 WebInspector.KeyboardShortcut.makeDescriptor('d') 530 UI.KeyboardShortcut.makeDescriptor('d')
531 ] 531 ]
532 }; 532 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698