Bug 728614 - Fix the zoom level when the device rotates on pages with <meta viewport> information; r=kats

This commit is contained in:
Ehsan Akhgari
2012-02-22 13:13:16 -05:00
parent e85f074938
commit c064c47c5d
2 changed files with 10 additions and 14 deletions

View File

@@ -217,22 +217,10 @@ 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.
switch (mState) {
case FLING:
if (mState == PanZoomState.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;
}
}