[iOS] When running layout tests that tap in the same location, subsequent tests fail...
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 May 2019 02:25:34 +0000 (02:25 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 May 2019 02:25:34 +0000 (02:25 +0000)
commit80cf22322a7b9fd2f441b6077dfac7e484816e2f
tree4b9ca2ac588ef65d1c33288465fdd11a1346ae01
parent0e9293b29bd3500137ce722c5473a5616d5d12e5
[iOS] When running layout tests that tap in the same location, subsequent tests fail to fire click handlers
https://bugs.webkit.org/show_bug.cgi?id=197821
<rdar://problem/50700512>

Reviewed by Tim Horton.

Source/WebKit:

After r244775, when running back-to-back layout tests on iOS that simulate taps in the same location, the double
tap gesture recognizer for recognizing double clicks ends up recognizing instead of the single tap gesture
recognizer in the subsequent test. This means that click handlers in the subsequent test will fail to recognize,
unless the element with the click handler is also accompanied by a dblclick handler.

To avoid this, we reset the double click gesture recognizer when navigating; this has the additional effect of
making it such that the second page doesn't end up observing a dblclick when the first click was only sent to
the first page.

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didStartProvisionalLoadForMainFrame):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView _didStartProvisionalLoadForMainFrame]):

LayoutTests:

Removes workarounds in a couple of existing layout tests.

* editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html:
* editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245268 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/selection/ios/clear-selection-after-tapping-on-element-with-no-click-handler.html
LayoutTests/editing/selection/ios/persist-selection-after-tapping-on-element-with-click-handler.html
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/ios/PageClientImplIOS.mm
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm