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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js

Issue 2599203002: Timeline: fix collapse of empty network pane (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js
index 5f95e5f3c907236d3a1534e55d068fc229e31c98..ea82914dd81547a1041646c81c2c8672e1628c1e 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js
@@ -973,7 +973,8 @@ UI.FlameChart = class extends UI.ChartViewport {
var visible = true;
/** @type !Array<{nestingLevel: number, visible: boolean}> */
var groupStack = [{nestingLevel: -1, visible: true}];
- for (var level = 0; level < levelCount; ++level) {
+ var lastGroupLevel = Math.max(levelCount, groups.peekLast().startLevel + 1);
+ for (var level = 0; level < lastGroupLevel; ++level) {
while (groupIndex < groups.length - 1 && level === groups[groupIndex + 1].startLevel) {
++groupIndex;
var style = groups[groupIndex].style;
@@ -995,8 +996,10 @@ UI.FlameChart = class extends UI.ChartViewport {
}
var isFirstOnLevel = groupIndex >= 0 && level === groups[groupIndex].startLevel;
var thisLevelIsVisible = visible || isFirstOnLevel && groups[groupIndex].style.useFirstLineForOverview;
- this._visibleLevels[level] = thisLevelIsVisible;
- this._visibleLevelOffsets[level] = currentOffset;
+ if (level < levelCount) {
+ this._visibleLevels[level] = thisLevelIsVisible;
+ this._visibleLevelOffsets[level] = currentOffset;
+ }
if (thisLevelIsVisible || (parentGroupIsVisible && style.shareHeaderLine && isFirstOnLevel))
currentOffset += this._barHeight;
}
« 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