mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
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:
parent
7ddf2841a0
commit
1007edc182
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user