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

Unified Diff: Source/WebCore/inspector/front-end/inspector.js

Issue 11413082: Merge 134944 - Web Inspector: Workaround to show shortcuts for panels that hasn't been loaded. (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/inspector/front-end/ShortcutsScreen.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/inspector/front-end/inspector.js
===================================================================
--- Source/WebCore/inspector/front-end/inspector.js (revision 135261)
+++ Source/WebCore/inspector/front-end/inspector.js (working copy)
@@ -377,10 +377,11 @@
WebInspector._doLoadedDoneWithCapabilities = function()
{
- WebInspector.shortcutsScreen = new WebInspector.ShortcutsScreen();
- this._registerShortcuts();
+ var panelDescriptors = this._panelDescriptors();
+ WebInspector.shortcutsScreen = new WebInspector.ShortcutsScreen(this._registerShortcuts.bind(this, panelDescriptors));
// set order of some sections explicitly
+ WebInspector.shortcutsScreen.section(WebInspector.UIString("All Panels"));
WebInspector.shortcutsScreen.section(WebInspector.UIString("Console"));
WebInspector.shortcutsScreen.section(WebInspector.UIString("Elements Panel"));
@@ -445,7 +446,6 @@
this.toolbar = new WebInspector.Toolbar();
WebInspector.startBatchUpdate();
- var panelDescriptors = this._panelDescriptors();
for (var i = 0; i < panelDescriptors.length; ++i)
WebInspector.inspectorView.addPanel(panelDescriptors[i]);
WebInspector.endBatchUpdate();
@@ -613,7 +613,7 @@
InspectorFrontendHost.openInNewTab(resourceURL);
}
-WebInspector._registerShortcuts = function()
+WebInspector._registerShortcuts = function(panelDescriptors)
{
var shortcut = WebInspector.KeyboardShortcut;
var section = WebInspector.shortcutsScreen.section(WebInspector.UIString("All Panels"));
@@ -648,6 +648,9 @@
var goToShortcut = WebInspector.GoToLineDialog.createShortcut();
section.addKey(goToShortcut.name, WebInspector.UIString("Go to line"));
+
+ for (var i = 0; i < panelDescriptors.length; ++i)
+ panelDescriptors[i].panel();
}
WebInspector.documentKeyDown = function(event)
« no previous file with comments | « Source/WebCore/inspector/front-end/ShortcutsScreen.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698