summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2011-05-18 13:36:51 +0100
committerSteve Block <steveblock@google.com>2011-05-24 15:38:28 +0100
commit2fc2651226baac27029e38c9d6ef883fa32084db (patch)
treee396d4bf89dcce6ed02071be66212495b1df1dec /Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js
parentb3725cedeb43722b3b175aaeff70552e562d2c94 (diff)
downloadexternal_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.zip
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.gz
external_webkit-2fc2651226baac27029e38c9d6ef883fa32084db.tar.bz2
Merge WebKit at r78450: Initial merge by git.
Change-Id: I6d3e5f1f868ec266a0aafdef66182ddc3f265dc1
Diffstat (limited to 'Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js')
-rw-r--r--Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js21
1 files changed, 16 insertions, 5 deletions
diff --git a/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js b/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js
index d3190a9..bdbb0cf 100644
--- a/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js
+++ b/Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js
@@ -26,6 +26,8 @@
WebInspector.ScopeChainSidebarPane = function()
{
WebInspector.SidebarPane.call(this, WebInspector.UIString("Scope Variables"));
+ this._sections = [];
+ this._expandedSections = {};
this._expandedProperties = [];
}
@@ -34,9 +36,6 @@ WebInspector.ScopeChainSidebarPane.prototype = {
{
this.bodyElement.removeChildren();
- this.sections = [];
- this.callFrame = callFrame;
-
if (!callFrame) {
var infoElement = document.createElement("div");
infoElement.className = "info";
@@ -45,6 +44,18 @@ WebInspector.ScopeChainSidebarPane.prototype = {
return;
}
+ for (var i = 0; i < this._sections.length; ++i) {
+ var section = this._sections[i];
+ if (!section.title)
+ continue;
+ if (section.expanded)
+ this._expandedSections[section.title] = true;
+ else
+ delete this._expandedSections[section.title];
+ }
+
+ this._sections = [];
+
var foundLocalScope = false;
var scopeChain = callFrame.scopeChain;
for (var i = 0; i < scopeChain.length; ++i) {
@@ -81,10 +92,10 @@ WebInspector.ScopeChainSidebarPane.prototype = {
section.editInSelectedCallFrameWhenPaused = true;
section.pane = this;
- if (!foundLocalScope || scopeObjectProxy.isLocal)
+ if (!foundLocalScope || scopeObjectProxy.isLocal || title in this._expandedSections)
section.expanded = true;
- this.sections.push(section);
+ this._sections.push(section);
this.bodyElement.appendChild(section.element);
}
}