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 89ec17582f20ae4d0f2b7eb2df14aa3412a12d71..6b4905bed0b18e9fab0a1bd7176e1db2bce15aa0 100644 |
--- a/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
+++ b/third_party/WebKit/Source/core/editing/EditingUtilities.cpp |
@@ -1742,7 +1742,8 @@ 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); |
+ DEFINE_STATIC_LOCAL(HeapVector<Member<Range>>, emptyVector, (new HeapVector<Member<Range>>)); |
dtapuska
2016/05/12 02:00:09
I don't think it is worth worrying about a static
chongz
2016/05/12 20:53:49
Removed static local and instead passing pointers
|
+ InputEvent* beforeInputEvent = InputEvent::createBeforeInput(InputEvent::InputType::InsertText, data, InputEvent::EventCancelable::IsCancelable, InputEvent::EventIsComposing::NotComposing, emptyVector); |
return target->dispatchEvent(beforeInputEvent); |
} |
@@ -1752,17 +1753,18 @@ DispatchEventResult dispatchBeforeInputFromComposition(EventTarget* target, Inpu |
return DispatchEventResult::NotCanceled; |
if (!target) |
return DispatchEventResult::NotCanceled; |
- InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, InputEvent::EventCancelable::NotCancelable, InputEvent::EventIsComposing::IsComposing); |
+ DEFINE_STATIC_LOCAL(HeapVector<Member<Range>>, emptyVector, (new HeapVector<Member<Range>>)); |
+ InputEvent* beforeInputEvent = InputEvent::createBeforeInput(inputType, data, InputEvent::EventCancelable::NotCancelable, InputEvent::EventIsComposing::IsComposing, emptyVector); |
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 HeapVector<Member<Range>>& 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); |
} |