Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 98fdda09 authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change I86773fbb into eclair-mr2

* changes:
  If overview width is the same as the current width, don't change the mode when double tap or zoom out.
parents 57534f1b 86773fbb
Loading
Loading
Loading
Loading
+12 −4
Original line number Diff line number Diff line
@@ -4682,7 +4682,9 @@ public class WebView extends AbsoluteLayout
        switchOutDrawHistory();
        float scale = mActualScale * 0.8f;
        if (scale < (mMinZoomScale + 0.1f)
                && mWebViewCore.getSettings().getUseWideViewPort()) {
                && mWebViewCore.getSettings().getUseWideViewPort()
                && mZoomOverviewWidth > Math.ceil(getViewWidth()
                        * mInvActualScale)) {
            // when zoom out to min scale, switch to overview mode
            doDoubleTap();
            return true;
@@ -4829,9 +4831,15 @@ public class WebView extends AbsoluteLayout
        }
        settings.setDoubleTapToastCount(0);
        if (mInZoomOverview) {
            float newScale = (float) getViewWidth() / mZoomOverviewWidth;
            if (Math.abs(mActualScale - newScale) < 0.01f) {
                // reset mInZoomOverview to false if scale doesn't change
                mInZoomOverview = false;
            } else {
                // Force the titlebar fully reveal in overview mode
                if (mScrollY < getTitleHeight()) mScrollY = 0;
            zoomWithPreview((float) getViewWidth() / mZoomOverviewWidth);
                zoomWithPreview(newScale);
            }
        } else {
            // mLastTouchX and mLastTouchY are the point in the current viewport
            int contentX = viewToContentX((int) mLastTouchX + mScrollX);