summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2010-11-01 15:45:37 -0400
committerLeon Scroggins <scroggo@google.com>2010-11-01 15:45:37 -0400
commit5642625cfb065de38440408c1e2e8a8c6f8fa32d (patch)
tree2b59ae6da7ee4cac4ef8265593c5ba2145fa1733 /core
parent70a2c15ecfd4e8cd8581699d5df8a219c7d5cdb1 (diff)
downloadframeworks_base-5642625cfb065de38440408c1e2e8a8c6f8fa32d.zip
frameworks_base-5642625cfb065de38440408c1e2e8a8c6f8fa32d.tar.gz
frameworks_base-5642625cfb065de38440408c1e2e8a8c6f8fa32d.tar.bz2
Update insertion handler for WebTextView.
Bug:3152629 Change-Id: If2a33eb5456493fb9b3b2c54fcc4f5348fe129e1
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 9098639..bcd0332 100644
--- a/core/java/android/webkit/WebView.java
+++ b/core/java/android/webkit/WebView.java
@@ -3531,6 +3531,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 d719783..b30b6b1 100644
--- a/core/java/android/widget/TextView.java
+++ b/core/java/android/widget/TextView.java
@@ -4162,6 +4162,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();