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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js

Issue 2722983007: DevTools Timeline: fix NPE when collapsing the last group (Closed)
Patch Set: 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 | « 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 this._groupExpansionState[group.name] = group.expanded; 346 this._groupExpansionState[group.name] = group.expanded;
347 if (this._groupExpansionSetting) 347 if (this._groupExpansionSetting)
348 this._groupExpansionSetting.set(this._groupExpansionState); 348 this._groupExpansionSetting.set(this._groupExpansionState);
349 this._updateLevelPositions(); 349 this._updateLevelPositions();
350 350
351 this._updateHighlight(); 351 this._updateHighlight();
352 if (!group.expanded) { 352 if (!group.expanded) {
353 var timelineData = this._timelineData(); 353 var timelineData = this._timelineData();
354 var level = timelineData.entryLevels[this._selectedEntryIndex]; 354 var level = timelineData.entryLevels[this._selectedEntryIndex];
355 if (this._selectedEntryIndex >= 0 && level >= group.startLevel && 355 if (this._selectedEntryIndex >= 0 && level >= group.startLevel &&
356 (groupIndex === groups.length || groups[groupIndex + 1].startLevel > l evel)) 356 (groupIndex >= groups.length - 1 || groups[groupIndex + 1].startLevel > level))
357 this._selectedEntryIndex = -1; 357 this._selectedEntryIndex = -1;
358 } 358 }
359 359
360 this._updateHeight(); 360 this._updateHeight();
361 this._resetCanvas(); 361 this._resetCanvas();
362 this._draw(this._offsetWidth, this._offsetHeight); 362 this._draw(this._offsetWidth, this._offsetHeight);
363 } 363 }
364 364
365 /** 365 /**
366 * @param {!Event} e 366 * @param {!Event} e
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1529 } 1529 }
1530 1530
1531 /** 1531 /**
1532 * @override 1532 * @override
1533 * @return {number} 1533 * @return {number}
1534 */ 1534 */
1535 boundarySpan() { 1535 boundarySpan() {
1536 return this._maximumBoundaries - this._minimumBoundaries; 1536 return this._maximumBoundaries - this._minimumBoundaries;
1537 } 1537 }
1538 }; 1538 };
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