diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp index c46a16068493..1cc9662da1f9 100644 --- a/dom/ipc/TabChild.cpp +++ b/dom/ipc/TabChild.cpp @@ -1880,7 +1880,7 @@ TabChild::RecvMouseWheelEvent(const WidgetWheelEvent& aEvent, event.widget = mPuppetWidget; APZCCallbackHelper::DispatchWidgetEvent(event); - if (AsyncPanZoomEnabled()) { + if (aEvent.mFlags.mHandledByAPZ) { mAPZEventState->ProcessWheelEvent(event, aGuid, aInputBlockId); } return true; diff --git a/widget/nsBaseWidget.cpp b/widget/nsBaseWidget.cpp index 1b1b06ff2564..95b559757d5a 100644 --- a/widget/nsBaseWidget.cpp +++ b/widget/nsBaseWidget.cpp @@ -1002,9 +1002,11 @@ nsBaseWidget::ProcessUntransformedAPZEvent(WidgetInputEvent* aEvent, } mAPZEventState->ProcessTouchEvent(*touchEvent, aGuid, aInputBlockId, aApzResponse); } else if (WidgetWheelEvent* wheelEvent = aEvent->AsWheelEvent()) { - APZCCallbackHelper::SendSetTargetAPZCNotification(this, GetDocument(), *aEvent, - aGuid, aInputBlockId); - mAPZEventState->ProcessWheelEvent(*wheelEvent, aGuid, aInputBlockId); + if (wheelEvent->mFlags.mHandledByAPZ) { + APZCCallbackHelper::SendSetTargetAPZCNotification(this, GetDocument(), *aEvent, + aGuid, aInputBlockId); + mAPZEventState->ProcessWheelEvent(*wheelEvent, aGuid, aInputBlockId); + } } }