diff options
author | George Mount <mount@google.com> | 2012-02-02 07:57:42 -0800 |
---|---|---|
committer | George Mount <mount@google.com> | 2012-02-02 07:57:42 -0800 |
commit | 1bf0080adaf7239946eea0e8ddbbb2272fab0efa (patch) | |
tree | 23cb20e3b5b0f5be07e36dfdb323dbc78cffa50e | |
parent | 3ae2dce4826cc4fc412ccd49ab68bb775c31e6c4 (diff) | |
download | external_webkit-1bf0080adaf7239946eea0e8ddbbb2272fab0efa.zip external_webkit-1bf0080adaf7239946eea0e8ddbbb2272fab0efa.tar.gz external_webkit-1bf0080adaf7239946eea0e8ddbbb2272fab0efa.tar.bz2 |
Make sure no text selection change occurs during key press.
Bug 5947031
Change-Id: I9eb52ffa745b010d5ba0bff94704d1579a5257f2
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index ee6e338..6d89bdb 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -3346,7 +3346,11 @@ bool WebViewCore::key(const PlatformKeyboardEvent& event) WebFrame* webFrame = WebFrame::getWebFrame(frame); eventHandler = frame->eventHandler(); VisibleSelection old = frame->selection()->selection(); + EditorClientAndroid* client = static_cast<EditorClientAndroid*>( + m_mainFrame->editor()->client()); + client->setUiGeneratedSelectionChange(true); bool handled = eventHandler->keyEvent(event); + client->setUiGeneratedSelectionChange(false); if (isContentEditable(focusNode)) { // keyEvent will return true even if the contentEditable did not // change its selection. In the case that it does not, we want to |