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 fbd532e77a9fb2f5a49da3f27929a04b4b70f583..87de35bab7a234c90605155dbe2beb157d0ed619 100644 |
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp |
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp |
@@ -298,9 +298,24 @@ void TypingCommand::doApply(EditingState* editingState) |
NOTREACHED(); |
} |
-EditAction TypingCommand::editingAction() const |
+InputEvent::InputType TypingCommand::inputType() const |
{ |
- return EditActionTyping; |
+ // TODO(chongz): Map commands based on |m_granularity| and direction. |
+ switch (commandTypeOfOpenCommand()) { |
+ case DeleteSelection: |
+ case DeleteKey: |
+ case ForwardDeleteKey: |
+ return InputEvent::InputType::DeleteContentBackward; |
+ case InsertText: |
+ return InputEvent::InputType::InsertText; |
+ case InsertLineBreak: |
+ return InputEvent::InputType::InsertLineBreak; |
+ case InsertParagraphSeparator: |
+ case InsertParagraphSeparatorInQuotedContent: |
+ return InputEvent::InputType::InsertParagraph; |
+ default: |
+ return InputEvent::InputType::None; |
+ } |
} |
void TypingCommand::markMisspellingsAfterTyping(ETypingCommand commandType) |