<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[182897] trunk/Source/WebKit2</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/182897">182897</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2015-04-16 11:31:00 -0700 (Thu, 16 Apr 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>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.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPILoaderClienth">trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPageLoaderClienth">trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacViewGestureControllerh">trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacViewGestureControllerMacmm">trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (182896 => 182897)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-04-16 18:25:00 UTC (rev 182896)
+++ trunk/Source/WebKit2/ChangeLog        2015-04-16 18:31:00 UTC (rev 182897)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2015-04-16 Timothy Horton <timothy_horton@apple.com>
+
+ 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.
+
</ins><span class="cx"> 2015-04-16 Tim Horton <timothy_horton@apple.com>
</span><span class="cx">
</span><span class="cx"> Dispatching multiple asynchronous animated resizes in parallel causes page scale to detach from reality
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPILoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h (182896 => 182897)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h        2015-04-16 18:25:00 UTC (rev 182896)
+++ trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h        2015-04-16 18:31:00 UTC (rev 182897)
</span><span class="lines">@@ -102,6 +102,10 @@
</span><span class="cx"> virtual void didPerformServerRedirect(WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
</span><span class="cx"> virtual void didUpdateHistoryTitle(WebKit::WebPageProxy&, const WTF::String&, const WTF::String&, WebKit::WebFrameProxy&) { }
</span><span class="cx">
</span><ins>+ virtual void navigationGestureDidBegin(WebKit::WebPageProxy&) { }
+ virtual void navigationGestureWillEnd(WebKit::WebPageProxy&, bool willNavigate, WebKit::WebBackForwardListItem&) { }
+ virtual void navigationGestureDidEnd(WebKit::WebPageProxy&, bool willNavigate, WebKit::WebBackForwardListItem&) { }
+
</ins><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> virtual WebKit::PluginModuleLoadPolicy pluginLoadPolicy(WebKit::WebPageProxy&, WebKit::PluginModuleLoadPolicy currentPluginLoadPolicy, API::Dictionary*, WTF::String& /* unavailabilityDescription */) { return currentPluginLoadPolicy; }
</span><span class="cx"> virtual void didFailToInitializePlugin(WebKit::WebPageProxy&, API::Dictionary*) { }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (182896 => 182897)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2015-04-16 18:25:00 UTC (rev 182896)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2015-04-16 18:31:00 UTC (rev 182897)
</span><span class="lines">@@ -83,7 +83,7 @@
</span><span class="cx">
</span><span class="cx"> namespace API {
</span><span class="cx"> template<> struct ClientTraits<WKPageLoaderClientBase> {
</span><del>- typedef std::tuple<WKPageLoaderClientV0, WKPageLoaderClientV1, WKPageLoaderClientV2, WKPageLoaderClientV3, WKPageLoaderClientV4, WKPageLoaderClientV5> Versions;
</del><ins>+ typedef std::tuple<WKPageLoaderClientV0, WKPageLoaderClientV1, WKPageLoaderClientV2, WKPageLoaderClientV3, WKPageLoaderClientV4, WKPageLoaderClientV5, WKPageLoaderClientV6> Versions;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> template<> struct ClientTraits<WKPageNavigationClientBase> {
</span><span class="lines">@@ -1138,6 +1138,24 @@
</span><span class="cx"> return page.process().processPool().client().copyWebCryptoMasterKey(&page.process().processPool());
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ virtual void navigationGestureDidBegin(WebPageProxy& page) override
+ {
+ if (m_client.navigationGestureDidBegin)
+ m_client.navigationGestureDidBegin(toAPI(&page), m_client.base.clientInfo);
+ }
+
+ virtual void navigationGestureWillEnd(WebPageProxy& page, bool willNavigate, WebBackForwardListItem& item) override
+ {
+ if (m_client.navigationGestureWillEnd)
+ m_client.navigationGestureWillEnd(toAPI(&page), willNavigate, toAPI(&item), m_client.base.clientInfo);
+ }
+
+ virtual void navigationGestureDidEnd(WebPageProxy& page, bool willNavigate, WebBackForwardListItem& item) override
+ {
+ if (m_client.navigationGestureDidEnd)
+ m_client.navigationGestureDidEnd(toAPI(&page), willNavigate, toAPI(&item), m_client.base.clientInfo);
+ }
+
</ins><span class="cx"> #if ENABLE(NETSCAPE_PLUGIN_API)
</span><span class="cx"> virtual void didFailToInitializePlugin(WebPageProxy& page, API::Dictionary* pluginInformation) override
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPageLoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h (182896 => 182897)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h        2015-04-16 18:25:00 UTC (rev 182896)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPageLoaderClient.h        2015-04-16 18:31:00 UTC (rev 182897)
</span><span class="lines">@@ -68,6 +68,9 @@
</span><span class="cx"> typedef WKPluginLoadPolicy (*WKPagePluginLoadPolicyCallback)(WKPageRef page, WKPluginLoadPolicy currentPluginLoadPolicy, WKDictionaryRef pluginInfoDictionary, WKStringRef* unavailabilityDescription, const void* clientInfo);
</span><span class="cx"> typedef void (*WKPagePluginDidFailCallback)(WKPageRef page, uint32_t errorCode, WKDictionaryRef pluginInfoDictionary, const void* clientInfo);
</span><span class="cx"> typedef WKWebGLLoadPolicy (*WKPageWebGLLoadPolicyCallback)(WKPageRef page, WKStringRef url, const void* clientInfo);
</span><ins>+typedef void (*WKPageNavigationGestureDidBeginCallback)(WKPageRef page, const void* clientInfo);
+typedef void (*WKPageNavigationGestureWillEndCallback)(WKPageRef page, bool willNavigate, WKBackForwardListItemRef item, const void* clientInfo);
+typedef void (*WKPageNavigationGestureDidEndCallback)(WKPageRef page, bool willNavigate, WKBackForwardListItemRef item, const void* clientInfo);
</ins><span class="cx">
</span><span class="cx"> // Deprecated
</span><span class="cx"> typedef void (*WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0)(WKPageRef page, WKStringRef mimeType, const void* clientInfo);
</span><span class="lines">@@ -391,6 +394,74 @@
</span><span class="cx"> WKPageShouldKeepCurrentBackForwardListItemInListCallback shouldKeepCurrentBackForwardListItemInList;
</span><span class="cx"> } WKPageLoaderClientV5;
</span><span class="cx">
</span><ins>+typedef struct WKPageLoaderClientV6 {
+ WKPageLoaderClientBase base;
+
+ // Version 0.
+ WKPageDidStartProvisionalLoadForFrameCallback didStartProvisionalLoadForFrame;
+ WKPageDidReceiveServerRedirectForProvisionalLoadForFrameCallback didReceiveServerRedirectForProvisionalLoadForFrame;
+ WKPageDidFailProvisionalLoadWithErrorForFrameCallback didFailProvisionalLoadWithErrorForFrame;
+ WKPageDidCommitLoadForFrameCallback didCommitLoadForFrame;
+ WKPageDidFinishDocumentLoadForFrameCallback didFinishDocumentLoadForFrame;
+ WKPageDidFinishLoadForFrameCallback didFinishLoadForFrame;
+ WKPageDidFailLoadWithErrorForFrameCallback didFailLoadWithErrorForFrame;
+ WKPageDidSameDocumentNavigationForFrameCallback didSameDocumentNavigationForFrame;
+ WKPageDidReceiveTitleForFrameCallback didReceiveTitleForFrame;
+ WKPageDidFirstLayoutForFrameCallback didFirstLayoutForFrame;
+ WKPageDidFirstVisuallyNonEmptyLayoutForFrameCallback didFirstVisuallyNonEmptyLayoutForFrame;
+ WKPageDidRemoveFrameFromHierarchyCallback didRemoveFrameFromHierarchy;
+ WKPageDidDisplayInsecureContentForFrameCallback didDisplayInsecureContentForFrame;
+ WKPageDidRunInsecureContentForFrameCallback didRunInsecureContentForFrame;
+ WKPageCanAuthenticateAgainstProtectionSpaceInFrameCallback canAuthenticateAgainstProtectionSpaceInFrame;
+ WKPageDidReceiveAuthenticationChallengeInFrameCallback didReceiveAuthenticationChallengeInFrame;
+
+ // FIXME: Move to progress client.
+ WKPageLoaderClientCallback didStartProgress;
+ WKPageLoaderClientCallback didChangeProgress;
+ WKPageLoaderClientCallback didFinishProgress;
+
+ // FIXME: These three functions should not be part of this client.
+ WKPageLoaderClientCallback processDidBecomeUnresponsive;
+ WKPageLoaderClientCallback processDidBecomeResponsive;
+ WKPageLoaderClientCallback processDidCrash;
+ WKPageDidChangeBackForwardListCallback didChangeBackForwardList;
+ WKPageShouldGoToBackForwardListItemCallback shouldGoToBackForwardListItem;
+ WKPageDidFailToInitializePluginCallback_deprecatedForUseWithV0 didFailToInitializePlugin_deprecatedForUseWithV0;
+
+ // Version 1.
+ WKPageDidDetectXSSForFrameCallback didDetectXSSForFrame;
+
+ void* didNewFirstVisuallyNonEmptyLayout_unavailable;
+
+ WKPageWillGoToBackForwardListItemCallback willGoToBackForwardListItem;
+
+ WKPageLoaderClientCallback interactionOccurredWhileProcessUnresponsive;
+ WKPagePluginDidFailCallback_deprecatedForUseWithV1 pluginDidFail_deprecatedForUseWithV1;
+
+ // Version 2.
+ void (*didReceiveIntentForFrame_unavailable)(void);
+ void (*registerIntentServiceForFrame_unavailable)(void);
+
+ WKPageDidLayoutCallback didLayout;
+ WKPagePluginLoadPolicyCallback_deprecatedForUseWithV2 pluginLoadPolicy_deprecatedForUseWithV2;
+ WKPagePluginDidFailCallback pluginDidFail;
+
+ // Version 3.
+ WKPagePluginLoadPolicyCallback pluginLoadPolicy;
+
+ // Version 4.
+ WKPageWebGLLoadPolicyCallback webGLLoadPolicy;
+ WKPageWebGLLoadPolicyCallback resolveWebGLLoadPolicy;
+
+ // Version 5.
+ WKPageShouldKeepCurrentBackForwardListItemInListCallback shouldKeepCurrentBackForwardListItemInList;
+
+ // Version 6.
+ WKPageNavigationGestureDidBeginCallback navigationGestureDidBegin;
+ WKPageNavigationGestureWillEndCallback navigationGestureWillEnd;
+ WKPageNavigationGestureDidEndCallback navigationGestureDidEnd;
+} WKPageLoaderClientV6;
+
</ins><span class="cx"> // FIXME: These should be deprecated.
</span><span class="cx"> enum { kWKPageLoaderClientCurrentVersion WK_ENUM_DEPRECATED("Use an explicit version number instead") = 3 };
</span><span class="cx"> typedef struct WKPageLoaderClient {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (182896 => 182897)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-04-16 18:25:00 UTC (rev 182896)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-04-16 18:31:00 UTC (rev 182897)
</span><span class="lines">@@ -5618,16 +5618,19 @@
</span><span class="cx"> {
</span><span class="cx"> m_isShowingNavigationGestureSnapshot = true;
</span><span class="cx"> m_pageClient.navigationGestureDidBegin();
</span><ins>+ m_loaderClient->navigationGestureDidBegin(*this);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem& item)
</span><span class="cx"> {
</span><span class="cx"> m_pageClient.navigationGestureWillEnd(willNavigate, item);
</span><ins>+ m_loaderClient->navigationGestureWillEnd(*this, willNavigate, item);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem& item)
</span><span class="cx"> {
</span><span class="cx"> m_pageClient.navigationGestureDidEnd(willNavigate, item);
</span><ins>+ m_loaderClient->navigationGestureDidEnd(*this, willNavigate, item);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::willRecordNavigationSnapshot(WebBackForwardListItem& item)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacViewGestureControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h (182896 => 182897)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h        2015-04-16 18:25:00 UTC (rev 182896)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureController.h        2015-04-16 18:31:00 UTC (rev 182897)
</span><span class="lines">@@ -146,6 +146,7 @@
</span><span class="cx"> void trackSwipeGesture(NSEvent *, SwipeDirection);
</span><span class="cx"> void beginSwipeGesture(WebBackForwardListItem* targetItem, SwipeDirection);
</span><span class="cx"> void handleSwipeGesture(WebBackForwardListItem* targetItem, double progress, SwipeDirection);
</span><ins>+ void willEndSwipeGesture(WebBackForwardListItem& targetItem, bool cancelled);
</ins><span class="cx"> void endSwipeGesture(WebBackForwardListItem* targetItem, bool cancelled);
</span><span class="cx"> bool deltaIsSufficientToBeginSwipe(NSEvent *);
</span><span class="cx"> bool scrollEventCanBecomeSwipe(NSEvent *, SwipeDirection&);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacViewGestureControllerMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm (182896 => 182897)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm        2015-04-16 18:25:00 UTC (rev 182896)
+++ trunk/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm        2015-04-16 18:31:00 UTC (rev 182897)
</span><span class="lines">@@ -417,11 +417,18 @@
</span><span class="cx"> this->handleSwipeGesture(targetItem.get(), clampedProgress, direction);
</span><span class="cx"> if (phase == NSEventPhaseCancelled)
</span><span class="cx"> swipeCancelled = true;
</span><ins>+ if (phase == NSEventPhaseEnded || phase == NSEventPhaseCancelled)
+ this->willEndSwipeGesture(*targetItem, swipeCancelled);
</ins><span class="cx"> if (isComplete)
</span><span class="cx"> this->endSwipeGesture(targetItem.get(), swipeCancelled);
</span><span class="cx"> }];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void ViewGestureController::willEndSwipeGesture(WebBackForwardListItem& targetItem, bool cancelled)
+{
+ m_webPageProxy.navigationGestureWillEnd(!cancelled, targetItem);
+}
+
</ins><span class="cx"> FloatRect ViewGestureController::windowRelativeBoundsForCustomSwipeViews() const
</span><span class="cx"> {
</span><span class="cx"> FloatRect swipeArea;
</span></span></pre>
</div>
</div>
</body>
</html>