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); |
} |