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

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

Issue 1813813005: Timeline: fix overlapping group headers in Flame Chart (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 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 7fcde25911c3bad94c19f46d44a9c05a89489a50..096d801416ee938838296a21cdf254e4241aef95 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
@@ -1336,7 +1336,6 @@ WebInspector.FlameChart.prototype = {
var groupOffsets = this._groupOffsets;
var lastGroupOffset = Array.prototype.peekLast.call(groupOffsets);
- var firstVisibleGroup = Math.max(groupOffsets.upperBound(top) - 1, 0);
var colorUsage = WebInspector.ThemeSupport.ColorUsage;
context.save();
@@ -1463,7 +1462,7 @@ WebInspector.FlameChart.prototype = {
{
/** @type !Array<{nestingLevel: number, visible: boolean}> */
var groupStack = [{nestingLevel: -1, visible: true}];
- for (var i = firstVisibleGroup; i < groups.length; ++i) {
+ for (var i = 0; i < groups.length; ++i) {
var groupTop = groupOffsets[i];
var group = groups[i];
if (groupTop - group.style.padding > top + height)
@@ -1476,7 +1475,7 @@ WebInspector.FlameChart.prototype = {
var parentGroupVisible = groupStack.peekLast().visible;
var thisGroupVisible = parentGroupVisible && (!group.style.collapsible || group.expanded);
groupStack.push({nestingLevel: group.style.nestingLevel, visible: thisGroupVisible});
- if (!parentGroupVisible)
+ if (!parentGroupVisible || groupTop + group.style.height < top)
continue;
callback(groupTop, i, group, firstGroup);
}
« 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