Merge "If zoom scale is set to minimum, treat it as in overview mode."

This commit is contained in:
Grace Kloba
2010-03-01 13:06:58 -08:00
committed by Android (Google) Code Review

View File

@@ -2069,6 +2069,8 @@ public class WebView extends AbsoluteLayout
boolean force) {
if (scale < mMinZoomScale) {
scale = mMinZoomScale;
// set mInZoomOverview for non mobile sites
if (scale < mDefaultScale) mInZoomOverview = true;
} else if (scale > mMaxZoomScale) {
scale = mMaxZoomScale;
}
@@ -4017,6 +4019,10 @@ public class WebView extends AbsoluteLayout
// still want to send the notification over to webkit.
mWebView.setNewZoomScale(mWebView.mActualScale,
mUpdateTextWrap, true);
// update the zoom buttons as the scale can be changed
if (mWebView.getSettings().getBuiltInZoomControls()) {
mWebView.updateZoomButtonsEnabled();
}
}
}
}