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

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

Issue 2779813002: [InputEvent] Don't modify selection when transpose was canceled (Closed)
Patch Set: Created 3 years, 9 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 8c1b3c10ec0da89f302771a119acb2a59edbc9c7..d44ab0d4389a1392730b53daef11086d159d464c 100644
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp
@@ -2065,7 +2065,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)
@@ -2075,7 +2076,7 @@ DispatchEventResult dispatchBeforeInputInsertText(
InputEvent* beforeInputEvent = InputEvent::createBeforeInput(
inputType, data, inputTypeIsCancelable(inputType),
InputEvent::EventIsComposing::NotComposing,
- targetRangesForInputEvent(*target));
+ ranges ? ranges : targetRangesForInputEvent(*target));
return target->dispatchEvent(beforeInputEvent);
}

Powered by Google App Engine
This is Rietveld 408576698