| Index: third_party/WebKit/Source/core/editing/InputMethodController.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/InputMethodController.cpp b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
|
| index e36cea49358ce24b90a500afbec5b97eb29f8242..e7b4704595b13498873402c91d3e8ed82d7a485f 100644
|
| --- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
|
| @@ -401,7 +401,11 @@ void InputMethodController::setComposition(const String& text, const Vector<Comp
|
| if (baseNode->layoutObject())
|
| baseNode->layoutObject()->setShouldDoFullPaintInvalidation();
|
|
|
| - setEditableSelectionOffsets(selectedRange);
|
| + Element* rootEditableElement = frame().selection().rootEditableElement();
|
| + if (!rootEditableElement)
|
| + return;
|
| + const EphemeralRange& range = selectedRange.createRange(*rootEditableElement);
|
| + frame().selection().setSelectedRange(range, TextAffinity::Downstream, SelectionDirectionalMode::NonDirectional, NotUserTriggered);
|
|
|
| if (underlines.isEmpty()) {
|
| frame().document()->markers().addCompositionMarker(m_compositionRange->startPosition(), m_compositionRange->endPosition(), Color::black, false, LayoutTheme::theme().platformDefaultCompositionBackgroundColor());
|
|
|