| 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 29a17ac75d586f4724334baaaa8010122d4aa1ac..2649849c3e1c27cf136927745dd68330137a46fe 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| @@ -201,8 +201,9 @@ bool CompositeEditCommand::apply() {
|
| case InputEvent::InputType::DeleteComposedCharacterBackward:
|
| case InputEvent::InputType::DeleteWordBackward:
|
| case InputEvent::InputType::DeleteWordForward:
|
| - case InputEvent::InputType::DeleteLineBackward:
|
| - case InputEvent::InputType::DeleteLineForward:
|
| + case InputEvent::InputType::DeleteSoftLineBackward:
|
| + case InputEvent::InputType::DeleteSoftLineForward:
|
| + case InputEvent::InputType::DeleteContent:
|
| case InputEvent::InputType::DeleteContentBackward:
|
| case InputEvent::InputType::DeleteContentForward:
|
| case InputEvent::InputType::DeleteByCut:
|
| @@ -223,6 +224,11 @@ bool CompositeEditCommand::apply() {
|
| // the creation of VisiblePositions).
|
| document().updateStyleAndLayoutIgnorePendingStylesheets();
|
|
|
| + // Covers the initial TypingCommand and other top-level commands.
|
| + // See TypingCommand::willAddTypingToOpenCommand().
|
| + if (!willApply())
|
| + return false;
|
| +
|
| LocalFrame* frame = document().frame();
|
| DCHECK(frame);
|
| EditingState editingState;
|
| @@ -430,6 +436,10 @@ void CompositeEditCommand::insertNodeAt(Node* insertChild,
|
| }
|
| }
|
|
|
| +bool CompositeEditCommand::willApply() {
|
| + return document().frame()->editor().willApplyEditing(this);
|
| +}
|
| +
|
| void CompositeEditCommand::appendNode(Node* node,
|
| ContainerNode* parent,
|
| EditingState* editingState) {
|
|
|