Skip to content

Commit 628e234

Browse files
jreckAndroid (Google) Code Review
authored andcommitted
Merge "Workaround issue of getting 0,0,0,0 inval rects"
2 parents f82b111 + ca835db commit 628e234

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)