Bug 1601527. In APZCTreeManager::ReceiveInputEvent for pinch gesture inputs adjust the target apzc to the root content. r=botond

Otherwise we hit this assert

https://searchfox.org/mozilla-central/rev/efdf9bb55789ea782ae3a431bda6be74a87b041e/gfx/layers/apz/src/AsyncPanZoomController.cpp#1209

The adjusting mentioned in that comment doesn't seem to happen on the path that macOS pinch gesture events use.

Differential Revision: https://phabricator.services.mozilla.com/D55917

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Timothy Nikkel 2019-12-07 03:19:07 +00:00
parent 7ddf2841a0
commit 1007edc182

View File

@ -1568,7 +1568,7 @@ APZEventResult APZCTreeManager::ReceiveInputEvent(InputData& aEvent) {
}
break;
}
case PINCHGESTURE_INPUT: { // note: no one currently sends these
case PINCHGESTURE_INPUT: {
PinchGestureInput& pinchInput = aEvent.AsPinchGestureInput();
HitTestResult hit = GetTargetAPZC(pinchInput.mFocusPoint);
aEvent.mLayersId = hit.mLayersId;
@ -1577,6 +1577,12 @@ APZEventResult APZCTreeManager::ReceiveInputEvent(InputData& aEvent) {
if (hit.mTargetApzc) {
MOZ_ASSERT(hitResult != CompositorHitTestInvisibleToHit);
if (!hit.mTargetApzc->IsRootContent()) {
hit.mTargetApzc = FindZoomableApzc(hit.mTargetApzc);
}
}
if (hit.mTargetApzc) {
ScreenToScreenMatrix4x4 outTransform =
GetScreenToApzcTransform(hit.mTargetApzc) *
GetApzcToGeckoTransform(hit.mTargetApzc);