<!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>[173094] branches/safari-600.1-branch/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/173094">173094</a></dd>
<dt>Author</dt> <dd>lforschler@apple.com</dd>
<dt>Date</dt> <dd>2014-08-28 17:09:46 -0700 (Thu, 28 Aug 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/173040">r173040</a>.  rdar://problem/18105827</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6001branchSourceWebKit2ChangeLog">branches/safari-600.1-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessAPICocoaWKViewPrivateh">branches/safari-600.1-branch/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessAPImacWKViewmm">branches/safari-600.1-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessPageClienth">branches/safari-600.1-branch/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessmacPageClientImplh">branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessmacPageClientImplmm">branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessmacViewGestureControllerh">branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureController.h</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessmacViewGestureControllerMacmm">branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessmacWebPageProxyMacmm">branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6001branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/ChangeLog (173093 => 173094)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/ChangeLog        2014-08-29 00:01:39 UTC (rev 173093)
+++ branches/safari-600.1-branch/Source/WebKit2/ChangeLog        2014-08-29 00:09:46 UTC (rev 173094)
</span><span class="lines">@@ -1,5 +1,47 @@
</span><span class="cx"> 2014-08-28  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r173040
+
+    2014-08-27  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+            WebKit2 swipe gesture should report the position of the snapshot to the client
+            https://bugs.webkit.org/show_bug.cgi?id=136308
+            rdar://problem/18105827
+
+            Reviewed by Simon Fraser.
+
+            * UIProcess/API/Cocoa/WKViewPrivate.h:
+            * UIProcess/API/mac/WKView.mm:
+            (-[WKView _setDidMoveSwipeSnapshotCallback:]):
+            Add _setDidMoveSwipeSnapshotCallback, and plumb it to ViewGestureController.
+            Callers provide a block which is called whenever ViewGestureController moves the
+            swipe *snapshot* layer around.
+
+            * UIProcess/PageClient.h:
+            * UIProcess/WebPageProxy.h:
+            * UIProcess/mac/PageClientImpl.h:
+            * UIProcess/mac/PageClientImpl.mm:
+            (WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
+            * UIProcess/mac/WebPageProxyMac.mm:
+            (WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates):
+            Expose a Mac-only way to get the bounds of a given CALayer in window coordinates,
+            respecting transforms. This only works for layer-backed windows because
+            it uses CA in order to do the mapping respecting transforms.
+
+            * UIProcess/mac/ViewGestureController.h:
+            * UIProcess/mac/ViewGestureControllerMac.mm:
+            (WebKit::ViewGestureController::ViewGestureController):
+            (WebKit::ViewGestureController::~ViewGestureController):
+            (WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
+            Do the Block_copy and Block_release dance to keep our copy of the callback block.
+
+            (WebKit::ViewGestureController::beginSwipeGesture):
+            (WebKit::ViewGestureController::handleSwipeGesture):
+            (WebKit::ViewGestureController::didMoveSwipeSnapshotLayer):
+            When the swipe snapshot layer moves around, call the block.
+
+2014-08-28  Lucas Forschler  &lt;lforschler@apple.com&gt;
+
</ins><span class="cx">         Merge r173029
</span><span class="cx"> 
</span><span class="cx">     2014-08-27  Tim Horton  &lt;timothy_horton@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessAPICocoaWKViewPrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h (173093 => 173094)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h        2014-08-29 00:01:39 UTC (rev 173093)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/API/Cocoa/WKViewPrivate.h        2014-08-29 00:09:46 UTC (rev 173094)
</span><span class="lines">@@ -113,6 +113,8 @@
</span><span class="cx"> // The top content inset is applied in the window's coordinate space, to the union of the custom swipe view's frames.
</span><span class="cx"> - (void)_setCustomSwipeViewsTopContentInset:(float)topContentInset;
</span><span class="cx"> - (BOOL)_tryToSwipeWithEvent:(NSEvent *)event ignoringPinnedState:(BOOL)ignoringPinnedState;
</span><ins>+// The rect returned is always that of the snapshot, not necessarily the swiping layer. This only works for layer-backed windows.
+- (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect swipeSnapshotRectInWindowCoordinates))callback;
</ins><span class="cx"> 
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm (173093 => 173094)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-08-29 00:01:39 UTC (rev 173093)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/API/mac/WKView.mm        2014-08-29 00:09:46 UTC (rev 173094)
</span><span class="lines">@@ -4080,6 +4080,15 @@
</span><span class="cx">     return handledEvent;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)_setDidMoveSwipeSnapshotCallback:(void(^)(CGRect))callback
+{
+    if (!_data-&gt;_allowsBackForwardNavigationGestures)
+        return;
+
+    [self _ensureGestureController];
+    _data-&gt;_gestureController-&gt;setDidMoveSwipeSnapshotCallback(callback);
+}
+
</ins><span class="cx"> #if __MAC_OS_X_VERSION_MIN_REQUIRED &gt;= 101000
</span><span class="cx"> 
</span><span class="cx"> - (void)_setAutomaticallyAdjustsContentInsets:(BOOL)automaticallyAdjustsContentInsets
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/PageClient.h (173093 => 173094)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/PageClient.h        2014-08-29 00:01:39 UTC (rev 173093)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/PageClient.h        2014-08-29 00:09:46 UTC (rev 173094)
</span><span class="lines">@@ -231,6 +231,8 @@
</span><span class="cx">     virtual void recommendedScrollbarStyleDidChange(int32_t newStyle) = 0;
</span><span class="cx">     virtual void removeNavigationGestureSnapshot() = 0;
</span><span class="cx"> 
</span><ins>+    virtual CGRect boundsOfLayerInLayerBackedWindowCoordinates(CALayer *) const = 0;
+
</ins><span class="cx">     virtual ColorSpaceData colorSpace() = 0;
</span><span class="cx"> 
</span><span class="cx"> #if USE(APPKIT)
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebPageProxy.h (173093 => 173094)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2014-08-29 00:01:39 UTC (rev 173093)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2014-08-29 00:09:46 UTC (rev 173094)
</span><span class="lines">@@ -509,6 +509,7 @@
</span><span class="cx"> 
</span><span class="cx">     WKView* wkView() const;
</span><span class="cx">     void intrinsicContentSizeDidChange(const WebCore::IntSize&amp; intrinsicContentSize);
</span><ins>+    CGRect boundsOfLayerInLayerBackedWindowCoordinates(CALayer *) const;
</ins><span class="cx"> #endif
</span><span class="cx"> #endif // PLATFORM(COCOA)
</span><span class="cx"> #if PLATFORM(EFL)
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h (173093 => 173094)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2014-08-29 00:01:39 UTC (rev 173093)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2014-08-29 00:09:46 UTC (rev 173094)
</span><span class="lines">@@ -108,7 +108,9 @@
</span><span class="cx">     virtual WebCore::IntPoint accessibilityScreenToRootView(const WebCore::IntPoint&amp;) = 0;
</span><span class="cx">     virtual WebCore::IntRect rootViewToAccessibilityScreen(const WebCore::IntRect&amp;) = 0;
</span><span class="cx"> #endif
</span><del>-        
</del><ins>+
+    CGRect boundsOfLayerInLayerBackedWindowCoordinates(CALayer *layer) const;
+
</ins><span class="cx">     virtual void doneWithKeyEvent(const NativeWebKeyboardEvent&amp;, bool wasEventHandled);
</span><span class="cx"> 
</span><span class="cx">     virtual PassRefPtr&lt;WebPopupMenuProxy&gt; createPopupMenuProxy(WebPageProxy*);
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (173093 => 173094)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2014-08-29 00:01:39 UTC (rev 173093)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2014-08-29 00:09:46 UTC (rev 173094)
</span><span class="lines">@@ -742,6 +742,14 @@
</span><span class="cx">     [m_wkView _removeNavigationGestureSnapshot];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+CGRect PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates(CALayer *layer) const
+{
+    CALayer *windowContentLayer = static_cast&lt;NSView *&gt;(m_wkView.window.contentView).layer;
+    ASSERT(windowContentLayer);
+
+    return [windowContentLayer convertRect:layer.bounds fromLayer:layer];
+}
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(MAC)
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessmacViewGestureControllerh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureController.h (173093 => 173094)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureController.h        2014-08-29 00:01:39 UTC (rev 173093)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureController.h        2014-08-29 00:09:46 UTC (rev 173094)
</span><span class="lines">@@ -100,6 +100,7 @@
</span><span class="cx">     void setCustomSwipeViews(Vector&lt;RetainPtr&lt;NSView&gt;&gt; views) { m_customSwipeViews = WTF::move(views); }
</span><span class="cx">     void setCustomSwipeViewsTopContentInset(float topContentInset) { m_customSwipeViewsTopContentInset = topContentInset; }
</span><span class="cx">     WebCore::FloatRect windowRelativeBoundsForCustomSwipeViews() const;
</span><ins>+    void setDidMoveSwipeSnapshotCallback(void(^)(CGRect));
</ins><span class="cx"> 
</span><span class="cx">     void endActiveGesture();
</span><span class="cx"> 
</span><span class="lines">@@ -148,6 +149,7 @@
</span><span class="cx">     CALayer *determineSnapshotLayerParent() const;
</span><span class="cx">     CALayer *determineLayerAdjacentToSnapshotForParent(SwipeDirection, CALayer *snapshotLayerParent) const;
</span><span class="cx">     void applyDebuggingPropertiesToSwipeViews();
</span><ins>+    void didMoveSwipeSnapshotLayer();
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     WebPageProxy&amp; m_webPageProxy;
</span><span class="lines">@@ -189,6 +191,8 @@
</span><span class="cx">     SwipeDirection m_pendingSwipeDirection;
</span><span class="cx">     WebCore::FloatSize m_cumulativeDeltaForPendingSwipe;
</span><span class="cx"> 
</span><ins>+    void (^m_didMoveSwipeSnapshotCallback)(CGRect);
+
</ins><span class="cx">     bool m_shouldIgnorePinnedState;
</span><span class="cx"> 
</span><span class="cx">     bool m_swipeWaitingForVisuallyNonEmptyLayout;
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessmacViewGestureControllerMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm (173093 => 173094)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm        2014-08-29 00:01:39 UTC (rev 173093)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/ViewGestureControllerMac.mm        2014-08-29 00:09:46 UTC (rev 173094)
</span><span class="lines">@@ -106,6 +106,7 @@
</span><span class="cx">     , m_swipeTransitionStyle(SwipeTransitionStyle::Overlap)
</span><span class="cx">     , m_customSwipeViewsTopContentInset(0)
</span><span class="cx">     , m_pendingSwipeReason(PendingSwipeReason::None)
</span><ins>+    , m_didMoveSwipeSnapshotCallback(nullptr)
</ins><span class="cx">     , m_shouldIgnorePinnedState(false)
</span><span class="cx">     , m_swipeWaitingForVisuallyNonEmptyLayout(false)
</span><span class="cx">     , m_swipeWaitingForRenderTreeSizeThreshold(false)
</span><span class="lines">@@ -123,6 +124,11 @@
</span><span class="cx">     if (m_activeGestureType == ViewGestureType::Swipe)
</span><span class="cx">         removeSwipeSnapshot();
</span><span class="cx"> 
</span><ins>+    if (m_didMoveSwipeSnapshotCallback) {
+        Block_release(m_didMoveSwipeSnapshotCallback);
+        m_didMoveSwipeSnapshotCallback = nullptr;
+    }
+
</ins><span class="cx">     m_webPageProxy.process().removeMessageReceiver(Messages::ViewGestureController::messageReceiverName(), m_webPageProxy.pageID());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -315,6 +321,13 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ViewGestureController::setDidMoveSwipeSnapshotCallback(void(^callback)(CGRect))
+{
+    if (m_didMoveSwipeSnapshotCallback)
+        Block_release(m_didMoveSwipeSnapshotCallback);
+    m_didMoveSwipeSnapshotCallback = Block_copy(callback);
+}
+
</ins><span class="cx"> bool ViewGestureController::handleScrollWheelEvent(NSEvent *event)
</span><span class="cx"> {
</span><span class="cx">     if (event.phase == NSEventPhaseEnded) {
</span><span class="lines">@@ -595,6 +608,8 @@
</span><span class="cx">         [snapshotLayerParent insertSublayer:m_swipeLayer.get() below:layerAdjacentToSnapshot];
</span><span class="cx">     else
</span><span class="cx">         [snapshotLayerParent insertSublayer:m_swipeLayer.get() above:layerAdjacentToSnapshot];
</span><ins>+
+    didMoveSwipeSnapshotLayer();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ViewGestureController::handleSwipeGesture(WebBackForwardListItem* targetItem, double progress, SwipeDirection direction)
</span><span class="lines">@@ -613,8 +628,10 @@
</span><span class="cx">     double swipingLayerOffset = floor(width * progress);
</span><span class="cx"> 
</span><span class="cx">     if (m_swipeTransitionStyle == SwipeTransitionStyle::Overlap) {
</span><del>-        if (direction == SwipeDirection::Right)
</del><ins>+        if (direction == SwipeDirection::Right) {
</ins><span class="cx">             [m_swipeLayer setTransform:CATransform3DMakeTranslation(width + swipingLayerOffset, 0, 0)];
</span><ins>+            didMoveSwipeSnapshotLayer();
+        }
</ins><span class="cx">     } else if (m_swipeTransitionStyle == SwipeTransitionStyle::Push)
</span><span class="cx">         [m_swipeLayer setTransform:CATransform3DMakeTranslation((direction == SwipeDirection::Left ? -width : width) + swipingLayerOffset, 0, 0)];
</span><span class="cx"> 
</span><span class="lines">@@ -627,6 +644,14 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void ViewGestureController::didMoveSwipeSnapshotLayer()
+{
+    if (!m_didMoveSwipeSnapshotCallback)
+        return;
+
+    m_didMoveSwipeSnapshotCallback(m_webPageProxy.boundsOfLayerInLayerBackedWindowCoordinates(m_swipeLayer.get()));
+}
+
</ins><span class="cx"> void ViewGestureController::endSwipeGesture(WebBackForwardListItem* targetItem, bool cancelled)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(m_activeGestureType == ViewGestureType::Swipe);
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessmacWebPageProxyMacmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm (173093 => 173094)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2014-08-29 00:01:39 UTC (rev 173093)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm        2014-08-29 00:09:46 UTC (rev 173094)
</span><span class="lines">@@ -663,6 +663,11 @@
</span><span class="cx"> }
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><ins>+CGRect WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates(CALayer *layer) const
+{
+    return m_pageClient.boundsOfLayerInLayerBackedWindowCoordinates(layer);
+}
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #endif // PLATFORM(MAC)
</span></span></pre>
</div>
</div>

</body>
</html>