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

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

Ignore zoom overwidth updating when contentsize is not set.

This happens in case of layer's webkit draw time.

issue:3194817
Change-Id: I58c393d7553e279ccd4b4ee755e2da205faa069b
parent 45c7af97
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -813,7 +813,9 @@ class ZoomManager {
                setZoomOverviewWidth(Math.min(WebView.sMaxViewportWidth,
                    Math.max((int) (viewWidth * mInvDefaultScale),
                            Math.max(drawData.mMinPrefWidth, drawData.mViewSize.x))));
            } else {
            } else if (drawData.mContentSize.x > 0) {
                // The webkitDraw for layers will not populate contentSize, and it'll be
                // ignored for zoom overview width update.
                final int contentWidth = Math.max(drawData.mContentSize.x, drawData.mMinPrefWidth);
                final int newZoomOverviewWidth = Math.min(WebView.sMaxViewportWidth, contentWidth);
                if (newZoomOverviewWidth != mZoomOverviewWidth) {