зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
4525952bde
Коммит
d9fa524033
|
@ -4992,7 +4992,7 @@ bool AsyncPanZoomController::HasReadyTouchBlock() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AsyncPanZoomController::CanHandleScrollOffsetUpdate(PanZoomState aState) {
|
bool AsyncPanZoomController::CanHandleScrollOffsetUpdate(PanZoomState aState) {
|
||||||
return aState == PAN_MOMENTUM;
|
return aState == PAN_MOMENTUM || IsPanningState(aState);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsyncPanZoomController::SetState(PanZoomState aNewState) {
|
void AsyncPanZoomController::SetState(PanZoomState aNewState) {
|
||||||
|
@ -5061,9 +5061,13 @@ bool AsyncPanZoomController::IsTransformingState(PanZoomState aState) {
|
||||||
return !(aState == NOTHING || aState == TOUCHING);
|
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 {
|
bool AsyncPanZoomController::IsInPanningState() const {
|
||||||
return (mState == PANNING || mState == PANNING_LOCKED_X ||
|
return IsPanningState(mState);
|
||||||
mState == PANNING_LOCKED_Y);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AsyncPanZoomController::UpdateZoomConstraints(
|
void AsyncPanZoomController::UpdateZoomConstraints(
|
||||||
|
|
|
@ -1229,6 +1229,8 @@ class AsyncPanZoomController {
|
||||||
// held whenever this is updated. In practice though... see bug 897017.
|
// held whenever this is updated. In practice though... see bug 897017.
|
||||||
PanZoomState mState;
|
PanZoomState mState;
|
||||||
|
|
||||||
|
static bool IsPanningState(PanZoomState aState);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns whether the specified PanZoomState does not need to be reset when
|
* Returns whether the specified PanZoomState does not need to be reset when
|
||||||
* a scroll offset update is processed.
|
* a scroll offset update is processed.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче