| Index: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| index 007db2918c2625ba6ae8457123a26191281eaab7..9af08b291ac18bf1eda46a5e6735b82b10f32a4b 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| @@ -56,6 +56,7 @@
|
| #include "core/editing/commands/SplitElementCommand.h"
|
| #include "core/editing/commands/SplitTextNodeCommand.h"
|
| #include "core/editing/commands/SplitTextNodeContainingElementCommand.h"
|
| +#include "core/editing/commands/TypingCommand.h"
|
| #include "core/editing/commands/WrapContentsInDummySpanCommand.h"
|
| #include "core/editing/iterators/TextIterator.h"
|
| #include "core/editing/markers/DocumentMarkerController.h"
|
| @@ -269,6 +270,28 @@ bool CompositeEditCommand::willApplyEditing(EditCommandSource,
|
| return true;
|
| }
|
|
|
| +InputEvent::InputType CompositeEditCommand::inputType() const {
|
| + return InputEvent::InputType::None;
|
| +}
|
| +
|
| +String CompositeEditCommand::textDataForInputEvent() const {
|
| + return nullAtom;
|
| +}
|
| +
|
| +DataTransfer* CompositeEditCommand::dataTransferForInputEvent() const {
|
| + return nullptr;
|
| +}
|
| +
|
| +RangeVector* CompositeEditCommand::targetRangesForInputEvent() const {
|
| + // TODO(chongz): We should return current selection for ContentEditable if no
|
| + // better choice.
|
| + // https://crbug.com/652429
|
| + if (inputType() == InputEvent::InputType::InsertReplacementText &&
|
| + document().frame()->editor().canEditRichly())
|
| + return new RangeVector(1, document().frame()->selection().firstRange());
|
| + return nullptr;
|
| +}
|
| +
|
| bool CompositeEditCommand::preservesTypingStyle() const {
|
| return false;
|
| }
|
|
|