Bug 1713715. Redirect double tap gestures to the root content apzc. r=botond

This means that double tapping on an oop iframe "works" in that we don't try (and fail) to zoom the oop iframe. But it also means it is impossible to zoom to some content inside that oop iframe. Instead the best we can do is zoom to the oop iframe itself. This is consistent with what Chrome and Safari currently do. Allowing zooming to content inside an oop iframe would be decently complicated and it doesn't seem worth it. Bug 1715179 is on file for this.

Differential Revision: https://phabricator.services.mozilla.com/D116925
This commit is contained in:
Timothy Nikkel 2021-06-17 21:19:45 +00:00
Родитель 6205a49f78
Коммит e6543e4998
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -1201,6 +1201,23 @@ nsEventStatus AsyncPanZoomController::HandleGestureEvent(
rv = OnSingleTapConfirmed(tapGestureInput);
break;
case TapGestureInput::TAPGESTURE_DOUBLE:
// This means that double tapping on an oop iframe "works" in that we
// don't try (and fail) to zoom the oop iframe. But it also means it
// is impossible to zoom to some content inside that oop iframe.
// Instead the best we can do is zoom to the oop iframe itself. This
// is consistent with what Chrome and Safari currently do. Allowing
// zooming to content inside an oop iframe would be decently
// complicated and it doesn't seem worth it. Bug 1715179 is on file
// for this.
if (!IsRootContent()) {
if (APZCTreeManager* treeManagerLocal = GetApzcTreeManager()) {
if (RefPtr<AsyncPanZoomController> root =
treeManagerLocal->FindZoomableApzc(this)) {
rv = root->OnDoubleTap(tapGestureInput);
}
}
break;
}
rv = OnDoubleTap(tapGestureInput);
break;
case TapGestureInput::TAPGESTURE_SECOND: