Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h |
| diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h |
| index f2d7317eeca7d2291063530eaefa637e55976300..9cdbada94423cfaf763554b716e6c9e8e4a6ff5e 100644 |
| --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h |
| +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h |
| @@ -118,6 +118,14 @@ class CORE_EXPORT CompositeEditCommand : public EditCommand { |
| protected: |
| explicit CompositeEditCommand(Document&); |
| + // Fires "beforeinput", returns |false| to cancel applying editing if |
| + // * "beforeinput" was canceled, or |
| + // * |frame| was destroyed by event handlers. |
| + // |willApplyEditing()| should be called from |
| + // * |CompositeEditCommand::willApply()|, and |
| + // * |TypingCommand::willAddTypingToOpenCommand()|. |
| + bool willApplyEditing(EditCommandSource); |
|
Xiaocheng
2016/12/19 03:33:57
Please add a TODO: implementation note here since
chongz
2016/12/19 06:48:57
Will do.
chongz
2016/12/19 20:55:22
Done.
|
| + |
| // |
| // sugary-sweet convenience functions to help create and apply edit commands |
| // in composite commands |
| @@ -265,6 +273,9 @@ class CORE_EXPORT CompositeEditCommand : public EditCommand { |
| HeapVector<Member<EditCommand>> m_commands; |
| private: |
| + // Returns |false| to cancel applying command. |
| + bool willApply(EditCommandSource); |
| + |
| bool isCompositeEditCommand() const final { return true; } |
| Member<EditCommandComposition> m_composition; |