summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2010-11-01 14:51:00 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-11-01 14:51:00 -0700
commit553812178ad3dccc467a6a96ff0a7e246da52e8e (patch)
treeea21b2ca115a54a1eeff70d3c998a0e6726054f7 /core
parent41c738849c1fdf29357048ec9f5e48143dbb026a (diff)
parent3073646f61dcbbfe5c9e65b8e3a1d9266c3f7276 (diff)
downloadframeworks_base-553812178ad3dccc467a6a96ff0a7e246da52e8e.zip
frameworks_base-553812178ad3dccc467a6a96ff0a7e246da52e8e.tar.gz
frameworks_base-553812178ad3dccc467a6a96ff0a7e246da52e8e.tar.bz2
am 3073646f: Merge "Update insertion handler for WebTextView." into gingerbread
* commit '3073646f61dcbbfe5c9e65b8e3a1d9266c3f7276': Update insertion handler for WebTextView.
Diffstat (limited to 'core')
-rw-r--r--core/java/android/webkit/WebTextView.java4
-rw-r--r--core/java/android/webkit/WebView.java3
-rw-r--r--core/java/android/widget/TextView.java9
3 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/webkit/WebTextView.java b/core/java/android/webkit/WebTextView.java
index 4f192b3..1a9ccea 100644
--- a/core/java/android/webkit/WebTextView.java
+++ b/core/java/android/webkit/WebTextView.java
@@ -334,6 +334,10 @@ import java.util.ArrayList;
}
}
+ public void onDrawSubstitute() {
+ updateCursorControllerPositions();
+ }
+
@Override
public void onEditorAction(int actionCode) {
switch (actionCode) {
diff --git a/core/java/android/webkit/WebView.java b/core/java/android/webkit/WebView.java
index 7251764..88516ce 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3539,6 +3539,9 @@ public class WebView extends AbsoluteLayout
if (AUTO_REDRAW_HACK && mAutoRedraw) {
invalidate();
}
+ if (inEditingMode()) {
+ mWebTextView.onDrawSubstitute();
+ }
mWebViewCore.signalRepaintDone();
}
diff --git a/core/java/android/widget/TextView.java b/core/java/android/widget/TextView.java
index 61020a5..4540d5d 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4178,6 +4178,15 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener
canvas.restore();
+ updateCursorControllerPositions();
+ }
+
+ /**
+ * Update the positions of the CursorControllers. Needed by WebTextView,
+ * which does not draw.
+ * @hide
+ */
+ protected void updateCursorControllerPositions() {
if (mInsertionPointCursorController != null &&
mInsertionPointCursorController.isShowing()) {
mInsertionPointCursorController.updatePosition();