Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(44)

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h

Issue 2558643003: [InputEvent] Move 'beforeinput' logic into |CompositeEditCommand::willApplyEditing()| (3/3) (Closed)
Patch Set: xiaocheng's review 3: Rebase and remove updateStyleAndLayoutIgnorePendingStylesheets() Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f6c2930ffa5ed34bbca22557c192a8fac3e8c561..179b61c375e8ac8435a5271142421736ce00f766 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 {
@@ -76,8 +77,7 @@ class EditCommandComposition final : public UndoStep {
const VisibleSelection& startingSelection,
const VisibleSelection& endingSelection);
- // TODO(chongz): Implement "beforeinput" as described below:
- // Fires "beforeinput" and will returns |false| to cancel unapply / reapply if
+ // Fires "beforeinput" and will return |false| to cancel unapply / reapply if
// * "beforeinput" was canceled, or
// * |frame| was destroyed by event handlers.
// Note: Undo stack will always get popped.
@@ -117,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.

Powered by Google App Engine
This is Rietveld 408576698