author | Botond Ballo <botond@mozilla.com> |
Wed, 04 Apr 2018 16:29:57 -0400 | |
changeset 411753 | 2dc5471ebd4a119941db86cbec9ed7d413b9a851 |
parent 411752 | 16bec207dc418bac3bef71ae5c15ade76032d6e0 |
child 411754 | b8847ae94ccf9e30af925ac10054c3416a1db9ed |
push id | 33770 |
push user | nerli@mozilla.com |
push date | Thu, 05 Apr 2018 10:01:08 +0000 |
treeherder | mozilla-central@65e0fefdab51 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | kats |
bugs | 1450099 |
milestone | 61.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -956,35 +956,36 @@ nsEventStatus AsyncPanZoomController::Ha if (!gfxPrefs::APZDragEnabled()) { return nsEventStatus_eIgnore; } if (!GetApzcTreeManager()) { return nsEventStatus_eConsumeNoDefault; } - if (aEvent.mType == MouseInput::MouseType::MOUSE_DOWN) { - SetState(SCROLLBAR_DRAG); - } - if (aEvent.mType == MouseInput::MouseType::MOUSE_UP) { SetState(NOTHING); ScrollSnap(); - } - - if (aEvent.mType != MouseInput::MouseType::MOUSE_MOVE) { return nsEventStatus_eConsumeNoDefault; } RefPtr<HitTestingTreeNode> node = GetApzcTreeManager()->FindScrollThumbNode(aDragMetrics); if (!node) { return nsEventStatus_eConsumeNoDefault; } + if (aEvent.mType == MouseInput::MouseType::MOUSE_DOWN) { + SetState(SCROLLBAR_DRAG); + } + + if (aEvent.mType != MouseInput::MouseType::MOUSE_MOVE) { + return nsEventStatus_eConsumeNoDefault; + } + const ScrollThumbData& thumbData = node->GetScrollThumbData(); MOZ_ASSERT(thumbData.mDirection.isSome()); ScrollDirection direction = *thumbData.mDirection; bool isMouseAwayFromThumb = false; if (int snapMultiplier = gfxPrefs::SliderSnapMultiplier()) { // It's fine to ignore the async component of the thumb's transform, // because any async transform of the thumb will be in the direction of