Bug 1164557 - Do not start an overscroll animation if one is already running. r=kats

This commit is contained in:
Botond Ballo 2015-05-13 15:47:24 -04:00
parent f02aa0dc4a
commit 2169e50684

View File

@ -2448,7 +2448,9 @@ void AsyncPanZoomController::FlushRepaintForNewInputBlock() {
bool AsyncPanZoomController::SnapBackIfOverscrolled() {
ReentrantMonitorAutoEnter lock(mMonitor);
if (IsOverscrolled()) {
// It's possible that we're already in the middle of an overscroll
// animation - if so, don't start a new one.
if (IsOverscrolled() && mState != OVERSCROLL_ANIMATION) {
APZC_LOG("%p is overscrolled, starting snap-back\n", this);
StartOverscrollAnimation(ParentLayerPoint(0, 0));
return true;