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

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

Issue 2438873002: DevTools: Fix scrolling of timeline flamechart (Closed)
Patch Set: Created 4 years, 2 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/ChartViewport.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/ChartViewport.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/ChartViewport.js
index 2d8ad8a6d591daaf261b96889c47b36d33e1f31b..270ce48458f42e2a99c951edd6f85720119877ee 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/ChartViewport.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/ChartViewport.js
@@ -13,8 +13,10 @@ WebInspector.ChartViewport = function()
this.contentElement.addEventListener("mousewheel", this._onMouseWheel.bind(this), false);
this.contentElement.addEventListener("keydown", this._handleZoomPanKeys.bind(this), false);
- WebInspector.installInertialDragHandle(this.contentElement, this._startDragging.bind(this), this._dragging.bind(this), this._endDragging.bind(this), "-webkit-grabbing", null);
- WebInspector.installDragHandle(this.contentElement, this._startRangeSelection.bind(this), this._rangeSelectionDragging.bind(this), this._endRangeSelection.bind(this), "text", null);
+ /** @private */
caseq 2016/10/20 21:33:51 let's not use it on all privates. perhaps rather f
alph 2016/10/20 22:59:37 Done.
+ this._dragContainer = this.contentElement.createChild("div", "fill");
caseq 2016/10/20 21:33:51 I don't think this is good approach.
alph 2016/10/20 22:59:38 I'd really appreciate if you can suggest anything
+ WebInspector.installInertialDragHandle(this._dragContainer, this._startDragging.bind(this), this._dragging.bind(this), this._endDragging.bind(this), "-webkit-grabbing", null);
+ WebInspector.installDragHandle(this._dragContainer, this._startRangeSelection.bind(this), this._rangeSelectionDragging.bind(this), this._endRangeSelection.bind(this), "text", null);
/** @private */
this._vScrollElement = this.contentElement.createChild("div", "flame-chart-v-scroll");
@@ -53,10 +55,10 @@ WebInspector.ChartViewport.prototype = {
_updateScrollBar: function()
{
var showScroll = this._totalHeight > this._offsetHeight;
- if (this._vScrollElement.classList.contains("hidden") === showScroll) {
- this._vScrollElement.classList.toggle("hidden", !showScroll);
- this._updateContentElementSize();
- }
+ if (this._vScrollElement.classList.contains("hidden") !== showScroll)
+ return;
+ this._vScrollElement.classList.toggle("hidden", !showScroll);
+ this._updateContentElementSize();
},
/**
@@ -79,8 +81,6 @@ WebInspector.ChartViewport.prototype = {
/** @private */
this._rangeSelectionEnd = 0;
/** @private */
- this._scrollTop = 0;
- /** @private */
this._isDragging = false;
/** @private */
this._dragStartPointX = 0;
« 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