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

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

Issue 2716983002: [Devtools] Moved DataGridNode's .parent property to proper getter/setter (Closed)
Patch Set: [Devtools] Moved DataGridNode's .parent property to proper getter/setter Created 3 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: 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 5b75ec34be5fa33e591947df1fd733d64566d5fe..9884c97d820a65063b75bd3aa69bbd721352876a 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
@@ -322,7 +322,7 @@ DataGrid.ViewportDataGridNode = class extends DataGrid.DataGridNode {
*/
clearFlatNodes() {
this._flatNodes = null;
- var parent = /** @type {!DataGrid.ViewportDataGridNode} */ (this.parent);
+ var parent = this.parent();
if (parent)
parent.clearFlatNodes();
}
@@ -365,7 +365,7 @@ DataGrid.ViewportDataGridNode = class extends DataGrid.DataGridNode {
*/
insertChild(child, index) {
this.clearFlatNodes();
- if (child.parent === this) {
+ if (child.parent() === this) {
var currentIndex = this.children.indexOf(child);
if (currentIndex < 0)
console.assert(false, 'Inconsistent DataGrid state');
@@ -375,7 +375,7 @@ DataGrid.ViewportDataGridNode = class extends DataGrid.DataGridNode {
--index;
}
child.remove();
- child.parent = this;
+ child.setParent(this);
child.dataGrid = this.dataGrid;
if (!this.children.length)
this.setHasChildren(true);
@@ -397,7 +397,7 @@ DataGrid.ViewportDataGridNode = class extends DataGrid.DataGridNode {
child.previousSibling.nextSibling = child.nextSibling;
if (child.nextSibling)
child.nextSibling.previousSibling = child.previousSibling;
- if (child.parent !== this)
+ if (child.parent() !== this)
throw 'removeChild: Node is not a child of this node.';
child._unlink();
@@ -429,7 +429,7 @@ DataGrid.ViewportDataGridNode = class extends DataGrid.DataGridNode {
this.wasDetached();
}
this.dataGrid = null;
- this.parent = null;
+ this.setParent(null);
this.nextSibling = null;
this.previousSibling = null;
}

Powered by Google App Engine
This is Rietveld 408576698