зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1043689 - Cancel state in the GEL when processing a cancelled touch block. r=botond
This commit is contained in:
Родитель
3b75e664d7
Коммит
a1aac133a1
|
@ -2627,6 +2627,12 @@ AsyncPanZoomController::ProcessPendingInputBlocks() {
|
|||
if (curBlock->IsDefaultPrevented()) {
|
||||
SetState(NOTHING);
|
||||
curBlock->DropEvents();
|
||||
// Also clear the state in the gesture event listener
|
||||
nsRefPtr<GestureEventListener> listener = GetGestureEventListener();
|
||||
if (listener) {
|
||||
MultiTouchInput cancel(MultiTouchInput::MULTITOUCH_CANCEL, 0, TimeStamp::Now(), 0);
|
||||
listener->HandleInputEvent(cancel);
|
||||
}
|
||||
} else {
|
||||
while (curBlock->HasEvents()) {
|
||||
HandleInputEvent(curBlock->RemoveFirstEvent());
|
||||
|
|
|
@ -388,6 +388,8 @@ nsEventStatus GestureEventListener::HandleInputTouchCancel()
|
|||
|
||||
void GestureEventListener::HandleInputTimeoutLongTap()
|
||||
{
|
||||
GEL_LOG("Running long-tap timeout task in state %d\n", mState);
|
||||
|
||||
mLongTapTimeoutTask = nullptr;
|
||||
|
||||
switch (mState) {
|
||||
|
@ -414,6 +416,8 @@ void GestureEventListener::HandleInputTimeoutLongTap()
|
|||
|
||||
void GestureEventListener::HandleInputTimeoutMaxTap()
|
||||
{
|
||||
GEL_LOG("Running max-tap timeout task in state %d\n", mState);
|
||||
|
||||
mMaxTapTimeoutTask = nullptr;
|
||||
|
||||
if (mState == GESTURE_FIRST_SINGLE_TOUCH_DOWN) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче