зеркало из https://github.com/mozilla/gecko-dev.git
Bug 700559 - Fix crash with overlapping fling events [r=pcwalton]
A crash occurs when a second fling is started while the first fling has a non-zero velocity but zero excess. This happens because the displacement could temporarily trigger an overscroll, but then since the new viewport is not saved, it reverts back to no overscroll. However, state variables have already been updated, leading to things being out of sync and triggering the crash. Adding a call to update the position fixes this. See bug for more details.
This commit is contained in:
Родитель
56dda18be1
Коммит
35dfb2181b
|
@ -250,6 +250,7 @@ public class PanZoomController
|
|||
mX.velocity = mY.velocity = 0.0f;
|
||||
|
||||
mX.displace(); mY.displace();
|
||||
updatePosition();
|
||||
|
||||
if (mFlingTimer != null)
|
||||
mFlingTimer.cancel();
|
||||
|
|
Загрузка…
Ссылка в новой задаче