| Index: third_party/WebKit/Source/core/input/PointerEventManager.cpp
|
| diff --git a/third_party/WebKit/Source/core/input/PointerEventManager.cpp b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
|
| index 18f769bc12a1f7a230b1a72564ee5d278e417746..d6d452f8d44fe95c171f0237ece83568b6541477 100644
|
| --- a/third_party/WebKit/Source/core/input/PointerEventManager.cpp
|
| +++ b/third_party/WebKit/Source/core/input/PointerEventManager.cpp
|
| @@ -180,6 +180,18 @@ void PointerEventManager::sendBoundaryEvents(
|
| EventTarget* enteredTarget,
|
| PointerEvent* pointerEvent)
|
| {
|
| + if (RuntimeEnabledFeatures::pointerEventV1SpecCapturingEnabled()) {
|
| + if (exitedTarget == enteredTarget)
|
| + return;
|
| + if (EventTarget* capturingTarget = getCapturingNode(pointerEvent->pointerId())) {
|
| + if (capturingTarget == exitedTarget)
|
| + enteredTarget = nullptr;
|
| + else if (capturingTarget == enteredTarget)
|
| + exitedTarget = nullptr;
|
| + else
|
| + return;
|
| + }
|
| + }
|
| PointerEventBoundaryEventDispatcher boundaryEventDispatcher(this, pointerEvent);
|
| boundaryEventDispatcher.sendBoundaryEvents(exitedTarget, enteredTarget);
|
| }
|
| @@ -290,7 +302,8 @@ void PointerEventManager::dispatchTouchPointerEvents(
|
| // that will be capturing this event. |m_pointerCaptureTarget| may not
|
| // have this target yet since the processing of that will be done right
|
| // before firing the event.
|
| - if (touchInfo.point.state() == PlatformTouchPoint::TouchPressed
|
| + if (RuntimeEnabledFeatures::pointerEventV1SpecCapturingEnabled()
|
| + || touchInfo.point.state() == PlatformTouchPoint::TouchPressed
|
| || !m_pendingPointerCaptureTarget.contains(pointerId)) {
|
| HitTestRequest::HitTestRequestType hitType = HitTestRequest::TouchEvent | HitTestRequest::ReadOnly | HitTestRequest::Active;
|
| LayoutPoint pagePoint = roundedLayoutPoint(m_frame->view()->rootFrameToContents(touchInfo.point.pos()));
|
| @@ -523,9 +536,11 @@ EventTarget* PointerEventManager::processCaptureAndPositionOfPointerEvent(
|
| if (setPointerPosition) {
|
| processPendingPointerCapture(pointerEvent);
|
|
|
| - PointerCapturingMap::const_iterator it = m_pointerCaptureTarget.find(pointerEvent->pointerId());
|
| - if (EventTarget* pointercaptureTarget = (it != m_pointerCaptureTarget.end()) ? it->value : nullptr)
|
| - hitTestTarget = pointercaptureTarget;
|
| + if (!RuntimeEnabledFeatures::pointerEventV1SpecCapturingEnabled()) {
|
| + PointerCapturingMap::const_iterator it = m_pointerCaptureTarget.find(pointerEvent->pointerId());
|
| + if (EventTarget* pointercaptureTarget = (it != m_pointerCaptureTarget.end()) ? it->value : nullptr)
|
| + hitTestTarget = pointercaptureTarget;
|
| + }
|
|
|
| setNodeUnderPointer(pointerEvent, hitTestTarget);
|
| }
|
|
|