summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/android/jni/WebViewCore.cpp')
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index 4e20ca1..96045c6 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -1251,6 +1251,11 @@ void WebViewCore::setSizeScreenWidthAndScale(int width, int height,
int textWrapWidth, float scale, int screenWidth, int screenHeight,
int anchorX, int anchorY, bool ignoreHeight)
{
+ // Ignore the initial empty document.
+ const WebCore::KURL& url = m_mainFrame->document()->url();
+ if (url.isEmpty())
+ return;
+
WebCoreViewBridge* window = m_mainFrame->view()->platformWidget();
int ow = window->width();
int oh = window->height();