| 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 84765323156dcf6078e143ed189a390c12142f37..448c3b9fda768de6bbe14a0f0d9e6b4e4a2b2c0c 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| @@ -150,6 +150,10 @@ void EditCommandComposition::append(SimpleEditCommand* command) {
|
| m_commands.append(command);
|
| }
|
|
|
| +void EditCommandComposition::append(EditCommandComposition* composition) {
|
| + m_commands.appendVector(composition->m_commands);
|
| +}
|
| +
|
| void EditCommandComposition::setStartingSelection(
|
| const VisibleSelection& selection) {
|
| m_startingSelection = selection;
|
| @@ -180,12 +184,14 @@ CompositeEditCommand::~CompositeEditCommand() {
|
| }
|
|
|
| bool CompositeEditCommand::apply() {
|
| + DCHECK(!isCommandGroupWrapper());
|
| if (!endingSelection().isContentRichlyEditable()) {
|
| switch (inputType()) {
|
| case InputEvent::InputType::InsertText:
|
| case InputEvent::InputType::InsertLineBreak:
|
| case InputEvent::InputType::InsertParagraph:
|
| case InputEvent::InputType::InsertFromPaste:
|
| + case InputEvent::InputType::InsertFromDrop:
|
| case InputEvent::InputType::DeleteComposedCharacterForward:
|
| case InputEvent::InputType::DeleteComposedCharacterBackward:
|
| case InputEvent::InputType::DeleteWordBackward:
|
| @@ -195,7 +201,7 @@ bool CompositeEditCommand::apply() {
|
| case InputEvent::InputType::DeleteContentBackward:
|
| case InputEvent::InputType::DeleteContentForward:
|
| case InputEvent::InputType::DeleteByCut:
|
| - case InputEvent::InputType::Drag:
|
| + case InputEvent::InputType::DeleteByDrag:
|
| case InputEvent::InputType::SetWritingDirection:
|
| case InputEvent::InputType::None:
|
| break;
|
| @@ -245,6 +251,14 @@ bool CompositeEditCommand::isTypingCommand() const {
|
| return false;
|
| }
|
|
|
| +bool CompositeEditCommand::isCommandGroupWrapper() const {
|
| + return false;
|
| +}
|
| +
|
| +bool CompositeEditCommand::isDragAndDropCommand() const {
|
| + return false;
|
| +}
|
| +
|
| bool CompositeEditCommand::isReplaceSelectionCommand() const {
|
| return false;
|
| }
|
| @@ -283,6 +297,13 @@ void CompositeEditCommand::applyCommandToComposite(
|
| m_commands.append(command);
|
| }
|
|
|
| +void CompositeEditCommand::appendCommandToComposite(
|
| + CompositeEditCommand* command) {
|
| + ensureComposition()->append(command->ensureComposition());
|
| + command->setParent(this);
|
| + m_commands.append(command);
|
| +}
|
| +
|
| void CompositeEditCommand::applyStyle(const EditingStyle* style,
|
| EditingState* editingState) {
|
| applyCommandToComposite(
|
|
|