Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/Editor.cpp |
| diff --git a/third_party/WebKit/Source/core/editing/Editor.cpp b/third_party/WebKit/Source/core/editing/Editor.cpp |
| index af360607889dfe0a89484963e17705382a367e14..b3861939a0e543d2ac663f5ef1144977ba3f5e55 100644 |
| --- a/third_party/WebKit/Source/core/editing/Editor.cpp |
| +++ b/third_party/WebKit/Source/core/editing/Editor.cpp |
| @@ -142,6 +142,12 @@ InputEvent::InputType inputTypeFromCommand(const CompositeEditCommand* command) |
| return InputEvent::InputType::None; |
| } |
| +// TODO(chongz): |InsertNonText| event might require a document fragment |data|. |
| +String dataFromCommand(const CompositeEditCommand* command) |
|
yosin_UTC9
2016/07/07 00:44:32
We don't need to have this function at this time.
|
| +{ |
| + return command->textDataForInputEvent(); |
| +} |
| + |
| InputEvent::EventIsComposing isComposingFromCommand(const CompositeEditCommand* command) |
| { |
| if (command->isTypingCommand() && toTypingCommand(command)->compositionType() != TypingCommand::TextCompositionNone) |
| @@ -752,8 +758,7 @@ void Editor::appliedEditing(CompositeEditCommand* cmd) |
| DCHECK(composition); |
| dispatchEditableContentChangedEvents(composition->startingRootEditableElement(), composition->endingRootEditableElement()); |
| // TODO(chongz): Filter empty InputType after spec is finalized. |
| - // TODO(chongz): Fill in |data| field. |
| - dispatchInputEventEditableContentChanged(composition->startingRootEditableElement(), composition->endingRootEditableElement(), inputTypeFromCommand(cmd), emptyString(), isComposingFromCommand(cmd)); |
| + dispatchInputEventEditableContentChanged(composition->startingRootEditableElement(), composition->endingRootEditableElement(), inputTypeFromCommand(cmd), dataFromCommand(cmd), isComposingFromCommand(cmd)); |
| VisibleSelection newSelection(cmd->endingSelection()); |
| // Don't clear the typing style with this selection change. We do those things elsewhere if necessary. |