| Index: Source/core/editing/InputMethodController.cpp
|
| diff --git a/Source/core/editing/InputMethodController.cpp b/Source/core/editing/InputMethodController.cpp
|
| index 2bf2ad38ce65beff5978579b85649c7055b6896b..b3c08425030c465d61c1ed7b1ed4873dbddfc0bb 100644
|
| --- a/Source/core/editing/InputMethodController.cpp
|
| +++ b/Source/core/editing/InputMethodController.cpp
|
| @@ -270,7 +270,7 @@ void InputMethodController::setComposition(const String& text, const Vector<Comp
|
| TypingCommand::insertText(*frame().document(), text, TypingCommand::SelectInsertedText | TypingCommand::PreventSpellChecking, TypingCommand::TextCompositionUpdate);
|
|
|
| // Find out what node has the composition now.
|
| - Position base = frame().selection().base().downstream();
|
| + Position base = mostForwardCaretPosition(frame().selection().base());
|
| Node* baseNode = base.anchorNode();
|
| if (!baseNode || !baseNode->isTextNode())
|
| return;
|
| @@ -305,7 +305,7 @@ void InputMethodController::setComposition(const String& text, const Vector<Comp
|
| void InputMethodController::setCompositionFromExistingText(const Vector<CompositionUnderline>& underlines, unsigned compositionStart, unsigned compositionEnd)
|
| {
|
| Element* editable = frame().selection().rootEditableElement();
|
| - Position base = frame().selection().base().downstream();
|
| + Position base = mostForwardCaretPosition(frame().selection().base());
|
| Node* baseNode = base.anchorNode();
|
| if (baseNode && editable->firstChild() == baseNode && editable->lastChild() == baseNode && baseNode->isTextNode()) {
|
| m_compositionNode = nullptr;
|
|
|