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

Side by Side Diff: Source/devtools/front_end/profiler/HeapSnapshotGridNodes.js

Issue 1070273004: DevTools: improve sort by column usability in heap profiler (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1125 matching lines...) Expand 10 before | Expand all | Expand 10 after
1136 }, 1136 },
1137 1137
1138 /** 1138 /**
1139 * @return {!WebInspector.HeapSnapshotCommon.ComparatorConfig} 1139 * @return {!WebInspector.HeapSnapshotCommon.ComparatorConfig}
1140 */ 1140 */
1141 comparator: function() 1141 comparator: function()
1142 { 1142 {
1143 var sortAscending = this._dataGrid.isSortOrderAscending(); 1143 var sortAscending = this._dataGrid.isSortOrderAscending();
1144 var sortColumnIdentifier = this._dataGrid.sortColumnIdentifier(); 1144 var sortColumnIdentifier = this._dataGrid.sortColumnIdentifier();
1145 var sortFields = { 1145 var sortFields = {
1146 object: ["id", sortAscending, "retainedSize", false], 1146 object: ["name", sortAscending, "id", true],
1147 distance: ["distance", sortAscending, "retainedSize", false], 1147 distance: ["distance", sortAscending, "retainedSize", false],
1148 count: ["id", true, "retainedSize", false], 1148 count: ["name", true, "id", true],
1149 shallowSize: ["selfSize", sortAscending, "id", true], 1149 shallowSize: ["selfSize", sortAscending, "id", true],
1150 retainedSize: ["retainedSize", sortAscending, "id", true] 1150 retainedSize: ["retainedSize", sortAscending, "id", true]
1151 }[sortColumnIdentifier]; 1151 }[sortColumnIdentifier];
1152 return WebInspector.HeapSnapshotGridNode.createComparator(sortFields); 1152 return WebInspector.HeapSnapshotGridNode.createComparator(sortFields);
1153 }, 1153 },
1154 1154
1155 /** 1155 /**
1156 * @param {!WebInspector.HeapSnapshotCommon.Node} node 1156 * @param {!WebInspector.HeapSnapshotCommon.Node} node
1157 * @return {number} 1157 * @return {number}
1158 */ 1158 */
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 }, 1385 },
1386 1386
1387 /** 1387 /**
1388 * @return {!WebInspector.HeapSnapshotCommon.ComparatorConfig} 1388 * @return {!WebInspector.HeapSnapshotCommon.ComparatorConfig}
1389 */ 1389 */
1390 comparator: function() 1390 comparator: function()
1391 { 1391 {
1392 var sortAscending = this._dataGrid.isSortOrderAscending(); 1392 var sortAscending = this._dataGrid.isSortOrderAscending();
1393 var sortColumnIdentifier = this._dataGrid.sortColumnIdentifier(); 1393 var sortColumnIdentifier = this._dataGrid.sortColumnIdentifier();
1394 var sortFields = { 1394 var sortFields = {
1395 object: ["id", sortAscending, "selfSize", false], 1395 object: ["name", sortAscending, "id", true],
1396 addedCount: ["selfSize", sortAscending, "id", true], 1396 addedCount: ["name", true, "id", true],
1397 removedCount: ["selfSize", sortAscending, "id", true], 1397 removedCount: ["name", true, "id", true],
1398 countDelta: ["selfSize", sortAscending, "id", true], 1398 countDelta: ["name", true, "id", true],
1399 addedSize: ["selfSize", sortAscending, "id", true], 1399 addedSize: ["selfSize", sortAscending, "id", true],
1400 removedSize: ["selfSize", sortAscending, "id", true], 1400 removedSize: ["selfSize", sortAscending, "id", true],
1401 sizeDelta: ["selfSize", sortAscending, "id", true] 1401 sizeDelta: ["selfSize", sortAscending, "id", true]
1402 }[sortColumnIdentifier]; 1402 }[sortColumnIdentifier];
1403 return WebInspector.HeapSnapshotGridNode.createComparator(sortFields); 1403 return WebInspector.HeapSnapshotGridNode.createComparator(sortFields);
1404 }, 1404 },
1405 1405
1406 /** 1406 /**
1407 * @param {string} filterValue 1407 * @param {string} filterValue
1408 * @return {boolean} 1408 * @return {boolean}
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 /** 1515 /**
1516 * @return {number} 1516 * @return {number}
1517 */ 1517 */
1518 allocationNodeId: function() 1518 allocationNodeId: function()
1519 { 1519 {
1520 return this._allocationNode.id; 1520 return this._allocationNode.id;
1521 }, 1521 },
1522 1522
1523 __proto__: WebInspector.HeapSnapshotGridNode.prototype 1523 __proto__: WebInspector.HeapSnapshotGridNode.prototype
1524 } 1524 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698