summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2010-02-17 17:56:51 -0500
committerLeon Scroggins <scroggo@google.com>2010-02-18 13:31:47 -0500
commitbcbf564a3f527266693233cacd6728770d1a65fd (patch)
tree913565cfba457ef6ad33f9865d320cbf44e307cd /core/java
parentd651629478ea4615e3a493aa63ae455d6fefb38f (diff)
downloadframeworks_base-bcbf564a3f527266693233cacd6728770d1a65fd.zip
frameworks_base-bcbf564a3f527266693233cacd6728770d1a65fd.tar.gz
frameworks_base-bcbf564a3f527266693233cacd6728770d1a65fd.tar.bz2
At the end of a zoom, only check if the textfield is onscreen.
Previously, we checked to see if the IME was active on the WebTextView, in an attempt to fix http://b/issue?id=2266066 . If so, we move the textfield on screen. However, that is resulting in http://b/issue?id=2147168 , where a textfield far offscreen is being scrolled on screen at the end of a zoom, and with this change, the latter bug is fixed. Further, I am no longer able to reproduce the earlier bug with this change.
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/webkit/WebView.java13
1 files changed, 5 insertions, 8 deletions
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 9672892..5f5df56 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3088,14 +3088,11 @@ public class WebView extends AbsoluteLayout
Rect vBox = contentToViewRect(contentBounds);
Rect visibleRect = new Rect();
calcOurVisibleRect(visibleRect);
- // The IME may have shown, resulting in the textfield being offscreen.
- // If so, the textfield will be scrolled on screen, so treat it as
- // though it is on screen. If it is on screen, place the WebTextView in
- // its new place, accounting for our new scroll/zoom values.
- InputMethodManager imm = InputMethodManager.peekInstance();
- if ((imm != null && imm.isActive(mWebTextView))
- || (allowIntersect ? Rect.intersects(visibleRect, vBox)
- : visibleRect.contains(vBox))) {
+ // If the textfield is on screen, place the WebTextView in
+ // its new place, accounting for our new scroll/zoom values,
+ // and adjust its textsize.
+ if (allowIntersect ? Rect.intersects(visibleRect, vBox)
+ : visibleRect.contains(vBox)) {
mWebTextView.setRect(vBox.left, vBox.top, vBox.width(),
vBox.height());
mWebTextView.setTextSize(TypedValue.COMPLEX_UNIT_PX,