diff options
-rw-r--r-- | Source/WebKit/android/jni/PictureSet.cpp | 4 | ||||
-rw-r--r-- | Source/WebKit/android/jni/WebCoreFrameBridge.cpp | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Source/WebKit/android/jni/PictureSet.cpp b/Source/WebKit/android/jni/PictureSet.cpp index d05f315..bf61c3e 100644 --- a/Source/WebKit/android/jni/PictureSet.cpp +++ b/Source/WebKit/android/jni/PictureSet.cpp @@ -298,11 +298,11 @@ void PictureSet::checkDimensions(int width, int height, SkRegion* inval) { if (mWidth == width && mHeight == height) return; - DBG_SET_LOGD("%p old:(w=%d,h=%d) new:(w=%d,h=%d)", this, + DBG_SET_LOGD("%p old:(w=%d,h=%d) new:(w=%d,h=%d)", this, mWidth, mHeight, width, height); if (mWidth == width && height > mHeight) { // only grew vertically SkIRect rect; - rect.set(0, mHeight, width, height - mHeight); + rect.set(0, mHeight, width, height); inval->op(rect, SkRegion::kUnion_Op); } else { clear(); // if both width/height changed, clear the old cache diff --git a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp index 5fbe0a1..c1c8d96 100644 --- a/Source/WebKit/android/jni/WebCoreFrameBridge.cpp +++ b/Source/WebKit/android/jni/WebCoreFrameBridge.cpp @@ -1477,6 +1477,11 @@ static void LoadUrl(JNIEnv *env, jobject obj, jstring url, jobject headers) } LOGV("LoadUrl %s", kurl.string().latin1().data()); pFrame->loader()->load(request, false); + + // Loading a new URL, clear the picture set. + WebCore::FrameView* view = pFrame->view(); + if (view) + WebViewCore::getWebViewCore(view)->clearContent(); } static void PostUrl(JNIEnv *env, jobject obj, jstring url, jbyteArray postData) |