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

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

Issue 2852173002: DevTools: Show screenshots on the main flamechart (Closed)
Patch Set: addressing comments Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/PerformanceModel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
diff --git a/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js b/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
index 82dd2806e44c54f60b7789cb13a25bf85d4cf33c..bba71855f9af3a95385968d5e710e935e7008cfa 100644
--- a/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
+++ b/third_party/WebKit/Source/devtools/front_end/perf_ui/FlameChart.js
@@ -1124,8 +1124,10 @@ PerfUI.FlameChart = class extends PerfUI.ChartViewport {
if (level < levelCount) {
var height;
if (groupIndex >= 0) {
- var style = groups[groupIndex].style;
- height = isFirstOnLevel ? style.height : (style.itemsHeight || this._barHeight);
+ var group = groups[groupIndex];
+ var style = group.style;
+ height = isFirstOnLevel && !style.shareHeaderLine || !group.expanded ? style.height :
+ (style.itemsHeight || this._barHeight);
} else {
height = this._barHeight;
}
@@ -1153,8 +1155,11 @@ PerfUI.FlameChart = class extends PerfUI.ChartViewport {
if (!isLastGroup && groups[index + 1].style.nestingLevel > style.nestingLevel)
return true;
var nextGroupLevel = isLastGroup ? this._dataProvider.maxStackDepth() : groups[index + 1].startLevel;
- // For groups that only have one line and share header line, pretend these are not collapsible.
- return nextGroupLevel !== groups[index].startLevel + 1;
+ if (nextGroupLevel !== groups[index].startLevel + 1)
+ return true;
+ // For groups that only have one line and share header line, pretend these are not collapsible
+ // unless the itemsHeight does not match the headerHeight
+ return style.height !== style.itemsHeight;
}
/**
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/timeline/PerformanceModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698