Index: Source/devtools/front_end/sources/ScopeChainSidebarPane.js |
diff --git a/Source/devtools/front_end/sources/ScopeChainSidebarPane.js b/Source/devtools/front_end/sources/ScopeChainSidebarPane.js |
index f4e554fe7e14a5678e2a0f1d5bafd5ed61f74c19..acf14a6beb6b494ec0ebd8f0826baaf113e6739b 100644 |
--- a/Source/devtools/front_end/sources/ScopeChainSidebarPane.js |
+++ b/Source/devtools/front_end/sources/ScopeChainSidebarPane.js |
@@ -34,8 +34,8 @@ WebInspector.ScopeChainSidebarPane = function() |
this._sections = []; |
/** @type {!Set.<?string>} */ |
this._expandedSections = new Set(); |
- /** @type {!Set.<string>} */ |
- this._expandedProperties = new Set(); |
+ /** @type {!WebInspector.ObjectPropertiesMemento} */ |
+ this.memento = new WebInspector.ObjectPropertiesMemento(); |
} |
WebInspector.ScopeChainSidebarPane.prototype = { |
@@ -128,9 +128,8 @@ WebInspector.ScopeChainSidebarPane.prototype = { |
else |
var scopeObject = runtimeModel.createRemoteObject(scope.object); |
- var section = new WebInspector.ObjectPropertiesSection(scopeObject, title, subtitle, emptyPlaceholder, true, extraProperties, WebInspector.ScopeVariableTreeElement); |
+ var section = new WebInspector.ObjectPropertiesSection(scopeObject, title, subtitle, emptyPlaceholder, true, extraProperties, WebInspector.ScopeVariableTreeElement, this.memento); |
section.editInSelectedCallFrameWhenPaused = true; |
- section.pane = this; |
if (scope.type === DebuggerAgent.ScopeType.Global) |
section.collapse(); |
@@ -145,6 +144,7 @@ WebInspector.ScopeChainSidebarPane.prototype = { |
__proto__: WebInspector.SidebarPane.prototype |
} |
+ |
/** |
* @constructor |
* @extends {WebInspector.ObjectPropertyTreeElement} |
@@ -159,18 +159,18 @@ WebInspector.ScopeVariableTreeElement.prototype = { |
onattach: function() |
{ |
WebInspector.ObjectPropertyTreeElement.prototype.onattach.call(this); |
- if (this.hasChildren && this.treeOutline.section.pane._expandedProperties.has(this.propertyPath())) |
+ if (this.hasChildren && this.treeOutline.section.memento.isPropertyPathExpanded(this.propertyPath())) |
this.expand(); |
}, |
onexpand: function() |
{ |
- this.treeOutline.section.pane._expandedProperties.add(this.propertyPath()); |
+ this.treeOutline.section.memento.addExpandedPropertyPath(this.propertyPath()); |
}, |
oncollapse: function() |
{ |
- this.treeOutline.section.pane._expandedProperties.delete(this.propertyPath()); |
+ this.treeOutline.section.memento.deleteExpandedPropertyPath(this.propertyPath()); |
}, |
/** |