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

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

Make sure the returned web view width is at least 0.

This will fix issue 3241963; since in WebViewCore.java there's a way
to deal with a 0-width view, but not with negative width.

issue: 3241963
Change-Id: I177bee48e53ba5108889bc2c06aebffbc6cb44c6
parent 988f3823
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1243,7 +1243,7 @@ public class WebView extends AbsoluteLayout
        if (!isVerticalScrollBarEnabled() || mOverlayVerticalScrollbar) {
            return getWidth();
        } else {
            return getWidth() - getVerticalScrollbarWidth();
            return Math.max(0, getWidth() - getVerticalScrollbarWidth());
        }
    }