summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorLeon Scroggins <scroggo@google.com>2010-10-22 18:16:01 -0400
committerLeon Scroggins <scroggo@google.com>2010-10-26 10:49:42 -0400
commit0ab70efea3ff218a80d55cbf7c1bb6ee7df228f9 (patch)
treec9caee510433f1f249929c7b3262c6e07c96b9b4 /WebKit
parente07c496fbcd502aa97eb8e9d53a74623d3c1cff6 (diff)
downloadexternal_webkit-0ab70efea3ff218a80d55cbf7c1bb6ee7df228f9.zip
external_webkit-0ab70efea3ff218a80d55cbf7c1bb6ee7df228f9.tar.gz
external_webkit-0ab70efea3ff218a80d55cbf7c1bb6ee7df228f9.tar.bz2
Update selection after keypresses.
Bug:3054784 Change-Id: I5430969dc532feea10a960eb4117b3a3108ed702
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/android/jni/WebViewCore.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/WebKit/android/jni/WebViewCore.cpp b/WebKit/android/jni/WebViewCore.cpp
index f56b916..b87a059 100644
--- a/WebKit/android/jni/WebViewCore.cpp
+++ b/WebKit/android/jni/WebViewCore.cpp
@@ -2347,12 +2347,14 @@ void WebViewCore::passToJs(int generation, const WTF::String& current,
WebCore::RenderTextControl* renderText =
static_cast<WebCore::RenderTextControl*>(renderer);
WTF::String test = renderText->text();
- if (test == current) {
+ if (test != current) {
+ // If the text changed during the key event, update the UI text field.
+ updateTextfield(focus, false, test);
+ } else {
DBG_NAV_LOG("test == current");
- return;
}
- // If the text changed during the key event, update the UI text field.
- updateTextfield(focus, false, test);
+ // Now that the selection has settled down, send it.
+ updateTextSelection();
}
void WebViewCore::scrollFocusedTextInput(float xPercent, int y)