[Pointer Events] Removing the capture element prevents future pointer events from...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Aug 2019 16:55:31 +0000 (16:55 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 19 Aug 2019 16:55:31 +0000 (16:55 +0000)
commita1578311fef0fddf840263b9976e01c91b93b586
tree6c84e4796aa87bd2484f69b534ac09b317df3853
parent3c19a92d36ba5f9c8c2d240f694849755b66abd4
[Pointer Events] Removing the capture element prevents future pointer events from being dispatched on macOS
https://bugs.webkit.org/show_bug.cgi?id=200887
<rdar://problem/54104147>

Patch by Antoine Quint <graouts@apple.com> on 2019-08-19
Reviewed by Dean Jackson.

Source/WebCore:

Test: pointerevents/mouse/pointer-capture-element-removal.html

While we should only dispatch a lostpointercapture event to a connected element, clearing the capture element set on the frame's EventHandler
should always happen, regardless of the connected status of the previous capture element, since otherwise all future mouse and pointer events
would be targeted at the now-disconnected, former capture element.

* page/PointerCaptureController.cpp:
(WebCore::PointerCaptureController::processPendingPointerCapture):

LayoutTests:

* pointerevents/mouse/pointer-capture-element-removal-expected.txt: Added.
* pointerevents/mouse/pointer-capture-element-removal.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248855 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/pointerevents/mouse/pointer-capture-element-removal-expected.txt [new file with mode: 0644]
LayoutTests/pointerevents/mouse/pointer-capture-element-removal.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/PointerCaptureController.cpp