diff options
author | caseq <caseq@chromium.org> | 2016-03-18 21:18:00 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-19 04:42:08 +0000 |
commit | 7db9ea7c5e05f1d82c6389eb7c9c23f17548c967 (patch) | |
tree | 09ef118c89fae02bff58333fb5065f26c23f1ce5 | |
parent | d86ba6387ff81e4cdfd6a90870431077f497213c (diff) | |
download | chromium_src-7db9ea7c5e05f1d82c6389eb7c9c23f17548c967.zip chromium_src-7db9ea7c5e05f1d82c6389eb7c9c23f17548c967.tar.gz chromium_src-7db9ea7c5e05f1d82c6389eb7c9c23f17548c967.tar.bz2 |
Timeline: fix overlapping group headers in Flame Chart
This fixes a corner case of group header rendering where
we've computed group visibility wrong due to starting from
non-top level group because of clipping. This patch
simplifies logic to always traverse through all groups.
BUG=595973
Review URL: https://codereview.chromium.org/1813813005
Cr-Commit-Position: refs/heads/master@{#382178}
-rw-r--r-- | third_party/WebKit/Source/devtools/front_end/ui_lazy/FlameChart.js | 5 |
1 files changed, 2 insertions, 3 deletions
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 7fcde25..096d801 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); } |