[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
pfeldman at chromium.org
pfeldman at chromium.org
Wed Dec 22 15:17:22 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit e9f3f5b58fdfe20a90b973aaf45aaedd600bafbb
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Oct 29 21:28:11 2010 +0000
2010-10-29 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: last active panel is not restored upon opening inspector.
https://bugs.webkit.org/show_bug.cgi?id=48668
* inspector/Inspector.idl:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
(WebCore::InspectorController::inspect):
(WebCore::InspectorController::showPanel):
(WebCore::InspectorController::disconnectFrontend):
(WebCore::InspectorController::populateScriptObjects):
* inspector/InspectorController.h:
* inspector/InspectorState.cpp:
(WebCore::InspectorState::InspectorState):
* inspector/front-end/Settings.js:
(WebInspector.Settings):
* inspector/front-end/inspector.js:
(WebInspector.set currentPanel):
(WebInspector.doLoadedDone.onPopulateScriptObjects):
(WebInspector.doLoadedDone):
(WebInspector.documentClick.followLink):
(WebInspector.documentClick):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70929 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5f4b5ee..57ba6ef 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,29 @@
+2010-10-29 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: last active panel is not restored upon opening inspector.
+ https://bugs.webkit.org/show_bug.cgi?id=48668
+
+ * inspector/Inspector.idl:
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::inspect):
+ (WebCore::InspectorController::showPanel):
+ (WebCore::InspectorController::disconnectFrontend):
+ (WebCore::InspectorController::populateScriptObjects):
+ * inspector/InspectorController.h:
+ * inspector/InspectorState.cpp:
+ (WebCore::InspectorState::InspectorState):
+ * inspector/front-end/Settings.js:
+ (WebInspector.Settings):
+ * inspector/front-end/inspector.js:
+ (WebInspector.set currentPanel):
+ (WebInspector.doLoadedDone.onPopulateScriptObjects):
+ (WebInspector.doLoadedDone):
+ (WebInspector.documentClick.followLink):
+ (WebInspector.documentClick):
+
2010-10-28 Michael Nordman <michaeln at google.com>
Reviewed by ap.
diff --git a/WebCore/inspector/Inspector.idl b/WebCore/inspector/Inspector.idl
index c9b9c4e..331e504 100644
--- a/WebCore/inspector/Inspector.idl
+++ b/WebCore/inspector/Inspector.idl
@@ -95,7 +95,6 @@ module core {
[handler=Controller] void populateScriptObjects();
[handler=Controller] void getInspectorState(out Object state);
- [handler=Controller] void storeLastActivePanel(in String panelName);
[handler=Controller] void setSearchingForNode(in boolean enabled, out boolean newState);
diff --git a/WebCore/inspector/InspectorController.cpp b/WebCore/inspector/InspectorController.cpp
index 61ebf72..956ef7e 100644
--- a/WebCore/inspector/InspectorController.cpp
+++ b/WebCore/inspector/InspectorController.cpp
@@ -127,8 +127,6 @@ static const char* const domNativeBreakpointType = "DOM";
static const char* const eventListenerNativeBreakpointType = "EventListener";
static const char* const xhrNativeBreakpointType = "XHR";
-// FIXME: move last panel setting to the front-end
-const char* const InspectorController::LastActivePanel = "lastActivePanel";
const char* const InspectorController::ElementsPanel = "elements";
const char* const InspectorController::ConsolePanel = "console";
const char* const InspectorController::ScriptsPanel = "scripts";
@@ -148,7 +146,6 @@ InspectorController::InspectorController(Page* page, InspectorClient* client)
, m_loadEventTime(-1.0)
, m_domContentEventTime(-1.0)
, m_expiredConsoleMessageCount(0)
- , m_showAfterVisible(LastActivePanel)
, m_groupLevel(0)
, m_previousMessage(0)
, m_settingsLoaded(false)
@@ -266,10 +263,8 @@ void InspectorController::inspect(Node* node)
node = node->parentNode();
m_nodeToFocus = node;
- if (!m_frontend) {
- m_showAfterVisible = ElementsPanel;
+ if (!m_frontend)
return;
- }
focusNode();
}
@@ -405,11 +400,6 @@ void InspectorController::markTimeline(const String& message)
timelineAgent()->didMarkTimeline(message);
}
-void InspectorController::storeLastActivePanel(const String& panelName)
-{
- m_state->setString(InspectorState::lastActivePanel, panelName);
-}
-
void InspectorController::mouseDidMoveOverElement(const HitTestResult& result, unsigned)
{
if (!enabled() || !searchingForNodeInPage())
@@ -549,10 +539,6 @@ void InspectorController::showPanel(const String& panel)
m_showAfterVisible = panel;
return;
}
-
- if (panel == LastActivePanel)
- return;
-
m_frontend->showPanel(panel);
}
@@ -587,8 +573,6 @@ void InspectorController::disconnectFrontend()
unbindAllResources();
stopTimelineProfiler();
- m_showAfterVisible = LastActivePanel;
-
hideHighlight();
#if ENABLE(JAVASCRIPT_DEBUGGER)
@@ -629,10 +613,10 @@ void InspectorController::populateScriptObjects()
if (!m_frontend)
return;
- if (m_showAfterVisible == LastActivePanel)
- m_showAfterVisible = m_state->getString(InspectorState::lastActivePanel);
-
- showPanel(m_showAfterVisible);
+ if (!m_showAfterVisible.isEmpty()) {
+ showPanel(m_showAfterVisible);
+ m_showAfterVisible = "";
+ }
#if ENABLE(JAVASCRIPT_DEBUGGER)
if (m_profilerAgent->enabled())
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h
index 917968c..80d094f 100644
--- a/WebCore/inspector/InspectorController.h
+++ b/WebCore/inspector/InspectorController.h
@@ -110,7 +110,6 @@ public:
typedef HashMap<int, RefPtr<InspectorDatabaseResource> > DatabaseResourcesMap;
typedef HashMap<int, RefPtr<InspectorDOMStorageResource> > DOMStorageResourcesMap;
- static const char* const LastActivePanel;
static const char* const ConsolePanel;
static const char* const ElementsPanel;
static const char* const ProfilesPanel;
@@ -300,7 +299,6 @@ private:
void setSearchingForNode(bool enabled, bool* newState);
void setMonitoringXHREnabled(bool enabled, bool* newState);
- void storeLastActivePanel(const String& panelName);
InspectorDOMAgent* domAgent() { return m_domAgent.get(); }
void releaseFrontendLifetimeAgents();
diff --git a/WebCore/inspector/InspectorState.cpp b/WebCore/inspector/InspectorState.cpp
index 6a504c6..e6d3044 100644
--- a/WebCore/inspector/InspectorState.cpp
+++ b/WebCore/inspector/InspectorState.cpp
@@ -46,7 +46,6 @@ InspectorState::InspectorState(InspectorClient* client)
registerBoolean(searchingForNode, false, "searchingForNodeEnabled", (const char*)0);
registerBoolean(profilerAlwaysEnabled, false, (const char*)0, "profilerEnabled");
registerBoolean(debuggerAlwaysEnabled, false, (const char*)0, "debuggerEnabled");
- registerString(lastActivePanel, InspectorController::LastActivePanel, (const char*)0, "lastActivePanel");
registerBoolean(inspectorStartsAttached, true, (const char*)0, "InspectorStartsAttached");
registerLong(inspectorAttachedHeight, InspectorController::defaultAttachedHeight, (const char*)0, "inspectorAttachedHeight");
registerLong(pauseOnExceptionsState, 0, "pauseOnExceptionsState", (const char*)0);
diff --git a/WebCore/inspector/front-end/Settings.js b/WebCore/inspector/front-end/Settings.js
index 2805bc5..3fb81f5 100644
--- a/WebCore/inspector/front-end/Settings.js
+++ b/WebCore/inspector/front-end/Settings.js
@@ -61,6 +61,7 @@ WebInspector.Settings = function()
this.installApplicationSetting("showInheritedComputedStyleProperties", false);
this.installApplicationSetting("showUserAgentStyles", true);
this.installApplicationSetting("watchExpressions", []);
+ this.installApplicationSetting("lastActivePanel", "elements");
this.installProjectSetting("breakpoints", {});
}
diff --git a/WebCore/inspector/front-end/inspector.js b/WebCore/inspector/front-end/inspector.js
index f5b12c1..f5a70c8 100644
--- a/WebCore/inspector/front-end/inspector.js
+++ b/WebCore/inspector/front-end/inspector.js
@@ -181,7 +181,7 @@ var WebInspector = {
for (var panelName in WebInspector.panels) {
if (WebInspector.panels[panelName] === x) {
- InspectorBackend.storeLastActivePanel(panelName);
+ WebInspector.applicationSettings.lastActivePanel = panelName;
this._panelHistory.setPanel(panelName);
}
}
@@ -639,7 +639,13 @@ WebInspector.doLoadedDone = function()
}
InspectorBackend.getInspectorState(populateInspectorState);
- InspectorBackend.populateScriptObjects();
+ function onPopulateScriptObjects()
+ {
+ if (!WebInspector.currentPanel)
+ WebInspector.showPanel(WebInspector.applicationSettings.lastActivePanel);
+ }
+ InspectorBackend.populateScriptObjects(onPopulateScriptObjects);
+
InspectorBackend.setConsoleMessagesEnabled(true);
// As a DOMAgent method, this needs to happen after the frontend has loaded and the agent is available.
@@ -812,7 +818,7 @@ WebInspector.documentClick = function(event)
if (parsedURL.host === "show-panel") {
var panel = parsedURL.path.substring(1);
if (WebInspector.panels[panel])
- WebInspector.currentPanel = WebInspector.panels[panel];
+ WebInspector.showPanel(panel);
}
return;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list