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

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

Issue 2005563002: DevTools: Make sure flamechart vertical scroll stays within the height of contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 1449cd2e4701396a4d993c1f982f633ec825caf8..0c4b74e267768dcf6833ff63a3be6e9f037c1837 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
@@ -1950,6 +1950,10 @@ WebInspector.FlameChart.prototype = {
{
this._totalHeight = this._levelToHeight(this._dataProvider.maxStackDepth());
this._vScrollContent.style.height = this._totalHeight + "px";
+ if (this._scrollTop + this._offsetHeight > this._totalHeight) {
+ this._scrollTop = Math.max(0, this._totalHeight - this._offsetHeight);
+ this._vScrollElement.scrollTop = this._scrollTop;
+ }
},
onResize: function()
« 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