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

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

Issue 2117543003: [InputEvent] Fill |data| field for 'input' event InsertText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add virtual function |textData()| to |EditCommand| Created 4 years, 5 months 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.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
index 03a4cfbed4e1c5db5179a9591c2dcd97316b8410..621977787085f24337a39d05c91747f57e7f695c 100644
--- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
@@ -122,6 +122,13 @@ void TypingCommand::forwardDeleteKeyPressed(Document& document, EditingState* ed
TypingCommand::create(document, ForwardDeleteKey, "", options, granularity)->apply();
}
+String TypingCommand::textData() const
+{
+ if (m_commands.isEmpty())
+ return m_textToInsert;
+ return m_commands.last()->textData();
+}
+
void TypingCommand::updateSelectionIfDifferentFromCurrentSelection(TypingCommand* typingCommand, LocalFrame* frame)
{
DCHECK(frame);

Powered by Google App Engine
This is Rietveld 408576698