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

Unified Diff: third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp

Issue 2675363003: [InputEvent] Fire "insertCompositionText" during IME (Closed)
Patch Set: Created 3 years, 10 months 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
Index: third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
index 89d68d2f22af91432529b53d4ce0e8e19ab4bfea..3bf8e3526207565b30bc5a15ec6ae519460af8ad 100644
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
@@ -467,19 +467,18 @@ void TypingCommand::doApply(EditingState* editingState) {
InputEvent::InputType TypingCommand::inputType() const {
using InputType = InputEvent::InputType;
+ if (m_compositionType != TextCompositionNone)
+ return InputType::InsertCompositionText;
+
switch (m_commandType) {
// TODO(chongz): |DeleteSelection| is used by IME but we don't have
// direction info.
case DeleteSelection:
return InputType::DeleteContentBackward;
case DeleteKey:
- if (m_compositionType != TextCompositionNone)
- return InputType::DeleteComposedCharacterBackward;
return deletionInputTypeFromTextGranularity(DeleteDirection::Backward,
m_granularity);
case ForwardDeleteKey:
- if (m_compositionType != TextCompositionNone)
- return InputType::DeleteComposedCharacterForward;
return deletionInputTypeFromTextGranularity(DeleteDirection::Forward,
m_granularity);
case InsertText:

Powered by Google App Engine
This is Rietveld 408576698