summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
authorGrace Kloba <klobag@google.com>2010-01-12 17:14:42 -0800
committerGrace Kloba <klobag@google.com>2010-01-12 18:36:34 -0800
commitdbb3061334333f32b6f12c294a551bd2a4a3844c (patch)
tree084aa306dba275798f8b9dfeb12363c1ed5abab2 /WebKit/android/jni/WebViewCore.cpp
parent8ed98e2e3f77020f7a43bbd5427bc3dd12ba5743 (diff)
downloadexternal_webkit-dbb3061334333f32b6f12c294a551bd2a4a3844c.zip
external_webkit-dbb3061334333f32b6f12c294a551bd2a4a3844c.tar.gz
external_webkit-dbb3061334333f32b6f12c294a551bd2a4a3844c.tar.bz2
DO NOT MERGE.
Check the dimensions against 0 before using it to calculate the ratio. Fix http://b/issue?id=2368862
Diffstat (limited to 'WebKit/android/jni/WebViewCore.cpp')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index 1f56582..0eca9bc 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -1115,7 +1115,8 @@ void WebViewCore::setSizeScreenWidthAndScale(int width, int height,
if ((anchorX | anchorY) == 0)
scrollBy(newBounds.x() - bounds.x(),
newBounds.y() - bounds.y(), false);
- else if (bounds != newBounds) {
+ else if ((orsw && osh && bounds.width() && bounds.height())
+ && (bounds != newBounds)) {
WebCore::FrameView* view = m_mainFrame->view();
// force left align if width is not changed while height changed.
// the anchorPoint is probably at some white space in the node