| Index: third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| index 3ec32c20dbe3f857bd7d8470f0e0515ccf86399e..62a44ef30753d28d0cd8bf88b3cbe65df1a2673f 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ReplaceSelectionCommand.cpp
|
| @@ -2126,6 +2126,22 @@ EphemeralRange ReplaceSelectionCommand::insertedRange() const {
|
| return EphemeralRange(m_startOfInsertedRange, m_endOfInsertedRange);
|
| }
|
|
|
| +String ReplaceSelectionCommand::textDataForInputEvent() const {
|
| + return m_documentFragment->textContent();
|
| +}
|
| +
|
| +DataTransfer* ReplaceSelectionCommand::dataTransferForInputEvent() const {
|
| + switch (m_inputType) {
|
| + case InputEvent::InputType::InsertFromPaste:
|
| + case InputEvent::InputType::InsertFromDrop:
|
| + case InputEvent::InputType::InsertReplacementText:
|
| + return DataTransfer::createForInputEvent(
|
| + textDataForInputEvent(), createMarkup(m_documentFragment));
|
| + default:
|
| + return EditCommand::dataTransferForInputEvent();
|
| + }
|
| +}
|
| +
|
| DEFINE_TRACE(ReplaceSelectionCommand) {
|
| visitor->trace(m_startOfInsertedContent);
|
| visitor->trace(m_endOfInsertedContent);
|
|
|