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

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

Fix zoom overview width and postscale for non-wide-viewport mode.

issue: 4396010
Change-Id: I90aefac9fdf53834c0774d5c1b37693413798689
parent 03edf6b3
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -926,9 +926,12 @@ class ZoomManager {
                // we always force, in case our height changed, in which case we
                // still want to send the notification over to webkit.
                // Keep overview mode unchanged when rotating.
                float newScale = mActualScale;
                if (mWebView.getSettings().getUseWideViewPort()) {
                    final float zoomOverviewScale = getZoomOverviewScale();
                final float newScale = (mInZoomOverviewBeforeSizeChange) ?
                    newScale = (mInZoomOverviewBeforeSizeChange) ?
                        zoomOverviewScale : Math.max(mActualScale, zoomOverviewScale);
                }
                setZoomScale(newScale, mUpdateTextWrap, true);
                // update the zoom buttons as the scale can be changed
                updateZoomPicker();
@@ -1027,7 +1030,7 @@ class ZoomManager {
            }
        } else {
            // If not use wide viewport, use view width as the zoom overview width.
            newZoomOverviewWidth = viewWidth;
            newZoomOverviewWidth = Math.round(viewWidth / mDefaultScale);
        }
        if (newZoomOverviewWidth != mZoomOverviewWidth) {
            setZoomOverviewWidth(newZoomOverviewWidth);