bug 1362404 - Handle out-of-order overlapping event coalescing. r=masayuki

There are situations where events may be handled out-of-order. Allow
coalescing to happen backwards in time as well as forwards to cover them.

MozReview-Commit-ID: 3k7vNFxE1cz

--HG--
extra : rebase_source : 636a3671536747cf62cb410836b4c5a2275bbb49
This commit is contained in:
Chris H-C 2017-05-09 11:07:40 -04:00
Родитель f1037b986f
Коммит b465ec140b
1 изменённых файлов: 4 добавлений и 0 удалений

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

@ -8285,6 +8285,10 @@ PresShell::HandleEventInternal(WidgetEvent* aEvent,
lastMillis);
}
sLastInputCreated = aEvent->mTimeStamp;
} else if (aEvent->mTimeStamp < sLastInputCreated) {
// This event was created before the last input. May be processing out
// of order, so coalesce backwards, too.
sLastInputCreated = aEvent->mTimeStamp;
}
sLastInputProcessed = now;
}