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

Unified Diff: Source/devtools/front_end/HeapSnapshotGridNodes.js

Issue 218933003: Implement view port for allocation view (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/devtools/front_end/HeapSnapshotDataGrids.js ('k') | Source/devtools/front_end/HeapSnapshotView.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/HeapSnapshotGridNodes.js
diff --git a/Source/devtools/front_end/HeapSnapshotGridNodes.js b/Source/devtools/front_end/HeapSnapshotGridNodes.js
index 2bf39326753fa9b8ae906365cbd09e3f8785d9a8..8ecabbc8f9091aaed249fce253fcdfb6dc07befd 100644
--- a/Source/devtools/front_end/HeapSnapshotGridNodes.js
+++ b/Source/devtools/front_end/HeapSnapshotGridNodes.js
@@ -1342,15 +1342,15 @@ WebInspector.HeapSnapshotDominatorObjectNode.prototype = {
/**
* @constructor
- * @extends {WebInspector.DataGridNode}
+ * @extends {WebInspector.HeapSnapshotGridNode}
* @param {!WebInspector.AllocationDataGrid} dataGrid
* @param {!WebInspector.HeapSnapshotCommon.SerializedAllocationNode} data
*/
WebInspector.AllocationGridNode = function(dataGrid, data)
{
- WebInspector.DataGridNode.call(this, data, data.hasChildren);
- this._dataGrid = dataGrid;
+ WebInspector.HeapSnapshotGridNode.call(this, dataGrid, data.hasChildren);
this._populated = false;
+ this.data = data;
}
WebInspector.AllocationGridNode.prototype = {
@@ -1369,9 +1369,10 @@ WebInspector.AllocationGridNode.prototype = {
{
var callersChain = callers.nodesWithSingleCaller;
var parentNode = this;
+ var dataGrid = /** @type {!WebInspector.AllocationDataGrid} */ (this._dataGrid);
for (var i = 0; i < callersChain.length; i++) {
- var child = new WebInspector.AllocationGridNode(this._dataGrid, callersChain[i]);
- parentNode.appendChild(child);
+ var child = new WebInspector.AllocationGridNode(dataGrid, callersChain[i]);
+ dataGrid.appendNode(parentNode, child);
parentNode = child;
parentNode._populated = true;
if (this.expanded)
@@ -1381,7 +1382,8 @@ WebInspector.AllocationGridNode.prototype = {
var callersBranch = callers.branchingCallers;
callersBranch.sort(this._dataGrid._createComparator());
for (var i = 0; i < callersBranch.length; i++)
- parentNode.appendChild(new WebInspector.AllocationGridNode(this._dataGrid, callersBranch[i]));
+ dataGrid.appendNode(parentNode, new WebInspector.AllocationGridNode(dataGrid, callersBranch[i]));
+ dataGrid.updateVisibleNodes(true);
}
},
@@ -1390,7 +1392,7 @@ WebInspector.AllocationGridNode.prototype = {
*/
expand: function()
{
- WebInspector.DataGridNode.prototype.expand.call(this);
+ WebInspector.HeapSnapshotGridNode.prototype.expand.call(this);
if (this.children.length === 1)
this.children[0].expand();
},
@@ -1402,7 +1404,7 @@ WebInspector.AllocationGridNode.prototype = {
*/
createCell: function(columnIdentifier)
{
- var cell = WebInspector.DataGridNode.prototype.createCell.call(this, columnIdentifier);
+ var cell = WebInspector.HeapSnapshotGridNode.prototype.createCell.call(this, columnIdentifier);
if (columnIdentifier !== "name")
return cell;
@@ -1425,5 +1427,5 @@ WebInspector.AllocationGridNode.prototype = {
return this.data.id;
},
- __proto__: WebInspector.DataGridNode.prototype
+ __proto__: WebInspector.HeapSnapshotGridNode.prototype
}
« no previous file with comments | « Source/devtools/front_end/HeapSnapshotDataGrids.js ('k') | Source/devtools/front_end/HeapSnapshotView.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698