| 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..fa602d7580e1faa4f122ee51ce950f18ab23214f 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
|
| @@ -122,6 +122,20 @@ void TypingCommand::forwardDeleteKeyPressed(Document& document, EditingState* ed
|
| TypingCommand::create(document, ForwardDeleteKey, "", options, granularity)->apply();
|
| }
|
|
|
| +String TypingCommand::textOfLastCommand() const
|
| +{
|
| + if (m_commands.isEmpty())
|
| + return m_textToInsert;
|
| + if (!m_commands.last()->isCompositeEditCommand())
|
| + return emptyString();
|
| +
|
| + const CompositeEditCommand* command = toCompositeEditCommand(m_commands.last());
|
| + if (!command->isInsertTextCommand())
|
| + return emptyString();
|
| +
|
| + return toInsertTextCommand(command)->m_text;
|
| +}
|
| +
|
| void TypingCommand::updateSelectionIfDifferentFromCurrentSelection(TypingCommand* typingCommand, LocalFrame* frame)
|
| {
|
| DCHECK(frame);
|
|
|