diff options
author | George Mount <mount@google.com> | 2012-02-23 15:22:39 -0800 |
---|---|---|
committer | George Mount <mount@google.com> | 2012-02-23 16:47:48 -0800 |
commit | cc95248cace682365bf4d69a0b60990799351f33 (patch) | |
tree | 0ada753ad6f77037b11b50febb3976bc89be989a /Source/WebKit/android | |
parent | b7db22cf52aade90ac9d1fb8eb2f2bf37b711b13 (diff) | |
download | external_webkit-cc95248cace682365bf4d69a0b60990799351f33.zip external_webkit-cc95248cace682365bf4d69a0b60990799351f33.tar.gz external_webkit-cc95248cace682365bf4d69a0b60990799351f33.tar.bz2 |
Selection node used for selection region rather than focus node.
Bug 6059606
Change-Id: I6be963f30adef0c1dab19399d0eb505b4d0452d3
Diffstat (limited to 'Source/WebKit/android')
-rw-r--r-- | Source/WebKit/android/jni/WebViewCore.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/WebKit/android/jni/WebViewCore.cpp b/Source/WebKit/android/jni/WebViewCore.cpp index 0030621..1a3f7ca 100644 --- a/Source/WebKit/android/jni/WebViewCore.cpp +++ b/Source/WebKit/android/jni/WebViewCore.cpp @@ -3939,14 +3939,14 @@ void WebViewCore::updateTextSelection() AutoJObject javaObject = m_javaGlue->object(env); if (!javaObject.get()) return; - WebCore::Node* focusNode = currentFocus(); + VisibleSelection selection = focusedFrame()->selection()->selection(); int start = 0; int end = 0; - if (focusNode) - getSelectionOffsets(focusNode, start, end); - SelectText* selectText = createSelectText(focusedFrame()->selection()->selection()); + if (selection.isCaretOrRange()) + getSelectionOffsets(selection.start().anchorNode(), start, end); + SelectText* selectText = createSelectText(selection); env->CallVoidMethod(javaObject.get(), - m_javaGlue->m_updateTextSelection, reinterpret_cast<int>(focusNode), + m_javaGlue->m_updateTextSelection, reinterpret_cast<int>(currentFocus()), start, end, m_textGeneration, reinterpret_cast<int>(selectText)); checkException(env); } |