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

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

Issue 2779813002: [InputEvent] Don't modify selection when transpose was canceled (Closed)
Patch Set: yosin's review: Use const& Created 3 years, 8 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/EditingUtilities.cpp
diff --git a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
index 15fcc2f0e3aaf15065c6170b1e2e00f8ad424af3..85b3719e682cf5bb67084287a382c22d4fbf38a7 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -2104,7 +2104,8 @@ const StaticRangeVector* targetRangesForInputEvent(const Node& node) {
DispatchEventResult dispatchBeforeInputInsertText(
Node* target,
const String& data,
- InputEvent::InputType inputType) {
+ InputEvent::InputType inputType,
+ const StaticRangeVector* ranges) {
if (!RuntimeEnabledFeatures::inputEventEnabled())
return DispatchEventResult::NotCanceled;
if (!target)
@@ -2114,7 +2115,7 @@ DispatchEventResult dispatchBeforeInputInsertText(
InputEvent* beforeInputEvent = InputEvent::createBeforeInput(
inputType, data, inputTypeIsCancelable(inputType),
InputEvent::EventIsComposing::NotComposing,
- targetRangesForInputEvent(*target));
+ ranges ? ranges : targetRangesForInputEvent(*target));
return target->dispatchEvent(beforeInputEvent);
}
« no previous file with comments | « third_party/WebKit/Source/core/editing/EditingUtilities.h ('k') | third_party/WebKit/Source/core/editing/Editor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698