Commit cbe36c37 authored by pkasting@chromium.org's avatar pkasting@chromium.org

2009-05-04 Pavel Feldman <pfeldman@chromium.org>

        Reviewed by Timothy Hatcher.

        Do not instantiate hidden WebInspector panels. Otherwise they are hitting unimplemented InspectorController methods.
        https://bugs.webkit.org/show_bug.cgi?id=25520

        * inspector/front-end/inspector.js:
        (WebInspector.loaded):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43185 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9b4fe60b
2009-05-04 Pavel Feldman <pfeldman@chromium.org>
Reviewed by Timothy Hatcher.
Do not instantiate hidden WebInspector panels. Otherwise they are hitting unimplemented InspectorController methods.
https://bugs.webkit.org/show_bug.cgi?id=25520
* inspector/front-end/inspector.js:
(WebInspector.loaded):
2009-05-04 Brady Eidson <beidson@apple.com>
Reviewed by Darin Adler.
......@@ -279,22 +279,24 @@ WebInspector.loaded = function()
document.body.addStyleClass("platform-" + platform);
this.console = new WebInspector.Console();
this.panels = {
elements: new WebInspector.ElementsPanel(),
resources: new WebInspector.ResourcesPanel(),
scripts: new WebInspector.ScriptsPanel(),
profiles: new WebInspector.ProfilesPanel(),
databases: new WebInspector.DatabasesPanel()
};
this.panels = {};
var hiddenPanels = (InspectorController.hiddenPanels() || "").split(',');
if (hiddenPanels.indexOf("elements") === -1)
this.panels.elements = new WebInspector.ElementsPanel();
if (hiddenPanels.indexOf("resources") === -1)
this.panels.resources = new WebInspector.ResourcesPanel();
if (hiddenPanels.indexOf("scripts") === -1)
this.panels.scripts = new WebInspector.ScriptsPanel();
if (hiddenPanels.indexOf("profiles") === -1)
this.panels.profiles = new WebInspector.ProfilesPanel();
if (hiddenPanels.indexOf("databases") === -1)
this.panels.databases = new WebInspector.DatabasesPanel();
var toolbarElement = document.getElementById("toolbar");
var previousToolbarItem = toolbarElement.children[0];
for (var panelName in this.panels) {
if (hiddenPanels.indexOf(panelName) !== -1)
continue;
var panel = this.panels[panelName];
var panelToolbarItem = panel.toolbarItem;
panelToolbarItem.addEventListener("click", this._toolbarItemClicked.bind(this));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment