summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-03-01 12:25:29 -0800
committerGrace Kloba <klobag@google.com>2010-03-01 12:25:29 -0800
commitb3d0cc5ca99753c7aae3c04a5d7b607ce0aeabbb (patch)
treee4573b5969a21e653b55ea5b17113848868335fa
parent5e747dd60247cfad552961a0b521b5bb7d2305db (diff)
downloadframeworks_base-b3d0cc5ca99753c7aae3c04a5d7b607ce0aeabbb.zip
frameworks_base-b3d0cc5ca99753c7aae3c04a5d7b607ce0aeabbb.tar.gz
frameworks_base-b3d0cc5ca99753c7aae3c04a5d7b607ce0aeabbb.tar.bz2
If zoom scale is set to minimum, treat it as in overview
mode. When view size changed, we will adjust scale factor, which should update the zoom button states afterwards. http://b/issue?id=2477282
-rw-r--r--core/java/android/webkit/WebView.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 897bd75..17f18f7 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -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();
+ }
}
}
}