releasePointerCapture() not working for implicit capture; can't opt-in to pointerente...
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Sep 2019 15:34:43 +0000 (15:34 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 21 Sep 2019 15:34:43 +0000 (15:34 +0000)
commit232cbe0aa16ee352dd22aa0b1b51377be9986e29
tree3bb8fb4c920f66b7145ffd399460ec316d186ece
parent6a2965889c9884c4c1aa8f64b5435b53c77bb9a1
releasePointerCapture() not working for implicit capture; can't opt-in to pointerenter/leave for touches
https://bugs.webkit.org/show_bug.cgi?id=199803
<rdar://problem/53127223>

Reviewed by Dean Jackson.

Source/WebCore:

In order to dispatch boundary events (pointerover/out/enter/leave) when the implicit pointer capture is released on iOS,
we need to track the target of the pointer events that was dispatched last for a given pointer id. Then we compare that
target with the current target when dispatching a new pointer event and determine whether we should dispatch boundary
events using the exact same approach used to dispatch mouse boundary events in EventHandler::updateMouseEventTargetNode().

Tests: pointerevents/ios/boundary-events-through-hierarchy-without-pointer-capture.html
       pointerevents/ios/boundary-events-without-pointer-capture.html

* page/PointerCaptureController.cpp:
(WebCore::hierarchyHasCapturingEventListeners):
(WebCore::PointerCaptureController::dispatchEventForTouchAtIndex):
(WebCore::PointerCaptureController::pointerEventWillBeDispatched):
(WebCore::PointerCaptureController::ensureCapturingDataForPointerEvent):
(WebCore::PointerCaptureController::cancelPointer):
* page/PointerCaptureController.h:

LayoutTests:

Add new tests that check we correctly dispatch boundary events on iOS when pointer capture is disabled.

* pointerevents/ios/boundary-events-through-hierarchy-without-pointer-capture-expected.txt: Added.
* pointerevents/ios/boundary-events-through-hierarchy-without-pointer-capture.html: Added.
* pointerevents/ios/boundary-events-without-pointer-capture-expected.txt: Added.
* pointerevents/ios/boundary-events-without-pointer-capture.html: Added.
* pointerevents/utils.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250182 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/pointerevents/ios/boundary-events-through-hierarchy-without-pointer-capture-expected.txt [new file with mode: 0644]
LayoutTests/pointerevents/ios/boundary-events-through-hierarchy-without-pointer-capture.html [new file with mode: 0644]
LayoutTests/pointerevents/ios/boundary-events-without-pointer-capture-expected.txt [new file with mode: 0644]
LayoutTests/pointerevents/ios/boundary-events-without-pointer-capture.html [new file with mode: 0644]
LayoutTests/pointerevents/utils.js
Source/WebCore/ChangeLog
Source/WebCore/page/PointerCaptureController.cpp
Source/WebCore/page/PointerCaptureController.h