| 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 fa406b5295850c63a436280e4e7d1fe9ee70786c..465fc735662f7250e044354ec2211c1af5cf49e4 100644
|
| --- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
|
| @@ -182,7 +182,8 @@ Document& InputMethodController::document() const {
|
| }
|
|
|
| bool InputMethodController::hasComposition() const {
|
| - return m_hasComposition;
|
| + return m_hasComposition && !m_compositionRange->collapsed() &&
|
| + m_compositionRange->isConnected();
|
| }
|
|
|
| inline Editor& InputMethodController::editor() const {
|
| @@ -314,6 +315,7 @@ bool InputMethodController::replaceCompositionAndMoveCaret(
|
| Element* rootEditableElement = frame().selection().rootEditableElement();
|
| if (!rootEditableElement)
|
| return false;
|
| + DCHECK(hasComposition());
|
| PlainTextRange compositionRange =
|
| PlainTextRange::create(*rootEditableElement, *m_compositionRange);
|
| if (compositionRange.isNull())
|
|
|