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

Unified Diff: Source/devtools/front_end/network/XMLView.js

Issue 944343002: DevTools: migrate treeoutline from hasChildren to is/setExpandable(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/network/XMLView.js
diff --git a/Source/devtools/front_end/network/XMLView.js b/Source/devtools/front_end/network/XMLView.js
index 429ce03fd95d8fa7fa27c8bccc284851a94a48f9..42b04868a3c19f8240ee35b97dbca6a928351b6e 100644
--- a/Source/devtools/front_end/network/XMLView.js
+++ b/Source/devtools/front_end/network/XMLView.js
@@ -47,12 +47,10 @@ WebInspector.XMLView.prototype = {
*/
WebInspector.XMLView.Node = function(node, closeTag)
{
- TreeElement.call(this, "", true);
+ TreeElement.call(this, "", !closeTag && !!node.childElementCount);
this._node = node;
this._closeTag = closeTag;
- this._populated = false;
this.selectable = false;
- this.hasChildren = !closeTag && !!node.childElementCount;
this._updateTitle();
}
@@ -163,11 +161,8 @@ WebInspector.XMLView.Node.prototype = {
onpopulate: function()
{
- if (this._populated || this._closeTag)
- return;
WebInspector.XMLView.Node.populate(this, this._node);
this.appendChild(new WebInspector.XMLView.Node(this._node, true));
- this._populated = true;
},
__proto__: TreeElement.prototype

Powered by Google App Engine
This is Rietveld 408576698