Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Apr 2015 18:31:00 +0000 (18:31 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Apr 2015 18:31:00 +0000 (18:31 +0000)
commit1efa4fb6452de8359a1372a80f408053c2d85bef
treeefc42f6859815d3be0d2bcd9819e2a38d6bdeb9f
parentf145439175ab3ddeb6f56f96258462e7a268a952
Provide a mechanism through the legacy SPI to know when swipe gestures begin and end
https://bugs.webkit.org/show_bug.cgi?id=143740
<rdar://problem/20468540>

Reviewed by Dan Bernstein.

In the C SPI, add three WKPageLoaderClient callbacks for the three
navigation gesture events (did begin, will end, did end).

* UIProcess/API/C/WKPageLoaderClient.h:
Add the callbacks.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::navigationGestureDidBegin):
(API::LoaderClient::navigationGestureWillEnd):
(API::LoaderClient::navigationGestureDidEnd):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::navigationGestureDidBegin):
(WebKit::WebPageProxy::navigationGestureWillEnd):
(WebKit::WebPageProxy::navigationGestureDidEnd):
Dispatch navigation gesture events to the loader client as well as
(after a bounce through the PageClient) the navigation delegate.

* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
Call the callbacks.

* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::trackSwipeGesture):
(WebKit::ViewGestureController::willEndSwipeGesture):
While we were already informing WebPageProxy of 'did begin' and 'did end'
navigation gesture events, we were missing 'will end'. Add it.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182897 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/APILoaderClient.h
Source/WebKit2/UIProcess/API/C/WKPage.cpp
Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/UIProcess/mac/ViewGestureController.h
Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm