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

Unified Diff: third_party/WebKit/Source/devtools/front_end/data_grid/ViewportDataGrid.js

Issue 2781593003: [Devtools] DataGrid & ViewportDataGrid now should resetNode for children (Closed)
Patch Set: [Devtools] DataGrid & ViewportDataGrid now should resetNode for children Created 3 years, 9 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: third_party/WebKit/Source/devtools/front_end/data_grid/ViewportDataGrid.js
diff --git a/third_party/WebKit/Source/devtools/front_end/data_grid/ViewportDataGrid.js b/third_party/WebKit/Source/devtools/front_end/data_grid/ViewportDataGrid.js
index e9b5f7b1d48dc8e816d39bda8874e4179745f97d..df6f3304bf68509e202b69e792e52a5c46fc0a2b 100644
--- a/third_party/WebKit/Source/devtools/front_end/data_grid/ViewportDataGrid.js
+++ b/third_party/WebKit/Source/devtools/front_end/data_grid/ViewportDataGrid.js
@@ -372,8 +372,9 @@ DataGrid.ViewportDataGridNode = class extends DataGrid.DataGridNode {
if (child.parent !== this)
throw 'removeChild: Node is not a child of this node.';
- child._unlink();
this.children.remove(child, true);
+ child._unlink();
+
if (!this.children.length)
this.setHasChildren(false);
if (this._expanded)
@@ -400,10 +401,7 @@ DataGrid.ViewportDataGridNode = class extends DataGrid.DataGridNode {
this.existingElement().remove();
this.wasDetached();
}
- this.dataGrid = null;
- this.parent = null;
- this.nextSibling = null;
- this.previousSibling = null;
+ this.resetNode();
}
/**

Powered by Google App Engine
This is Rietveld 408576698