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

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

Issue 6397012: Merge 76795 - 2011-01-27 Pavel Podivilov <podivilov@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 years, 11 months 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 | « LayoutTests/inspector/debugger-proto-property.html ('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/ScopeChainSidebarPane.js
===================================================================
--- Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js (revision 76938)
+++ Source/WebCore/inspector/front-end/ScopeChainSidebarPane.js (working copy)
@@ -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 @@
{
this.bodyElement.removeChildren();
- this.sections = [];
- this.callFrame = callFrame;
-
if (!callFrame) {
var infoElement = document.createElement("div");
infoElement.className = "info";
@@ -45,6 +44,18 @@
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 @@
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);
}
}
« no previous file with comments | « LayoutTests/inspector/debugger-proto-property.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698