don't center zoom on size change if zoom is in progress

The onSizeChange code is called when the device is rotated and
when the title bar is hidden. In the latter case, it is in response
to the zooming transition from overview mode to reading mode, and
the zoom center should not be recomputed.

http://b/issue?id=2060720
This commit is contained in:
Cary Clark
2009-08-24 14:08:43 -04:00
parent 8a2000df6d
commit a91874d1f9

View File

@@ -3674,8 +3674,10 @@ public class WebView extends AbsoluteLayout
protected void onSizeChanged(int w, int h, int ow, int oh) {
super.onSizeChanged(w, h, ow, oh);
// Center zooming to the center of the screen.
mZoomCenterX = getViewWidth() * .5f;
mZoomCenterY = getViewHeight() * .5f;
if (mZoomScale == 0) { // unless we're already zooming
mZoomCenterX = getViewWidth() * .5f;
mZoomCenterY = getViewHeight() * .5f;
}
// update mMinZoomScale if the minimum zoom scale is not fixed
if (!mMinZoomScaleFixed) {