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

Commit 1c1e6df0 authored by John Reck's avatar John Reck
Browse files

Don't resend WEBKIT_DRAW if paused

 Bug: 4606210
 If a WEBKIT_DRAW message came in after the WebView was paused,
 it would fail to draw causing it to re-send the WEBKIT_DRAW message
 which would lead to an infinite loop until the WebView is resumed.
 Fix this by not re-sending the WEBKIT_DRAW message if webview is paused.

Change-Id: I3dd946e4e948cf3fd6af07ba6f7fdac2f967a631
parent e0ac113b
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2000,8 +2000,12 @@ public final class WebViewCore {
        if (DebugFlags.WEB_VIEW_CORE) Log.v(LOGTAG, "webkitDraw start");
        draw.mBaseLayer = nativeRecordContent(draw.mInvalRegion, draw.mContentSize);
        if (draw.mBaseLayer == 0) {
            if (mWebView != null && !mWebView.isPaused()) {
                if (DebugFlags.WEB_VIEW_CORE) Log.v(LOGTAG, "webkitDraw abort, resending draw message");
                mEventHub.sendMessage(Message.obtain(null, EventHub.WEBKIT_DRAW));
            } else {
                if (DebugFlags.WEB_VIEW_CORE) Log.v(LOGTAG, "webkitDraw abort, webview paused");
            }
            return;
        }
        webkitDraw(draw);