diff options
author | Russell Brenner <russellbrenner@google.com> | 2011-06-13 11:50:54 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-06-13 11:50:54 -0700 |
commit | 9a47872451c2be07e2bd88483ba3fc32c8174ee5 (patch) | |
tree | da92d80ad7fe43f9af7ae55ddc21ffadfceefae7 /Source/WebKit/android/jni/WebViewCore.cpp | |
parent | 150c94129c340b7cce44e62b98ee057e6d7612cd (diff) | |
parent | baaa907099a858a7d17131e26ff4c75bacc75f26 (diff) | |
download | external_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.cpp | 6 |
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; |