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

Commit 0ed2bb5e authored by Shimeng (Simon) Wang's avatar Shimeng (Simon) Wang
Browse files

Set the scale to be at least overview zoom scale.

This happens when screen is rotated.  Also removed a not-needed calculation.

issue: 2919307
Change-Id: If24ccb45a488aa8f00fead09206bfbe1799ebcb2
parent 8902abb7
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -727,7 +727,8 @@ 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.
                refreshZoomScale(mUpdateTextWrap);
                setZoomScale(Math.max(mActualScale, getZoomOverviewScale()),
                    mUpdateTextWrap, true);
                // update the zoom buttons as the scale can be changed
                updateZoomPicker();
            }
@@ -787,8 +788,6 @@ class ZoomManager {
                && Math.abs((viewWidth * mInvActualScale) - mZoomOverviewWidth) > 1))) {
            mInitialZoomOverview = false;
            setZoomScale(zoomOverviewScale, !willScaleTriggerZoom(mTextWrapScale));
        } else {
            mInZoomOverview = !exceedsMinScaleIncrement(mActualScale, zoomOverviewScale);
        }
    }