diff options
| author | 2011-02-17 17:47:15 -0800 | |
|---|---|---|
| committer | 2011-02-17 17:47:15 -0800 | |
| commit | 88196e38edb10fc4daf0715e1545d49a39527a23 (patch) | |
| tree | 007d32ae7861c753534bde0de487ce08580ab20e | |
| parent | e1590884f2e54848bac2e80ee1754be9b7e6e48d (diff) | |
| parent | 459c42395648193bb13ed8a4bcf5c58af9cac3c5 (diff) | |
Merge "Reset initial zoom overview state when user takes zoom action."
| -rw-r--r-- | core/java/android/webkit/ZoomManager.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/webkit/ZoomManager.java b/core/java/android/webkit/ZoomManager.java index 9d472e02ae46..d7a6a537284e 100644 --- a/core/java/android/webkit/ZoomManager.java +++ b/core/java/android/webkit/ZoomManager.java @@ -361,6 +361,7 @@ class ZoomManager { // returns TRUE if zoom out succeeds and FALSE if no zoom changes. private boolean zoom(float zoomMultiplier) { + mInitialZoomOverview = false; // TODO: alternatively we can disallow this during draw history mode mWebView.switchOutDrawHistory(); // Center zooming to the center of the screen. @@ -378,6 +379,7 @@ class ZoomManager { * @return true if the new scale triggered an animation and false otherwise. */ public boolean startZoomAnimation(float scale, boolean reflowText) { + mInitialZoomOverview = false; float oldScale = mActualScale; mInitialScrollX = mWebView.getScrollX(); mInitialScrollY = mWebView.getScrollY(); @@ -421,6 +423,7 @@ class ZoomManager { * in progress by calling isFixedLengthAnimationInProgress(). */ public void animateZoom(Canvas canvas) { + mInitialZoomOverview = false; if (mZoomScale == 0) { Log.w(LOGTAG, "A WebView is attempting to perform a fixed length " + "zoom animation when no zoom is in progress"); @@ -568,6 +571,8 @@ class ZoomManager { * C. If the page is in overmode then change to the default scale. */ public void handleDoubleTap(float lastTouchX, float lastTouchY) { + // User takes action, set initial zoom overview to false. + mInitialZoomOverview = false; WebSettings settings = mWebView.getSettings(); if (!isDoubleTapEnabled()) { return; @@ -706,6 +711,7 @@ class ZoomManager { private class ScaleDetectorListener implements ScaleGestureDetector.OnScaleGestureListener { public boolean onScaleBegin(ScaleGestureDetector detector) { + mInitialZoomOverview = false; dismissZoomPicker(); mWebView.mViewManager.startZoom(); mWebView.onPinchToZoomAnimationStart(); |