diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2011-06-17 14:18:11 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-06-17 14:18:11 -0700 |
commit | cd984a2f29881a397d997d1d2fd6cf8ca04f388b (patch) | |
tree | fdabbdfa9164aac84c75412e4cb1a54c185186c7 | |
parent | 38eac19d94363515f4ecefd9e37dcc2492fee1e5 (diff) | |
parent | cd6b6d96802a7827fce97f7ae7efac07c0a5e798 (diff) | |
download | external_webkit-cd984a2f29881a397d997d1d2fd6cf8ca04f388b.zip external_webkit-cd984a2f29881a397d997d1d2fd6cf8ca04f388b.tar.gz external_webkit-cd984a2f29881a397d997d1d2fd6cf8ca04f388b.tar.bz2 |
Merge "Ignore the initial empty document when setting viewport size."
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 5 |
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(); |