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

Unified Diff: Source/devtools/front_end/sources/ScopeChainSidebarPane.js

Issue 826713005: DevTools: Highlight changed scope variables as they change (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressing feedback. v good points. simplified Created 5 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
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());
},
/**
« no previous file with comments | « Source/devtools/front_end/main/Main.js ('k') | Source/devtools/front_end/sources/WatchExpressionsSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698