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

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

Use default scale when restored scale is 0.

issue: 4975315
Change-Id: I47aa09605bb245cd271932d59d4d334f1e1b732f
parent 9af04ac6
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2471,9 +2471,10 @@ public final class WebViewCore {
    // called by JNI
    private void restoreScale(float scale, float textWrapScale) {
        if (mBrowserFrame.firstLayoutDone() == false) {
            mRestoredScale = scale;
            final float defaultScale = mWebView.getDefaultZoomScale();
            mRestoredScale = (scale <= 0.0) ? defaultScale : scale;
            if (mSettings.getUseWideViewPort()) {
                mRestoredTextWrapScale = textWrapScale;
                mRestoredTextWrapScale = (textWrapScale <= 0.0) ? defaultScale : textWrapScale;
            }
        }
    }