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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/BottomUpProfileDataGrid.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 280 North Inc. All Rights Reserved. 2 * Copyright (C) 2009 280 North 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 */ 242 */
243 focus(profileDataGridNode) { 243 focus(profileDataGridNode) {
244 if (!profileDataGridNode) 244 if (!profileDataGridNode)
245 return; 245 return;
246 246
247 this.save(); 247 this.save();
248 248
249 var currentNode = profileDataGridNode; 249 var currentNode = profileDataGridNode;
250 var focusNode = profileDataGridNode; 250 var focusNode = profileDataGridNode;
251 251
252 while (currentNode.parent && (currentNode instanceof Profiler.ProfileDataGri dNode)) { 252 while (currentNode.parent() && (currentNode instanceof Profiler.ProfileDataG ridNode)) {
253 currentNode._takePropertiesFromProfileDataGridNode(profileDataGridNode); 253 currentNode._takePropertiesFromProfileDataGridNode(profileDataGridNode);
254 254
255 focusNode = currentNode; 255 focusNode = currentNode;
256 currentNode = currentNode.parent; 256 currentNode = currentNode.parent();
257 257
258 if (currentNode instanceof Profiler.ProfileDataGridNode) 258 if (currentNode instanceof Profiler.ProfileDataGridNode)
259 currentNode._keepOnlyChild(focusNode); 259 currentNode._keepOnlyChild(focusNode);
260 } 260 }
261 261
262 this.children = [focusNode]; 262 this.children = [focusNode];
263 this.total = profileDataGridNode.total; 263 this.total = profileDataGridNode.total;
264 } 264 }
265 265
266 /** 266 /**
(...skipping 23 matching lines...) Expand all
290 this.sort(this.lastComparator, true); 290 this.sort(this.lastComparator, true);
291 } 291 }
292 292
293 /** 293 /**
294 * @override 294 * @override
295 */ 295 */
296 populateChildren() { 296 populateChildren() {
297 Profiler.BottomUpProfileDataGridNode._sharedPopulate(this); 297 Profiler.BottomUpProfileDataGridNode._sharedPopulate(this);
298 } 298 }
299 }; 299 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698