Bug 1324581 - call ScrollSnap() in AsyncPanZoomController when drag ends r=botond
MozReview-Commit-ID: LpZ2PbL0FoF
--- a/gfx/layers/apz/src/AsyncPanZoomController.cpp
+++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp
@@ -893,16 +893,20 @@ nsEventStatus AsyncPanZoomController::Ha
if (!gfxPrefs::APZDragEnabled()) {
return nsEventStatus_eIgnore;
}
if (!GetApzcTreeManager()) {
return nsEventStatus_eConsumeNoDefault;
}
+ if (aEvent.mType == MouseInput::MouseType::MOUSE_UP) {
+ ScrollSnap();
+ }
+
if (aEvent.mType != MouseInput::MouseType::MOUSE_MOVE) {
return nsEventStatus_eConsumeNoDefault;
}
RefPtr<HitTestingTreeNode> node =
GetApzcTreeManager()->FindScrollNode(aDragMetrics);
if (!node) {
return nsEventStatus_eConsumeNoDefault;