<!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>[185972] trunk/Source</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/185972">185972</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2015-06-25 17:29:58 -0700 (Thu, 25 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>[iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
https://bugs.webkit.org/show_bug.cgi?id=146329
rdar://problem/21233010

Reviewed by Tim Horton.
Source/WebCore:

Have the Compositing log channel dump the visible rect used for layer flushing.

* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):

Source/WebKit2:

When doing a back swipe, views interposed between the WKWebView and the WKContentView
get positions and animations for the swipe. This -_updateVisibleContentRects to
compute bad visible and unobscured rects, so we lose tiles.

Fix by &quot;freezing&quot; the visible and unobscured content rects in the view being
swiped for the duration of the navigation gesture. When swiping the main view,
we just plumb through navigationGestureDidEnd(). When Reader is showing and the
swiped view is different from the navigating view, use the new navigationGestureDidEnd()
override which takes no arguments.

* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _navigationGestureDidBegin]):
(-[WKWebView _navigationGestureDidEnd]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::navigationGestureDidEnd):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::navigationGestureDidEnd):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin):
(WebKit::PageClientImpl::navigationGestureDidEnd):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::navigationGestureDidEnd):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewInternalh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkPageClientImplcpp">trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIgtkPageClientImplh">trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCoordinatedGraphicsWebViewh">trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessPageClienth">trunk/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSh">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosViewGestureControllerIOSmm">trunk/Source/WebKit2/UIProcess/ios/ViewGestureControllerIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplh">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacPageClientImplmm">trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebCore/ChangeLog        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2015-06-25  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        [iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
+        https://bugs.webkit.org/show_bug.cgi?id=146329
+        rdar://problem/21233010
+
+        Reviewed by Tim Horton.
+
+        Have the Compositing log channel dump the visible rect used for layer flushing.
+
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+
</ins><span class="cx"> 2015-06-25  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WIN] Enable WEB_TIMING API
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -467,12 +467,18 @@
</span><span class="cx"> 
</span><span class="cx">     if (GraphicsLayer* rootLayer = rootGraphicsLayer()) {
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-        rootLayer-&gt;flushCompositingState(frameView.exposedContentRect());
</del><ins>+        FloatRect exposedRect = frameView.exposedContentRect();
+        LOG(Compositing, &quot;RenderLayerCompositor %p flushPendingLayerChanges(%d) %.2f, %.2f, %.2fx%.2f&quot;, this, isFlushRoot,
+            exposedRect.x(), exposedRect.y(), exposedRect.width(), exposedRect.height());
+        rootLayer-&gt;flushCompositingState(exposedRect);
</ins><span class="cx"> #else
</span><span class="cx">         // Having a m_clipLayer indicates that we're doing scrolling via GraphicsLayers.
</span><span class="cx">         IntRect visibleRect = m_clipLayer ? IntRect(IntPoint(), frameView.unscaledVisibleContentSizeIncludingObscuredArea()) : frameView.visibleContentRect();
</span><span class="cx">         if (!frameView.exposedRect().isInfinite())
</span><span class="cx">             visibleRect.intersect(IntRect(frameView.exposedRect()));
</span><ins>+
+        LOG(Compositing, &quot;RenderLayerCompositor %p flushPendingLayerChanges(%d) %d, %d, %dx%d&quot;, this, isFlushRoot,
+            visibleRect.x(), visibleRect.y(), visibleRect.width(), visibleRect.height());
</ins><span class="cx">         rootLayer-&gt;flushCompositingState(visibleRect);
</span><span class="cx"> #endif
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/ChangeLog        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -1,3 +1,45 @@
</span><ins>+2015-06-25  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        [iOS WK2] Swiping back just after scrolling can cause some tiles to disappear
+        https://bugs.webkit.org/show_bug.cgi?id=146329
+        rdar://problem/21233010
+
+        Reviewed by Tim Horton.
+        
+        When doing a back swipe, views interposed between the WKWebView and the WKContentView
+        get positions and animations for the swipe. This -_updateVisibleContentRects to
+        compute bad visible and unobscured rects, so we lose tiles.
+        
+        Fix by &quot;freezing&quot; the visible and unobscured content rects in the view being
+        swiped for the duration of the navigation gesture. When swiping the main view,
+        we just plumb through navigationGestureDidEnd(). When Reader is showing and the
+        swiped view is different from the navigating view, use the new navigationGestureDidEnd()
+        override which takes no arguments.
+
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _updateVisibleContentRects]):
+        (-[WKWebView _navigationGestureDidBegin]):
+        (-[WKWebView _navigationGestureDidEnd]):
+        * UIProcess/API/Cocoa/WKWebViewInternal.h:
+        * UIProcess/API/gtk/PageClientImpl.cpp:
+        (WebKit::PageClientImpl::navigationGestureDidEnd):
+        * UIProcess/API/gtk/PageClientImpl.h:
+        * UIProcess/CoordinatedGraphics/WebView.h:
+        * UIProcess/PageClient.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::navigationGestureDidEnd):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/ios/PageClientImplIOS.h:
+        * UIProcess/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::navigationGestureDidBegin):
+        (WebKit::PageClientImpl::navigationGestureDidEnd):
+        * UIProcess/ios/ViewGestureControllerIOS.mm:
+        (WebKit::ViewGestureController::beginSwipeGesture):
+        (WebKit::ViewGestureController::endSwipeGesture):
+        * UIProcess/mac/PageClientImpl.h:
+        * UIProcess/mac/PageClientImpl.mm:
+        (WebKit::PageClientImpl::navigationGestureDidEnd):
+
</ins><span class="cx"> 2015-06-25  Joseph Pecoraro  &lt;pecoraro@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Mac] Web Inspector: Window dragging on toolbar should behave more like native window dragging
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -83,6 +83,7 @@
</span><span class="cx"> #import &lt;wtf/HashMap.h&gt;
</span><span class="cx"> #import &lt;wtf/MathExtras.h&gt;
</span><span class="cx"> #import &lt;wtf/NeverDestroyed.h&gt;
</span><ins>+#import &lt;wtf/Optional.h&gt;
</ins><span class="cx"> #import &lt;wtf/RetainPtr.h&gt;
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="lines">@@ -189,6 +190,8 @@
</span><span class="cx">     uint64_t _resizeAnimationTransformTransactionID;
</span><span class="cx">     RetainPtr&lt;UIView&gt; _resizeAnimationView;
</span><span class="cx">     CGFloat _lastAdjustmentForScroller;
</span><ins>+    Optional&lt;CGRect&gt; _frozenVisibleContentRect;
+    Optional&lt;CGRect&gt; _frozenUnobscuredContentRect;
</ins><span class="cx"> 
</span><span class="cx">     BOOL _needsToRestoreExposedRect;
</span><span class="cx">     WebCore::FloatRect _exposedRectToRestore;
</span><span class="lines">@@ -1559,10 +1562,10 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     CGRect fullViewRect = self.bounds;
</span><del>-    CGRect visibleRectInContentCoordinates = [self convertRect:fullViewRect toView:_contentView.get()];
</del><ins>+    CGRect visibleRectInContentCoordinates = _frozenVisibleContentRect ? _frozenVisibleContentRect.value() : [self convertRect:fullViewRect toView:_contentView.get()];
</ins><span class="cx"> 
</span><span class="cx">     CGRect unobscuredRect = UIEdgeInsetsInsetRect(fullViewRect, [self _computedContentInset]);
</span><del>-    CGRect unobscuredRectInContentCoordinates = [self convertRect:unobscuredRect toView:_contentView.get()];
</del><ins>+    CGRect unobscuredRectInContentCoordinates = _frozenUnobscuredContentRect ? _frozenUnobscuredContentRect.value() : [self convertRect:unobscuredRect toView:_contentView.get()];
</ins><span class="cx"> 
</span><span class="cx">     CGFloat scaleFactor = contentZoomScale(self);
</span><span class="cx"> 
</span><span class="lines">@@ -1710,8 +1713,26 @@
</span><span class="cx">     return _allowsBackForwardNavigationGestures;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#endif
</del><ins>+- (void)_navigationGestureDidBegin
+{
+    // During a back/forward swipe, there's a view interposed between this view and the content view that has
+    // an offset and animation on it, which results in computing incorrect rectangles. Work around by using
+    // frozen rects during swipes.
+    CGRect fullViewRect = self.bounds;
+    CGRect unobscuredRect = UIEdgeInsetsInsetRect(fullViewRect, [self _computedContentInset]);
</ins><span class="cx"> 
</span><ins>+    _frozenVisibleContentRect = [self convertRect:fullViewRect toView:_contentView.get()];
+    _frozenUnobscuredContentRect = [self convertRect:unobscuredRect toView:_contentView.get()];
+}
+
+- (void)_navigationGestureDidEnd
+{
+    _frozenVisibleContentRect = Nullopt;
+    _frozenUnobscuredContentRect = Nullopt;
+}
+
+#endif // PLATFORM(IOS)
+
</ins><span class="cx"> #pragma mark OS X-specific methods
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="lines">@@ -1800,7 +1821,7 @@
</span><span class="cx"> {
</span><span class="cx">     return [_wkView performDragOperation:sender];
</span><span class="cx"> }
</span><del>-#endif
</del><ins>+#endif // PLATFORM(MAC)
</ins><span class="cx"> 
</span><span class="cx"> @end
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -103,6 +103,9 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_updateScrollViewBackground;
</span><span class="cx"> 
</span><ins>+- (void)_navigationGestureDidBegin;
+- (void)_navigationGestureDidEnd;
+
</ins><span class="cx"> @property (nonatomic, readonly) UIEdgeInsets _computedContentInset;
</span><span class="cx"> #else
</span><span class="cx"> @property (nonatomic, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkPageClientImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.cpp        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -410,6 +410,10 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void PageClientImpl::navigationGestureDidEnd()
+{
+}
+
</ins><span class="cx"> void PageClientImpl::willRecordNavigationSnapshot(WebBackForwardListItem&amp;)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIgtkPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/API/gtk/PageClientImpl.h        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -122,6 +122,7 @@
</span><span class="cx">     virtual void navigationGestureDidBegin() override;
</span><span class="cx">     virtual void navigationGestureWillEnd(bool, WebBackForwardListItem&amp;) override;
</span><span class="cx">     virtual void navigationGestureDidEnd(bool, WebBackForwardListItem&amp;) override;
</span><ins>+    virtual void navigationGestureDidEnd() override;
</ins><span class="cx">     virtual void willRecordNavigationSnapshot(WebBackForwardListItem&amp;) override;
</span><span class="cx"> 
</span><span class="cx">     virtual void didFirstVisuallyNonEmptyLayoutForMainFrame() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCoordinatedGraphicsWebViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/WebView.h        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -203,6 +203,7 @@
</span><span class="cx">     virtual void navigationGestureDidBegin() override { };
</span><span class="cx">     virtual void navigationGestureWillEnd(bool, WebBackForwardListItem&amp;) override { };
</span><span class="cx">     virtual void navigationGestureDidEnd(bool, WebBackForwardListItem&amp;) override { };
</span><ins>+    virtual void navigationGestureDidEnd() override { };
</ins><span class="cx">     virtual void willRecordNavigationSnapshot(WebBackForwardListItem&amp;) override { };
</span><span class="cx"> 
</span><span class="cx">     virtual void didChangeBackgroundColor() override { }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/PageClient.h (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/PageClient.h        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/PageClient.h        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -307,6 +307,7 @@
</span><span class="cx">     virtual void navigationGestureDidBegin() = 0;
</span><span class="cx">     virtual void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&amp;) = 0;
</span><span class="cx">     virtual void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&amp;) = 0;
</span><ins>+    virtual void navigationGestureDidEnd() = 0;
</ins><span class="cx">     virtual void willRecordNavigationSnapshot(WebBackForwardListItem&amp;) = 0;
</span><span class="cx"> 
</span><span class="cx">     virtual void didFirstVisuallyNonEmptyLayoutForMainFrame() = 0;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -5746,6 +5746,11 @@
</span><span class="cx">     m_loaderClient-&gt;navigationGestureDidEnd(*this, willNavigate, item);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPageProxy::navigationGestureDidEnd()
+{
+    m_pageClient.navigationGestureDidEnd();
+}
+
</ins><span class="cx"> void WebPageProxy::willRecordNavigationSnapshot(WebBackForwardListItem&amp; item)
</span><span class="cx"> {
</span><span class="cx">     m_pageClient.willRecordNavigationSnapshot(item);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -1011,6 +1011,7 @@
</span><span class="cx">     void navigationGestureDidBegin();
</span><span class="cx">     void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&amp;);
</span><span class="cx">     void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&amp;);
</span><ins>+    void navigationGestureDidEnd();
</ins><span class="cx">     void navigationGestureSnapshotWasRemoved();
</span><span class="cx">     void willRecordNavigationSnapshot(WebBackForwardListItem&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -175,6 +175,7 @@
</span><span class="cx">     virtual void navigationGestureDidBegin() override;
</span><span class="cx">     virtual void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&amp;) override;
</span><span class="cx">     virtual void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&amp;) override;
</span><ins>+    virtual void navigationGestureDidEnd() override;
</ins><span class="cx">     virtual void willRecordNavigationSnapshot(WebBackForwardListItem&amp;) override;
</span><span class="cx"> 
</span><span class="cx">     virtual void didFirstVisuallyNonEmptyLayoutForMainFrame() override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -685,6 +685,7 @@
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::navigationGestureDidBegin()
</span><span class="cx"> {
</span><ins>+    [m_webView _navigationGestureDidBegin];
</ins><span class="cx">     NavigationState::fromWebPage(*m_webView-&gt;_page).navigationGestureDidBegin();
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -696,8 +697,14 @@
</span><span class="cx"> void PageClientImpl::navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&amp; item)
</span><span class="cx"> {
</span><span class="cx">     NavigationState::fromWebPage(*m_webView-&gt;_page).navigationGestureDidEnd(willNavigate, item);
</span><ins>+    [m_webView _navigationGestureDidEnd];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void PageClientImpl::navigationGestureDidEnd()
+{
+    [m_webView _navigationGestureDidEnd];
+}
+
</ins><span class="cx"> void PageClientImpl::willRecordNavigationSnapshot(WebBackForwardListItem&amp; item)
</span><span class="cx"> {
</span><span class="cx">     NavigationState::fromWebPage(*m_webView-&gt;_page).willRecordNavigationSnapshot(item);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosViewGestureControllerIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/ViewGestureControllerIOS.mm (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/ViewGestureControllerIOS.mm        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/ios/ViewGestureControllerIOS.mm        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -184,6 +184,8 @@
</span><span class="cx"> 
</span><span class="cx">     m_webPageProxyForBackForwardListForCurrentSwipe = m_alternateBackForwardListSourceView.get() ? m_alternateBackForwardListSourceView.get()-&gt;_page : &amp;m_webPageProxy;
</span><span class="cx">     m_webPageProxyForBackForwardListForCurrentSwipe-&gt;navigationGestureDidBegin();
</span><ins>+    if (&amp;m_webPageProxy != m_webPageProxyForBackForwardListForCurrentSwipe)
+        m_webPageProxy.navigationGestureDidBegin();
</ins><span class="cx"> 
</span><span class="cx">     auto&amp; backForwardList = m_webPageProxyForBackForwardListForCurrentSwipe-&gt;backForwardList();
</span><span class="cx"> 
</span><span class="lines">@@ -285,6 +287,8 @@
</span><span class="cx">         RefPtr&lt;WebPageProxy&gt; webPageProxyForBackForwardListForCurrentSwipe = m_webPageProxyForBackForwardListForCurrentSwipe;
</span><span class="cx">         removeSwipeSnapshot();
</span><span class="cx">         webPageProxyForBackForwardListForCurrentSwipe-&gt;navigationGestureDidEnd(false, *targetItem);
</span><ins>+        if (&amp;m_webPageProxy != webPageProxyForBackForwardListForCurrentSwipe)
+            m_webPageProxy.navigationGestureDidEnd();
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -293,6 +297,9 @@
</span><span class="cx">         m_snapshotRemovalTargetRenderTreeSize = snapshot-&gt;renderTreeSize() * swipeSnapshotRemovalRenderTreeSizeTargetFraction;
</span><span class="cx"> 
</span><span class="cx">     m_webPageProxyForBackForwardListForCurrentSwipe-&gt;navigationGestureDidEnd(true, *targetItem);
</span><ins>+    if (&amp;m_webPageProxy != m_webPageProxyForBackForwardListForCurrentSwipe)
+        m_webPageProxy.navigationGestureDidEnd();
+
</ins><span class="cx">     m_webPageProxyForBackForwardListForCurrentSwipe-&gt;goToBackForwardItem(targetItem);
</span><span class="cx"> 
</span><span class="cx">     if (auto drawingArea = m_webPageProxy.drawingArea()) {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -186,6 +186,7 @@
</span><span class="cx">     virtual void navigationGestureDidBegin() override;
</span><span class="cx">     virtual void navigationGestureWillEnd(bool willNavigate, WebBackForwardListItem&amp;) override;
</span><span class="cx">     virtual void navigationGestureDidEnd(bool willNavigate, WebBackForwardListItem&amp;) override;
</span><ins>+    virtual void navigationGestureDidEnd() override;
</ins><span class="cx">     virtual void willRecordNavigationSnapshot(WebBackForwardListItem&amp;) override;
</span><span class="cx"> 
</span><span class="cx">     NSView *activeView() const;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacPageClientImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm (185971 => 185972)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2015-06-25 23:47:29 UTC (rev 185971)
+++ trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm        2015-06-26 00:29:58 UTC (rev 185972)
</span><span class="lines">@@ -765,6 +765,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void PageClientImpl::navigationGestureDidEnd()
+{
+}
+
</ins><span class="cx"> void PageClientImpl::willRecordNavigationSnapshot(WebBackForwardListItem&amp; item)
</span><span class="cx"> {
</span><span class="cx"> #if WK_API_ENABLED
</span></span></pre>
</div>
</div>

</body>
</html>