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 39ffedf1bb80c08f6a62ab4ebd3e10edd2c36d17..67d0acf6da662fa135a1c7f584eeae47b233f15c 100644 |
| --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h |
| +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h |
| @@ -31,6 +31,7 @@ |
| #include "core/editing/commands/EditCommand.h" |
| #include "core/editing/commands/EditingState.h" |
| #include "core/editing/commands/UndoStep.h" |
| +#include "core/events/InputEvent.h" |
| #include "wtf/Vector.h" |
| namespace blink { |
| @@ -48,13 +49,11 @@ class EditCommandComposition final : public UndoStep { |
| public: |
| static EditCommandComposition* create(Document*, |
| const VisibleSelection&, |
| - const VisibleSelection&, |
| - InputEvent::InputType); |
| + const VisibleSelection&); |
| bool belongsTo(const LocalFrame&) const override; |
| void unapply(EditCommandSource) override; |
| void reapply(EditCommandSource) override; |
| - InputEvent::InputType inputType() const override; |
|
chongz
2016/12/20 04:48:58
We don't need |inputType()| for |EditCommandCompos
|
| void append(SimpleEditCommand*); |
| void append(EditCommandComposition*); |
| @@ -76,10 +75,8 @@ class EditCommandComposition final : public UndoStep { |
| private: |
| EditCommandComposition(Document*, |
| const VisibleSelection& startingSelection, |
| - const VisibleSelection& endingSelection, |
| - InputEvent::InputType); |
| + const VisibleSelection& endingSelection); |
| - // TODO(chongz): Implement "beforeinput" as described below: |
| // Fires "beforeinput" and will returns |false| to cancel unapply / reapply if |
| // * "beforeinput" was canceled, or |
| // * |frame| was destroyed by event handlers. |
| @@ -93,7 +90,6 @@ class EditCommandComposition final : public UndoStep { |
| HeapVector<Member<SimpleEditCommand>> m_commands; |
| Member<Element> m_startingRootEditableElement; |
| Member<Element> m_endingRootEditableElement; |
| - InputEvent::InputType m_inputType; |
| }; |
| class CORE_EXPORT CompositeEditCommand : public EditCommand { |
| @@ -121,12 +117,17 @@ class CORE_EXPORT CompositeEditCommand : public EditCommand { |
| virtual void setShouldRetainAutocorrectionIndicator(bool); |
| virtual bool shouldStopCaretBlinking() const { return false; } |
| + virtual InputEvent::InputType inputType() const; |
| + // |TypingCommand| will return the text of the last |m_commands|. |
| + virtual String textDataForInputEvent() const; |
| + virtual DataTransfer* dataTransferForInputEvent() const; |
| + virtual RangeVector* targetRangesForInputEvent() const; |
| + |
| DECLARE_VIRTUAL_TRACE(); |
| protected: |
| explicit CompositeEditCommand(Document&); |
| - // TODO(chongz): Implement "beforeinput" as described below: |
| // Fires "beforeinput" and will return |false| to cancel applying editing if |
| // * "beforeinput" was canceled, or |
| // * |frame| was destroyed by event handlers. |