Chromium Code Reviews| 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 b618db2bc3f70868830da25a3e96d76c5111bb31..d17bba212ee5b8e9d8d4048ec291838b99eafada 100644 |
| --- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp |
| +++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp |
| @@ -225,6 +225,12 @@ bool InputMethodController::replaceComposition(const String& text) { |
| // there's nothing to do here (and we should avoid doing anything as that |
| // may clobber multi-node styled text). |
| if (!m_isDirty && composingText() == text) { |
|
yabinh
2016/11/02 07:07:49
Delete and cancel. It will fire 2 "input.data:null
yabinh
2016/11/02 07:14:48
See the result of InputMethodControllerTest#Compos
|
| + TypingCommand::closeTyping(m_frame); |
| + selectComposition(); |
| + TypingCommand::deleteSelection(*frame().document(), 0); |
| + |
| + editor().lastEditCommand()->ensureComposition()->unapply(); |
| + |
| clear(); |
| return true; |
| } |
| @@ -522,7 +528,6 @@ void InputMethodController::setCompositionWithIncrementalText( |
| selectionStart, selectionEnd, text.length()); |
| // We shouldn't close typing in the middle of setComposition. |
| setEditableSelectionOffsets(selectedRange, NotUserTriggered); |
| - m_isDirty = true; |
| } |
| void InputMethodController::setComposition( |