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

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

Issue 1753703005: Simplify TypingCommand::insertText (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update Created 4 years, 10 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/TextInsertionBaseCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/TextInsertionBaseCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TextInsertionBaseCommand.cpp
index 25b37f0bef445b3562348aa6399aab05c520f6e0..c1fc6cddc3499432c69aa17331bed3f4f46b1886 100644
--- a/third_party/WebKit/Source/core/editing/commands/TextInsertionBaseCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/TextInsertionBaseCommand.cpp
@@ -39,20 +39,6 @@ TextInsertionBaseCommand::TextInsertionBaseCommand(Document& document)
{
}
-void TextInsertionBaseCommand::applyTextInsertionCommand(LocalFrame* frame, PassRefPtrWillBeRawPtr<TextInsertionBaseCommand> command, const VisibleSelection& selectionForInsertion, const VisibleSelection& endingSelection)
-{
- bool changeSelection = !equalSelectionsInDOMTree(selectionForInsertion, endingSelection);
- if (changeSelection) {
- command->setStartingSelection(selectionForInsertion);
- command->setEndingSelection(selectionForInsertion);
- }
- command->apply();
- if (changeSelection) {
- command->setEndingSelection(endingSelection);
- frame->selection().setSelection(endingSelection);
- }
-}
-
String dispatchBeforeTextInsertedEvent(const String& text, const VisibleSelection& selectionForInsertion, bool insertionIsForUpdatingComposition)
{
if (insertionIsForUpdatingComposition)

Powered by Google App Engine
This is Rietveld 408576698