diff --git a/gfx/layers/apz/src/AsyncPanZoomController.cpp b/gfx/layers/apz/src/AsyncPanZoomController.cpp index f7512aa223b1..eca1b2ed4180 100644 --- a/gfx/layers/apz/src/AsyncPanZoomController.cpp +++ b/gfx/layers/apz/src/AsyncPanZoomController.cpp @@ -1287,14 +1287,6 @@ nsEventStatus AsyncPanZoomController::OnScaleBegin(const PinchGestureInput& aEve nsEventStatus AsyncPanZoomController::OnScale(const PinchGestureInput& aEvent) { APZC_LOG("%p got a scale in state %d\n", this, mState); - // Only the root APZC is zoomable, and the root APZC is not allowed to have - // different x and y scales. If it did, the calculations in this function - // would have to be adjusted (as e.g. it would no longer be valid to take - // the minimum or maximum of the ratios of the widths and heights of the - // page rect and the composition bounds). - MOZ_ASSERT(mFrameMetrics.IsRootScrollable()); - MOZ_ASSERT(mFrameMetrics.GetZoom().AreScalesSame()); - if (HasReadyTouchBlock() && !CurrentTouchBlock()->TouchActionAllowsPinchZoom()) { return nsEventStatus_eIgnore; } @@ -1303,6 +1295,14 @@ nsEventStatus AsyncPanZoomController::OnScale(const PinchGestureInput& aEvent) { return nsEventStatus_eConsumeNoDefault; } + // Only the root APZC is zoomable, and the root APZC is not allowed to have + // different x and y scales. If it did, the calculations in this function + // would have to be adjusted (as e.g. it would no longer be valid to take + // the minimum or maximum of the ratios of the widths and heights of the + // page rect and the composition bounds). + MOZ_ASSERT(mFrameMetrics.IsRootScrollable()); + MOZ_ASSERT(mFrameMetrics.GetZoom().AreScalesSame()); + float prevSpan = aEvent.mPreviousSpan; if (fabsf(prevSpan) <= EPSILON || fabsf(aEvent.mCurrentSpan) <= EPSILON) { // We're still handling it; we've just decided to throw this event away.