Skip to content

Commit ca835db

Browse files
committed
Workaround issue of getting 0,0,0,0 inval rects
Bug: 6142700 WebKit is sending an empty inval rect for some reason, which results in WebView not being invalidated. Assume an empty inval means a full inval Change-Id: Ib93b806f8f8fd2039e2a0e43de2372c3e6be2433
1 parent 6af84f6 commit ca835db

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

core/java/android/webkit/WebViewClassic.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8679,7 +8679,12 @@ void setNewPicture(final WebViewCore.DrawData draw, boolean updateBaseLayer) {
86798679
Log.v(LOGTAG, "NEW_PICTURE_MSG_ID {" +
86808680
b.left+","+b.top+","+b.right+","+b.bottom+"}");
86818681
}
8682-
invalidateContentRect(draw.mInvalRegion.getBounds());
8682+
Rect invalBounds = draw.mInvalRegion.getBounds();
8683+
if (!invalBounds.isEmpty()) {
8684+
invalidateContentRect(invalBounds);
8685+
} else {
8686+
mWebView.invalidate();
8687+
}
86838688

86848689
if (mPictureListener != null) {
86858690
mPictureListener.onNewPicture(getWebView(), capturePicture());

0 commit comments

Comments
 (0)