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

Unified Diff: third_party/WebKit/Source/core/editing/InputMethodController.cpp

Issue 2151353002: [InputEvent] Replace |EditAction| with |InputType| (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inputevent-text-styling
Patch Set: Replaced |EditAction| with |InputType| 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/InputMethodController.cpp
diff --git a/third_party/WebKit/Source/core/editing/InputMethodController.cpp b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
index 695b8c39c3ccded865a45f80ca40583871c2c870..8955730e8a6afad512452c4e35717a4a26f1d7ae 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodController.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodController.cpp
@@ -270,8 +270,8 @@ void InputMethodController::cancelComposition()
clear();
- // TODO(chongz): Update InputType::DeleteComposedCharacter with latest discussion.
- dispatchBeforeInputFromComposition(frame().document()->focusedElement(), InputEvent::InputType::DeleteComposedCharacter, emptyString(), InputEvent::EventCancelable::NotCancelable);
+ // TODO(chongz): Figure out which InputType should we use here.
+ dispatchBeforeInputFromComposition(frame().document()->focusedElement(), InputEvent::InputType::DeleteComposedCharacterBackward, emptyString(), InputEvent::EventCancelable::NotCancelable);
dispatchCompositionUpdateEvent(frame(), emptyString());
insertTextDuringCompositionWithEvents(frame(), emptyString(), 0, TypingCommand::TextCompositionType::TextCompositionConfirm);
// Event handler might destroy document.
@@ -554,9 +554,8 @@ void InputMethodController::extendSelectionAndDelete(int before, int after)
break;
++before;
} while (frame().selection().start() == frame().selection().end() && before <= static_cast<int>(selectionOffsets.start()));
- // TODO(chongz): New spec might want to change InputType.
- // https://github.com/w3c/editing/issues/125#issuecomment-213041256
- dispatchBeforeInputEditorCommand(m_frame->document()->focusedElement(), InputEvent::InputType::DeleteContent, emptyString(), new RangeVector(1, m_frame->selection().firstRange()));
+ // TODO(chongz): Find a way to distinguish Forward and Backward.
+ dispatchBeforeInputEditorCommand(m_frame->document()->focusedElement(), InputEvent::InputType::DeleteContentBackward, emptyString(), new RangeVector(1, m_frame->selection().firstRange()));
TypingCommand::deleteSelection(*frame().document());
}
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698