Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(69)

Unified Diff: third_party/WebKit/Source/core/editing/InputMethodController.cpp

Issue 2469983003: Trybot test for finishComposingText keeping style (Closed)
Patch Set: Delete and cancel Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698