[iOS] Redundant pointer events causes material design buttons to flush twice
authorgraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Apr 2019 08:03:56 +0000 (08:03 +0000)
committergraouts@webkit.org <graouts@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 16 Apr 2019 08:03:56 +0000 (08:03 +0000)
commit5d6ec5395ae0afbc099f243671786bdf4b3b5532
tree4dcd5e7472c2d957c7c12da77c16aacd8aa65f1c
parent7ba36fd3c2eca2f799f1e29efaf132dbfe341418
[iOS] Redundant pointer events causes material design buttons to flush twice
https://bugs.webkit.org/show_bug.cgi?id=196914
<rdar://problem/49571860>

Reviewed by Dean Jackson.

Source/WebCore:

Test: pointerevents/ios/pointer-event-order.html

Do not dispatch pointer events for mouse events on iOS since we're already dispatching them when processing touch events.

* dom/Element.cpp:
(WebCore::Element::dispatchMouseEvent):

LayoutTests:

Add a new test that listens to all pointer event types as well as click, which forces the dispatch of compatibility mouse events
along with the click which would trigger duplicated pointer events prior to the source changes.

To ensure the new test added runs smoothly with a preceeding test that also uses ui.tap(), we add a delay to guarantee that no
double-taps are seen rather two successive single taps.

* pointerevents/ios/pointer-event-order-expected.txt: Added.
* pointerevents/ios/pointer-event-order.html: Added.
* pointerevents/utils.js:
(const.ui.new.UIController.prototype.tap):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/pointerevents/ios/pointer-event-order-expected.txt [new file with mode: 0644]
LayoutTests/pointerevents/ios/pointer-event-order.html [new file with mode: 0644]
LayoutTests/pointerevents/utils.js
Source/WebCore/ChangeLog
Source/WebCore/dom/Element.cpp