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

Commit 0f7c903a authored by Shimeng (Simon) Wang's avatar Shimeng (Simon) Wang Committed by Android (Google) Code Review
Browse files

Merge "Fit to screen for the first new picture with enough different width."

parents ef12256c 7c6aaf06
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -867,12 +867,15 @@ class ZoomManager {
        if (!mMinZoomScaleFixed) {
            mMinZoomScale = newZoomOverviewScale;
        }
        // fit the content width to the current view. Ignore the rounding error case.
        if (!mWebView.drawHistory() && (mInitialZoomOverview || (mInZoomOverview
                && Math.abs((viewWidth * mInvActualScale) - mZoomOverviewWidth) > 1))) {
        // fit the content width to the current view for the first new picture
        // after first layout.
        boolean scaleHasDiff = exceedsMinScaleIncrement(newZoomOverviewScale, mActualScale);
        if (!mWebView.drawHistory() && mInitialZoomOverview && scaleHasDiff) {
            mInitialZoomOverview = false;
            setZoomScale(newZoomOverviewScale, !willScaleTriggerZoom(mTextWrapScale) &&
                !mWebView.getSettings().getUseFixedViewport());
        } else if (scaleHasDiff) {
            mInZoomOverview = false;
        }
    }