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

Unified Diff: Source/devtools/front_end/elements/ElementsTreeOutline.js

Issue 614323003: DevTools: enable by default disableAgentsWhenProfile experiment (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: unnecessary line was removed Created 6 years, 2 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 | « Source/devtools/front_end/components/InspectorView.js ('k') | Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/elements/ElementsTreeOutline.js
diff --git a/Source/devtools/front_end/elements/ElementsTreeOutline.js b/Source/devtools/front_end/elements/ElementsTreeOutline.js
index 35189c91397382a6199946b32f0449f1b7a2dd05..fb49fdfe8eb979f593dc172d697d6e311322be99 100644
--- a/Source/devtools/front_end/elements/ElementsTreeOutline.js
+++ b/Source/devtools/front_end/elements/ElementsTreeOutline.js
@@ -1140,7 +1140,7 @@ WebInspector.ElementsTreeElement.prototype = {
this._expandedChildrenLimit = x;
if (this.treeOutline && !this._updateChildrenInProgress)
- this._updateChildren(true);
+ this._updateChildren(true, this.children);
},
get expandedChildCount()
@@ -1168,7 +1168,7 @@ WebInspector.ElementsTreeElement.prototype = {
if (index >= this.expandedChildrenLimit) {
this._expandedChildrenLimit = index + 1;
- this._updateChildren(true);
+ this._updateChildren(true, this.children);
}
// Whether index-th child is visible in the children tree
@@ -1239,7 +1239,7 @@ WebInspector.ElementsTreeElement.prototype = {
if (!this.hasChildren)
return;
console.assert(!this._elementCloseTag);
- this._node.getChildNodes(this._updateChildren.bind(this, fullRefresh));
+ this._node.getChildNodes(this._updateChildren.bind(this, fullRefresh || false));
},
/**
@@ -1266,11 +1266,12 @@ WebInspector.ElementsTreeElement.prototype = {
},
/**
- * @param {boolean=} fullRefresh
+ * @param {boolean} fullRefresh
+ * @param {?Array.<!WebInspector.DOMNode>} children
*/
- _updateChildren: function(fullRefresh)
+ _updateChildren: function(fullRefresh, children)
{
- if (this._updateChildrenInProgress || !this.treeOutline._visible)
+ if (!children || this._updateChildrenInProgress || !this.treeOutline._visible)
pfeldman 2014/11/12 17:19:39 Could reviewers explain why this is needed here?
return;
this._updateChildrenInProgress = true;
« no previous file with comments | « Source/devtools/front_end/components/InspectorView.js ('k') | Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698