Source/WebCore:
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Apr 2019 21:31:00 +0000 (21:31 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 29 Apr 2019 21:31:00 +0000 (21:31 +0000)
commita94c739797c947c0850bf0d6bf86e60e62b674b7
tree4326f486b132ebab7a7610e45f02d947e146f87d
parentb58d18f2d0049a316ca214675f7b9c742d712dc2
Source/WebCore:
Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
https://bugs.webkit.org/show_bug.cgi?id=197347
<rdar://problem/49393423>

Reviewed by Wenson Hsieh.

Tests: fast/events/touch/ios/double-tap-for-double-click1.html
       fast/events/touch/ios/double-tap-for-double-click2.html

* page/Frame.h:
* page/ios/FrameIOS.mm:
(WebCore::Frame::nodeRespondingToDoubleClickEvent):

Source/WebKit:
[iOS] Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
https://bugs.webkit.org/show_bug.cgi?id=197347
<rdar://problem/49393423>

Reviewed by Wenson Hsieh.

This patch adds support for dispatching dblclick event as the result of the double tap gesture.

1. The new double tap gesture recognizer always fires regardless of what type of action the other, existing double gesture recognizers (double-tap to zoom) trigger.
2. The dblclick event is dispatched on the node with registered dblclick event handler unless the node prohibits double tap gesture (touch-action != auto).

* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView _doubleTapRecognizedForDoubleClick:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::handleDoubleTapForDoubleClickAtPoint):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleDoubleTapForDoubleClickAtPoint):

LayoutTests:
Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
https://bugs.webkit.org/show_bug.cgi?id=197347
<rdar://problem/49393423>

Reviewed by Wenson Hsieh.

* fast/events/touch/ios/double-tap-for-double-click1-expected.txt: Added.
* fast/events/touch/ios/double-tap-for-double-click1.html: Added.
* fast/events/touch/ios/double-tap-for-double-click2-expected.txt: Added.
* fast/events/touch/ios/double-tap-for-double-click2.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/events/touch/ios/double-tap-for-double-click1-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/double-tap-for-double-click1.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/double-tap-for-double-click2-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/double-tap-for-double-click2.html [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/double-tap-for-double-click3-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/double-tap-for-double-click3.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/page/Frame.h
Source/WebCore/page/ios/FrameIOS.mm
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/WebPageProxy.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.h
Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
Source/WebKit/WebProcess/WebPage/WebPage.h
Source/WebKit/WebProcess/WebPage/WebPage.messages.in
Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm