| 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 866d02dfe99734e203c106c3f9c8b144b4f294f3..007db2918c2625ba6ae8457123a26191281eaab7 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
|
| @@ -107,7 +107,7 @@ void EditCommandComposition::unapply(EditCommandSource source) {
|
| LocalFrame* frame = m_document->frame();
|
| DCHECK(frame);
|
|
|
| - if (!willUnapply(source))
|
| + if (!willUnapply(source, BeforeInputTiming::kHasFiredBeforeCommand))
|
| return;
|
|
|
| // Changes to the document may have been made since the last editing operation
|
| @@ -131,7 +131,7 @@ void EditCommandComposition::reapply(EditCommandSource source) {
|
| LocalFrame* frame = m_document->frame();
|
| DCHECK(frame);
|
|
|
| - if (!willReapply(source))
|
| + if (!willReapply(source, BeforeInputTiming::kHasFiredBeforeCommand))
|
| return;
|
|
|
| // Changes to the document may have been made since the last editing operation
|
| @@ -149,12 +149,12 @@ void EditCommandComposition::reapply(EditCommandSource source) {
|
| frame->editor().reappliedEditing(this);
|
| }
|
|
|
| -bool EditCommandComposition::willUnapply(EditCommandSource) {
|
| +bool EditCommandComposition::willUnapply(EditCommandSource, BeforeInputTiming) {
|
| // TODO(chongz): Fire 'beforeinput' for 'historyUndo'.
|
| return true;
|
| }
|
|
|
| -bool EditCommandComposition::willReapply(EditCommandSource) {
|
| +bool EditCommandComposition::willReapply(EditCommandSource, BeforeInputTiming) {
|
| // TODO(chongz): Fire 'beforeinput' for 'historyRedo'.
|
| return true;
|
| }
|
| @@ -196,7 +196,8 @@ CompositeEditCommand::~CompositeEditCommand() {
|
| DCHECK(isTopLevelCommand() || !m_composition);
|
| }
|
|
|
| -bool CompositeEditCommand::apply(EditCommandSource source) {
|
| +bool CompositeEditCommand::apply(EditCommandSource source,
|
| + BeforeInputTiming beforeInputTiming) {
|
| DCHECK(!isCommandGroupWrapper());
|
| if (!endingSelection().isContentRichlyEditable()) {
|
| switch (inputType()) {
|
| @@ -232,7 +233,7 @@ bool CompositeEditCommand::apply(EditCommandSource source) {
|
| // the creation of VisiblePositions).
|
| document().updateStyleAndLayoutIgnorePendingStylesheets();
|
|
|
| - if (!willApplyEditing(source))
|
| + if (!willApplyEditing(source, beforeInputTiming))
|
| return false;
|
|
|
| LocalFrame* frame = document().frame();
|
| @@ -262,7 +263,8 @@ EditCommandComposition* CompositeEditCommand::ensureComposition() {
|
| return command->m_composition.get();
|
| }
|
|
|
| -bool CompositeEditCommand::willApplyEditing(EditCommandSource) {
|
| +bool CompositeEditCommand::willApplyEditing(EditCommandSource,
|
| + BeforeInputTiming) {
|
| // TODO(chongz): Move all the 'beforeinput' dispatching logic here.
|
| return true;
|
| }
|
|
|