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 86e85babb1b7b10265937480abf450234adc213d..fa0cabaa65cabc41d7889bac7a7add19b78f2531 100644 |
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
@@ -1762,7 +1762,9 @@ DispatchEventResult dispatchBeforeInputInsertText(EventTarget* target, const Str |
return DispatchEventResult::NotCanceled; |
if (!target) |
return DispatchEventResult::NotCanceled; |
- InputEvent* beforeInputEvent = InputEvent::createBeforeInput(InputEvent::InputType::InsertText, data, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing); |
+ // TODO(chongz): Pass appreciate |ranges| after it's defined on spec. |
+ // http://w3c.github.io/editing/input-events.html#dom-inputevent-inputtype |
+ InputEvent* beforeInputEvent = InputEvent::createBeforeInput(InputEvent::InputType::InsertText, data, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing, nullptr); |
return target->dispatchEvent(beforeInputEvent); |
} |
@@ -1772,17 +1774,19 @@ DispatchEventResult dispatchBeforeInputFromComposition(EventTarget* target, Inpu |
return DispatchEventResult::NotCanceled; |
if (!target) |
return DispatchEventResult::NotCanceled; |
- InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, cancelable, InputEvent::EventIsComposing::IsComposing); |
+ // TODO(chongz): Pass appreciate |ranges| after it's defined on spec. |
+ // http://w3c.github.io/editing/input-events.html#dom-inputevent-inputtype |
+ InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, cancelable, InputEvent::EventIsComposing::IsComposing, nullptr); |
return target->dispatchEvent(beforeInputEvent); |
} |
-DispatchEventResult dispatchBeforeInputEditorCommand(EventTarget* target, InputEvent::InputType inputType, const String& data) |
+DispatchEventResult dispatchBeforeInputEditorCommand(EventTarget* target, InputEvent::InputType inputType, const String& data, const RangeVector* ranges) |
{ |
if (!RuntimeEnabledFeatures::inputEventEnabled()) |
return DispatchEventResult::NotCanceled; |
if (!target) |
return DispatchEventResult::NotCanceled; |
- InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing); |
+ InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing, ranges); |
return target->dispatchEvent(beforeInputEvent); |
} |