Bug 1256344 - If a long-press is interrupted by a non-touch block, don't dispatch the long-press event. r=botond

MozReview-Commit-ID: 7SqA1nIlJYz
This commit is contained in:
Kartikaya Gupta 2016-03-16 17:58:37 -04:00
parent 085bd0c97f
commit 4317d4d96b

View File

@ -2040,7 +2040,12 @@ nsEventStatus AsyncPanZoomController::OnLongPress(const TapGestureInput& aEvent)
if (controller) {
CSSPoint geckoScreenPoint;
if (ConvertToGecko(aEvent.mPoint, &geckoScreenPoint)) {
if (CurrentTouchBlock()->IsDuringFastFling()) {
CancelableBlockState* block = CurrentInputBlock();
if (!block->AsTouchBlock()) {
APZC_LOG("%p dropping long-press because some non-touch block interrupted it\n", this);
return nsEventStatus_eIgnore;
}
if (block->AsTouchBlock()->IsDuringFastFling()) {
APZC_LOG("%p dropping long-press because of fast fling\n", this);
return nsEventStatus_eIgnore;
}