| Index: third_party/WebKit/Source/core/input/TouchEventManager.cpp
|
| diff --git a/third_party/WebKit/Source/core/input/TouchEventManager.cpp b/third_party/WebKit/Source/core/input/TouchEventManager.cpp
|
| index f45287cfa86d60abf08723151ae5aadb91fdadba..d525243680985fea965a42391ae53c063ba28b7a 100644
|
| --- a/third_party/WebKit/Source/core/input/TouchEventManager.cpp
|
| +++ b/third_party/WebKit/Source/core/input/TouchEventManager.cpp
|
| @@ -19,6 +19,7 @@
|
| #include "platform/Histogram.h"
|
| #include "platform/wtf/CurrentTime.h"
|
| #include "platform/wtf/PtrUtil.h"
|
| +#include "public/platform/WebCoalescedInputEvent.h"
|
| #include "public/platform/WebTouchEvent.h"
|
|
|
| namespace blink {
|
| @@ -118,6 +119,7 @@ DEFINE_TRACE(TouchEventManager) {
|
|
|
| WebInputEventResult TouchEventManager::DispatchTouchEvents(
|
| const WebTouchEvent& event,
|
| + const Vector<WebTouchEvent>& coalesced_events,
|
| const HeapVector<TouchInfo>& touch_infos,
|
| bool all_touches_released) {
|
| // Build up the lists to use for the |touches|, |targetTouches| and
|
| @@ -201,6 +203,12 @@ WebInputEventResult TouchEventManager::DispatchTouchEvents(
|
| }
|
|
|
| WebInputEventResult event_result = WebInputEventResult::kNotHandled;
|
| + // First we construct the webcoalescedinputevent contains all the coalesced
|
| + // touch event.
|
| + WebCoalescedInputEvent coalesced_event(event);
|
| + for (size_t i = 1; i < coalesced_events.size(); ++i) {
|
| + coalesced_event.AddCoalescedEvent(coalesced_events[i]);
|
| + }
|
|
|
| // Now iterate through the |changedTouches| list and |m_targets| within it,
|
| // sending TouchEvents to the targets as required.
|
| @@ -213,7 +221,7 @@ WebInputEventResult TouchEventManager::DispatchTouchEvents(
|
| for (const auto& event_target : changed_touches[state].targets_) {
|
| EventTarget* touch_event_target = event_target;
|
| TouchEvent* touch_event = TouchEvent::Create(
|
| - event, touches, touches_by_target.at(touch_event_target),
|
| + coalesced_event, touches, touches_by_target.at(touch_event_target),
|
| changed_touches[state].touches_.Get(), event_name,
|
| touch_event_target->ToNode()->GetDocument().domWindow(),
|
| current_touch_action_);
|
| @@ -505,6 +513,7 @@ bool TouchEventManager::ReHitTestTouchPointsIfNeeded(
|
|
|
| WebInputEventResult TouchEventManager::HandleTouchEvent(
|
| const WebTouchEvent& event,
|
| + const Vector<WebTouchEvent>& coalesced_events,
|
| HeapVector<TouchInfo>& touch_infos) {
|
| if (!ReHitTestTouchPointsIfNeeded(event, touch_infos))
|
| return WebInputEventResult::kNotHandled;
|
| @@ -517,7 +526,8 @@ WebInputEventResult TouchEventManager::HandleTouchEvent(
|
| all_touches_released = false;
|
| }
|
|
|
| - return DispatchTouchEvents(event, touch_infos, all_touches_released);
|
| + return DispatchTouchEvents(event, coalesced_events, touch_infos,
|
| + all_touches_released);
|
| }
|
|
|
| bool TouchEventManager::IsAnyTouchActive() const {
|
|
|