mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-18 14:56:07 +00:00
Bug 732564 - Back out part of e48d0ef50574 (bug 728614) as we need to clamp the viewport when animations are aborted. r=Cwiiis
This commit is contained in:
parent
676a95e99e
commit
9fe09db32f
@ -217,10 +217,22 @@ public class PanZoomController
|
||||
// if that's the case, abort any animation in progress and re-zoom so that the page
|
||||
// snaps to edges. for other cases (where the user's finger(s) are down) don't do
|
||||
// anything special.
|
||||
if (mState == PanZoomState.FLING) {
|
||||
switch (mState) {
|
||||
case FLING:
|
||||
mX.stopFling();
|
||||
mY.stopFling();
|
||||
mState = PanZoomState.NOTHING;
|
||||
// fall through
|
||||
case ANIMATED_ZOOM:
|
||||
// the zoom that's in progress likely makes no sense any more (such as if
|
||||
// the screen orientation changed) so abort it
|
||||
// fall through
|
||||
case NOTHING:
|
||||
// Don't do animations here; they're distracting and can cause flashes on page
|
||||
// transitions.
|
||||
mController.setViewportMetrics(getValidViewportMetrics());
|
||||
mController.notifyLayerClientOfGeometryChange();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user