Bug 1592435 - Don't allow a main thread scroll update to interrupt a touch-drag gesture. r=tnikkel

This makes the behaviour for touch-drags match the behaviour we already have
for pan gesture events.

Depends on D51201

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Botond Ballo 2019-10-31 01:06:14 +00:00
Родитель 4525952bde
Коммит d9fa524033
2 изменённых файлов: 9 добавлений и 3 удалений

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

@ -4992,7 +4992,7 @@ bool AsyncPanZoomController::HasReadyTouchBlock() const {
}
bool AsyncPanZoomController::CanHandleScrollOffsetUpdate(PanZoomState aState) {
return aState == PAN_MOMENTUM;
return aState == PAN_MOMENTUM || IsPanningState(aState);
}
void AsyncPanZoomController::SetState(PanZoomState aNewState) {
@ -5061,9 +5061,13 @@ bool AsyncPanZoomController::IsTransformingState(PanZoomState aState) {
return !(aState == NOTHING || aState == TOUCHING);
}
bool AsyncPanZoomController::IsPanningState(PanZoomState aState) {
return (aState == PANNING || aState == PANNING_LOCKED_X ||
aState == PANNING_LOCKED_Y);
}
bool AsyncPanZoomController::IsInPanningState() const {
return (mState == PANNING || mState == PANNING_LOCKED_X ||
mState == PANNING_LOCKED_Y);
return IsPanningState(mState);
}
void AsyncPanZoomController::UpdateZoomConstraints(

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

@ -1229,6 +1229,8 @@ class AsyncPanZoomController {
// held whenever this is updated. In practice though... see bug 897017.
PanZoomState mState;
static bool IsPanningState(PanZoomState aState);
/**
* Returns whether the specified PanZoomState does not need to be reset when
* a scroll offset update is processed.