Keep overview mode when screen is rotated.

issue: 3385613
Change-Id: I49ba8dbdfe72adb1df5e453d7c95ec107e0d3e75
This commit is contained in:
Shimeng (Simon) Wang
2011-02-15 11:14:57 -08:00
parent 13271b4118
commit a5b3d807a1

View File

@@ -805,8 +805,11 @@ class ZoomManager {
if (mWebView.getWebViewCore() != null) {
// we always force, in case our height changed, in which case we
// still want to send the notification over to webkit.
setZoomScale(Math.max(mActualScale, getZoomOverviewScale()),
mUpdateTextWrap, true);
// Keep overview mode unchanged when rotating.
final float zoomOverviewScale = getZoomOverviewScale();
final float newScale = (mInZoomOverview) ?
zoomOverviewScale : Math.max(mActualScale, zoomOverviewScale);
setZoomScale(newScale, mUpdateTextWrap, true);
// update the zoom buttons as the scale can be changed
updateZoomPicker();
}