[Pointer Events] isPrimary property of pointercancel events should match previous...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 May 2019 18:43:27 +0000 (18:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 7 May 2019 18:43:27 +0000 (18:43 +0000)
commit2115d89dd4247ce266fd505321ab400743bd30a4
tree6e591115daa19e635c98716f8b20c67238afa433
parentb41b21b46fad854b68f176a024b832ad4a6e73c7
[Pointer Events] isPrimary property of pointercancel events should match previous events for that pointer
https://bugs.webkit.org/show_bug.cgi?id=197665

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

LayoutTests/imported/w3c:

Record WPT progressions.

* web-platform-tests/pointerevents/pointerevent_pointercancel_touch-expected.txt:

Source/WebCore:

The test at web-platform-tests/pointerevents/pointerevent_pointercancel_touch.html would fail early because one of the first assertions
would check that isPrimary for a pointercancel event would match the isPrimary property of the previous pointer event dispatched for that
pointer id. This prevented many further assertions from passing and also was the cause of flakiness for the next test since this test was
ended early and the state of touches created using UIScriptController were not in a clean state.

We now track the isPrimary state for a given pointer using the CapturingData and use that value when dispatching a pointercancel event.

* dom/PointerEvent.cpp:
(WebCore::PointerEvent::create):
(WebCore::PointerEvent::PointerEvent):
* dom/PointerEvent.h:
* page/PointerCaptureController.cpp:
(WebCore::PointerCaptureController::pointerEventWasDispatched):
(WebCore::PointerCaptureController::cancelPointer):
* page/PointerCaptureController.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245020 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/pointerevents/pointerevent_pointercancel_touch-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/dom/PointerEvent.cpp
Source/WebCore/dom/PointerEvent.h
Source/WebCore/page/PointerCaptureController.cpp
Source/WebCore/page/PointerCaptureController.h