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

Unified Diff: Source/devtools/front_end/HeapSnapshotDataGrids.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 | « no previous file | Source/devtools/front_end/HeapSnapshotGridNodes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/HeapSnapshotDataGrids.js
diff --git a/Source/devtools/front_end/HeapSnapshotDataGrids.js b/Source/devtools/front_end/HeapSnapshotDataGrids.js
index 3789abb805bde8bc3def8a1fadf4ad1434107a00..a26197e8c36c5e7664e7bab77c56b306c11785bf 100644
--- a/Source/devtools/front_end/HeapSnapshotDataGrids.js
+++ b/Source/devtools/front_end/HeapSnapshotDataGrids.js
@@ -1054,7 +1054,7 @@ WebInspector.HeapSnapshotDominatorsDataGrid.prototype = {
/**
* @constructor
- * @extends {WebInspector.DataGrid}
+ * @extends {WebInspector.HeapSnapshotViewportDataGrid}
*/
WebInspector.AllocationDataGrid = function()
{
@@ -1065,9 +1065,8 @@ WebInspector.AllocationDataGrid = function()
{id: "size", title: WebInspector.UIString("Size"), width: "72px", sortable: true, sort: WebInspector.DataGrid.Order.Descending},
{id: "name", title: WebInspector.UIString("Function"), disclosure: true, sortable: true},
];
- WebInspector.DataGrid.call(this, columns);
+ WebInspector.HeapSnapshotViewportDataGrid.call(this, columns);
this._linkifier = new WebInspector.Linkifier();
- this.addEventListener(WebInspector.DataGrid.Events.SortingChanged, this._sortingChanged, this);
}
WebInspector.AllocationDataGrid.prototype = {
@@ -1089,13 +1088,15 @@ WebInspector.AllocationDataGrid.prototype = {
_populateChildren: function()
{
+ this.removeTopLevelNodes();
var root = this.rootNode();
var tops = this._topNodes;
for (var i = 0; i < tops.length; i++)
- root.appendChild(new WebInspector.AllocationGridNode(this, tops[i]));
+ this.appendNode(root, new WebInspector.AllocationGridNode(this, tops[i]));
+ this.updateVisibleNodes(true);
},
- _sortingChanged: function()
+ sortingChanged: function()
{
this._topNodes.sort(this._createComparator());
this.rootNode().removeChildren();
@@ -1126,5 +1127,5 @@ WebInspector.AllocationDataGrid.prototype = {
return compare;
},
- __proto__: WebInspector.DataGrid.prototype
+ __proto__: WebInspector.HeapSnapshotViewportDataGrid.prototype
}
« no previous file with comments | « no previous file | Source/devtools/front_end/HeapSnapshotGridNodes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698