Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Unified Diff: third_party/WebKit/Source/core/input/PointerEventManager.cpp

Issue 2326653003: Conditional hittesting & sending boundary events for captured pointer events (Closed)
Patch Set: Fix double function call Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698