| Index: third_party/WebKit/Source/core/input/EventHandler.cpp
|
| diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| index e3cfaf7cb01c70fbe6631718c17cf2e5526dab3c..2d55c9a9186e2a92cadd07f3b028a6449366d764 100644
|
| --- a/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| +++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
|
| @@ -275,6 +275,7 @@ EventHandler::EventHandler(LocalFrame* frame)
|
| , m_activeIntervalTimer(this, &EventHandler::activeIntervalTimerFired)
|
| , m_lastShowPressTimestamp(0)
|
| , m_deltaConsumedForScrollSequence(false)
|
| + , m_waitingForFirstTouchMove(false)
|
| {
|
| }
|
|
|
| @@ -3654,6 +3655,14 @@ public:
|
| WebInputEventResult EventHandler::dispatchTouchEvents(const PlatformTouchEvent& event,
|
| HeapVector<TouchInfo>& touchInfos, bool freshTouchEvents, bool allTouchReleased)
|
| {
|
| + bool firstTouchMoveAfterTouchStart = false;
|
| + if (event.type() == PlatformEvent::TouchStart) {
|
| + m_waitingForFirstTouchMove = true;
|
| + } else if (event.type() == PlatformEvent::TouchMove) {
|
| + firstTouchMoveAfterTouchStart = m_waitingForFirstTouchMove;
|
| + m_waitingForFirstTouchMove = false;
|
| + }
|
| +
|
| // Build up the lists to use for the 'touches', 'targetTouches' and
|
| // 'changedTouches' attributes in the JS event. See
|
| // http://www.w3.org/TR/touch-events/#touchevent-interface for how these
|
| @@ -3738,7 +3747,7 @@ WebInputEventResult EventHandler::dispatchTouchEvents(const PlatformTouchEvent&
|
| RawPtr<TouchEvent> touchEvent = TouchEvent::create(
|
| touches.get(), touchesByTarget.get(touchEventTarget), changedTouches[state].m_touches.get(),
|
| eventName, touchEventTarget->toNode()->document().domWindow(),
|
| - event.getModifiers(), event.cancelable(), event.causesScrollingIfUncanceled(), event.timestamp());
|
| + event.getModifiers(), event.cancelable(), event.causesScrollingIfUncanceled(), firstTouchMoveAfterTouchStart, event.timestamp());
|
|
|
| eventResult = mergeEventResult(eventResult, toWebInputEventResult(touchEventTarget->dispatchEvent(touchEvent.get())));
|
| }
|
|
|