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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/HeapSnapshotDataGrids.js

Issue 2716983002: [Devtools] Moved DataGridNode's .parent property to proper getter/setter (Closed)
Patch Set: changes 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/profiler/BottomUpProfileDataGrid.js ('k') | 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 346
347 this._topPaddingHeight = 0; 347 this._topPaddingHeight = 0;
348 this._bottomPaddingHeight = 0; 348 this._bottomPaddingHeight = 0;
349 349
350 this._addVisibleNodes(this.rootNode(), scrollTop, scrollTop + viewPortHeight ); 350 this._addVisibleNodes(this.rootNode(), scrollTop, scrollTop + viewPortHeight );
351 351
352 this.setVerticalPadding(this._topPaddingHeight, this._bottomPaddingHeight); 352 this.setVerticalPadding(this._topPaddingHeight, this._bottomPaddingHeight);
353 353
354 if (selectedNode) { 354 if (selectedNode) {
355 // Keep selection even if the node is not in the current viewport. 355 // Keep selection even if the node is not in the current viewport.
356 if (selectedNode.parent) 356 if (selectedNode.parent())
357 selectedNode.select(true); 357 selectedNode.select(true);
358 else 358 else
359 this.selectedNode = selectedNode; 359 this.selectedNode = selectedNode;
360 } 360 }
361 } 361 }
362 362
363 /** 363 /**
364 * @param {!DataGrid.DataGridNode} parentNode 364 * @param {!DataGrid.DataGridNode} parentNode
365 * @param {number} topBound 365 * @param {number} topBound
366 * @param {number} bottomBound 366 * @param {number} bottomBound
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 function compare(a, b) { 1011 function compare(a, b) {
1012 if (a[fieldName] > b[fieldName]) 1012 if (a[fieldName] > b[fieldName])
1013 return compareResult; 1013 return compareResult;
1014 if (a[fieldName] < b[fieldName]) 1014 if (a[fieldName] < b[fieldName])
1015 return -compareResult; 1015 return -compareResult;
1016 return 0; 1016 return 0;
1017 } 1017 }
1018 return compare; 1018 return compare;
1019 } 1019 }
1020 }; 1020 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/profiler/BottomUpProfileDataGrid.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698