summaryrefslogtreecommitdiffstats
path: root/Source/WebKit/android/jni/WebViewCore.cpp
diff options
context:
space:
mode:
authorRussell Brenner <russellbrenner@google.com>2011-06-13 11:50:54 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-06-13 11:50:54 -0700
commit9a47872451c2be07e2bd88483ba3fc32c8174ee5 (patch)
treeda92d80ad7fe43f9af7ae55ddc21ffadfceefae7 /Source/WebKit/android/jni/WebViewCore.cpp
parent150c94129c340b7cce44e62b98ee057e6d7612cd (diff)
parentbaaa907099a858a7d17131e26ff4c75bacc75f26 (diff)
downloadexternal_webkit-9a47872451c2be07e2bd88483ba3fc32c8174ee5.zip
external_webkit-9a47872451c2be07e2bd88483ba3fc32c8174ee5.tar.gz
external_webkit-9a47872451c2be07e2bd88483ba3fc32c8174ee5.tar.bz2
Merge "Add javascript 'select' event"
Diffstat (limited to 'Source/WebKit/android/jni/WebViewCore.cpp')
-rw-r--r--Source/WebKit/android/jni/WebViewCore.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp
index dc919d8..4e20ca1 100644
--- a/Source/WebKit/android/jni/WebViewCore.cpp
+++ b/Source/WebKit/android/jni/WebViewCore.cpp
@@ -2118,6 +2118,12 @@ void WebViewCore::setSelection(int start, int end)
m_mainFrame->editor()->client());
client->setUiGeneratedSelectionChange(true);
setSelectionRange(focus, start, end);
+ if (start != end) {
+ // Fire a select event. No event is sent when the selection reduces to
+ // an insertion point
+ RenderTextControl* control = toRenderTextControl(renderer);
+ control->selectionChanged(true);
+ }
client->setUiGeneratedSelectionChange(false);
WebCore::Frame* focusedFrame = focus->document()->frame();
bool isPasswordField = false;