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

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

Issue 2558643003: [InputEvent] Move 'beforeinput' logic into |CompositeEditCommand::willApplyEditing()| (3/3) (Closed)
Patch Set: yosin's review, fix nits 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/TypingCommand.h
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.h b/third_party/WebKit/Source/core/editing/commands/TypingCommand.h
index a21fa5177dcd6d12499e2e05e337499d259e7812..898bde4d1502a1e83ed79f1bde5d7067f394789f 100644
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.h
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.h
@@ -96,9 +96,8 @@ class CORE_EXPORT TypingCommand final : public CompositeEditCommand {
ETypingCommand commandTypeOfOpenCommand() const { return m_commandType; }
TextCompositionType compositionType() const { return m_compositionType; }
- // |TypingCommand| may contain multiple |InsertTextCommand|, should return
- // |textDataForInputEvent()| of the last one.
String textDataForInputEvent() const final;
+ RangeVector* targetRangesForInputEvent() const final;
private:
static TypingCommand* create(
@@ -149,6 +148,8 @@ class CORE_EXPORT TypingCommand final : public CompositeEditCommand {
LocalFrame*);
void updatePreservesTypingStyle(ETypingCommand);
+ bool willAddTypingToOpenCommand(InputEvent::InputType,
+ const String& text = nullAtom);
void typingAddedToOpenCommand(ETypingCommand);
bool makeEditableRootEmpty(EditingState*);
@@ -158,6 +159,7 @@ class CORE_EXPORT TypingCommand final : public CompositeEditCommand {
ETypingCommand m_commandType;
String m_textToInsert;
+ InputEvent::InputType m_inputType;
bool m_openForMoreTyping;
bool m_selectInsertedText;
bool m_smartDelete;

Powered by Google App Engine
This is Rietveld 408576698