Chromium Code Reviews| 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; |