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

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

Issue 2784843003: DevTools: Make sure a entry of flamechart is visible after reveal (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 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/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 8b3e8916550bbd11fdf63fdb7b34b30bad3ff3e3..43472079ae710f764aecf10140327394627fee37 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
@@ -213,6 +213,9 @@ PerfUI.FlameChart = class extends PerfUI.ChartViewport {
var y = this._levelToHeight(timelineData.entryLevels[entryIndex]);
this.setScrollOffset(y, this._barHeight);
+ var minVisibleWidthPx = 30;
+ var futurePixelToTime = (timeRight - timeLeft) / this._offsetWidth;
+ minEntryTimeWindow = Math.max(minEntryTimeWindow, futurePixelToTime * minVisibleWidthPx);
if (timeLeft > entryEndTime) {
var delta = timeLeft - entryEndTime + minEntryTimeWindow;
this._flameChartDelegate.requestWindowTimes(timeLeft - delta, timeRight - delta);
« 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