Clear the WebView picture when a new load starts.

Clear the old picture set when we have confirmed a new
page load.

Bug: 5701197
Change-Id: Id96fb7d8e75a0b54a448d35239a69ba1774cffae
This commit is contained in:
Ben Murdoch
2011-12-05 14:51:00 +00:00
parent b808af7daf
commit a62b9632c8
2 changed files with 9 additions and 1 deletions

View File

@@ -410,6 +410,7 @@ class BrowserFrame extends Handler {
mCommitted = false;
// remove pending draw to block update until mFirstLayoutDone is
// set to true in didFirstLayout()
mWebViewCore.clearContent();
mWebViewCore.removeMessages(WebViewCore.EventHub.WEBKIT_DRAW);
}
}

View File

@@ -497,6 +497,13 @@ public final class WebViewCore {
message.sendToTarget();
}
/**
* Clear the picture set. To be called only on the WebCore thread.
*/
/* package */ void clearContent() {
nativeClearContent();
}
//-------------------------------------------------------------------------
// JNI methods
//-------------------------------------------------------------------------
@@ -1560,7 +1567,7 @@ public final class WebViewCore {
// Clear the view so that onDraw() will draw nothing
// but white background
// (See public method WebView.clearView)
nativeClearContent();
clearContent();
break;
case MESSAGE_RELAY: