summaryrefslogtreecommitdiffstats
path: root/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2011-01-24 14:36:03 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-01-24 14:36:03 -0800
commit2efa69dd571da1a0f2cbeaeba29685c8ed412416 (patch)
treee632d66d4ef46fa52d72e6db4302cf6c36fe22ac /WebKit/android/jni/WebViewCore.cpp
parent87a9651ac46abb34b2aa38d29ec39b78b381eba4 (diff)
parentb535e4c1e9de4a018bdec6a6048927ab3033ef02 (diff)
downloadexternal_webkit-2efa69dd571da1a0f2cbeaeba29685c8ed412416.zip
external_webkit-2efa69dd571da1a0f2cbeaeba29685c8ed412416.tar.gz
external_webkit-2efa69dd571da1a0f2cbeaeba29685c8ed412416.tar.bz2
Merge "Only revealSelection if scale has not changed." into honeycomb
Diffstat (limited to 'WebKit/android/jni/WebViewCore.cpp')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index c4a0c33..84e1da5 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -1192,6 +1192,7 @@ void WebViewCore::setSizeScreenWidthAndScale(int width, int height,
int osw = m_screenWidth;
int osh = m_screenHeight;
int otw = m_textWrapWidth;
+ float oldScale = m_scale;
DBG_NAV_LOGD("old:(w=%d,h=%d,sw=%d,scale=%g) new:(w=%d,h=%d,sw=%d,scale=%g)",
ow, oh, osw, m_scale, width, height, screenWidth, scale);
m_screenWidth = screenWidth;
@@ -1296,7 +1297,9 @@ void WebViewCore::setSizeScreenWidthAndScale(int width, int height,
// If this was in response to touching a textfield and showing the IME,
// the IME may now cover textfield. Bring it back into view.
- revealSelection();
+ // If the scale changed, however, this was the result of a zoom.
+ if (oldScale == m_scale)
+ revealSelection();
// update the currently visible screen as perceived by the plugin
sendPluginVisibleScreen();
}