| Index: third_party/WebKit/Source/core/editing/commands/TextInsertionBaseCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/TextInsertionBaseCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TextInsertionBaseCommand.cpp
|
| index 6a0bbda380948c771f5a8cf2db9720cd65ee810c..4cfbda5925ab3f25aacd8bdcff551c116331a29c 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/TextInsertionBaseCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/TextInsertionBaseCommand.cpp
|
| @@ -39,4 +39,18 @@ TextInsertionBaseCommand::TextInsertionBaseCommand(Document& document)
|
| {
|
| }
|
|
|
| +void TextInsertionBaseCommand::applyTextInsertionCommand(LocalFrame* frame, PassRefPtrWillBeRawPtr<TextInsertionBaseCommand> command, const VisibleSelection& selectionForInsertion, const VisibleSelection& endingSelection)
|
| +{
|
| + bool changeSelection = !equalSelectionsInDOMTree(selectionForInsertion, endingSelection);
|
| + if (changeSelection) {
|
| + command->setStartingSelection(selectionForInsertion);
|
| + command->setEndingSelection(selectionForInsertion);
|
| + }
|
| + command->apply();
|
| + if (changeSelection) {
|
| + command->setEndingSelection(endingSelection);
|
| + frame->selection().setSelection(endingSelection);
|
| + }
|
| +}
|
| +
|
| } // namespace blink
|
|
|