diff options
author | Shimeng (Simon) Wang <swang@google.com> | 2011-06-17 10:42:40 -0700 |
---|---|---|
committer | Shimeng (Simon) Wang <swang@google.com> | 2011-06-17 10:42:40 -0700 |
commit | cd6b6d96802a7827fce97f7ae7efac07c0a5e798 (patch) | |
tree | f1285d9110b19276c98b7977cdd8bad9359c5d3b | |
parent | ab19ca49906518c0d8eacb32a3897682f11335b0 (diff) | |
download | external_webkit-cd6b6d96802a7827fce97f7ae7efac07c0a5e798.zip external_webkit-cd6b6d96802a7827fce97f7ae7efac07c0a5e798.tar.gz external_webkit-cd6b6d96802a7827fce97f7ae7efac07c0a5e798.tar.bz2 |
Ignore the initial empty document when setting viewport size.
This fixes the issue where "google legal" dialog will show
empty content, since the initial empty document will get laid
out and used in some circumstances.
issue: 4501857
Change-Id: I779d983f3c81724663391872de81ceed025adec1
-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(); |