<!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>[200470] 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/200470">200470</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-05-05 13:01:13 -0700 (Thu, 05 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Revert <a href="http://trac.webkit.org/projects/webkit/changeset/200390">r200390</a>, thus putting <a href="http://trac.webkit.org/projects/webkit/changeset/199259">r199259</a> and <a href="http://trac.webkit.org/projects/webkit/changeset/200161">r200161</a> and back.

Source/WebCore:

* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
* page/FrameView.cpp:
(WebCore::FrameView::adjustTiledBackingScrollability):
* page/Page.h:
(WebCore::Page::obscuredInset):
(WebCore::Page::setObscuredInset):
(WebCore::Page::enclosedInScrollableAncestorView):
(WebCore::Page::setEnclosedInScrollableAncestorView):
* platform/ScrollView.h:
(WebCore::ScrollView::platformObscuredInset): Deleted.
(WebCore::ScrollView::platformSetObscuredInset): Deleted.

Source/WebKit2:

* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView):
(WebKit::operator==):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
(-[WKWebView _didFinishScrolling]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView scrollViewDidZoom:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[WKWebView _scrollViewDidInterruptDecelerating:]):
(-[WKWebView _visibleRectInEnclosingScrollView:]):
(-[WKWebView _visibleContentRect]):
(-[WKWebView _didScroll]):
(-[WKWebView _enclosingScrollerScrollingEnded:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _updateVisibleContentRectAfterScrollInView:]):
(scrollViewCanScroll):
(-[WKWebView _updateContentRectsWithState:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderHistoryControllercpp">trunk/Source/WebCore/loader/HistoryController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepagePageh">trunk/Source/WebCore/page/Page.h</a></li>
<li><a href="#trunkSourceWebCoreplatformScrollViewh">trunk/Source/WebCore/platform/ScrollView.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedVisibleContentRectUpdateInfocpp">trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedVisibleContentRectUpdateInfoh">trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h</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="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewh">trunk/Source/WebKit2/UIProcess/ios/WKContentView.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewmm">trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebCore/ChangeLog        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -1,3 +1,20 @@
</span><ins>+2016-05-05  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Revert r200390, thus putting r199259 and r200161 and back.
+
+        * loader/HistoryController.cpp:
+        (WebCore::HistoryController::saveScrollPositionAndViewStateToItem):
+        * page/FrameView.cpp:
+        (WebCore::FrameView::adjustTiledBackingScrollability):
+        * page/Page.h:
+        (WebCore::Page::obscuredInset):
+        (WebCore::Page::setObscuredInset):
+        (WebCore::Page::enclosedInScrollableAncestorView):
+        (WebCore::Page::setEnclosedInScrollableAncestorView):
+        * platform/ScrollView.h:
+        (WebCore::ScrollView::platformObscuredInset): Deleted.
+        (WebCore::ScrollView::platformSetObscuredInset): Deleted.
+
</ins><span class="cx"> 2016-05-05  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix the build.
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderHistoryControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/HistoryController.cpp (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/HistoryController.cpp        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebCore/loader/HistoryController.cpp        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -79,15 +79,19 @@
</span><span class="cx">         item-&gt;setScrollPosition(frameView-&gt;cachedScrollPosition());
</span><span class="cx">     else
</span><span class="cx">         item-&gt;setScrollPosition(frameView-&gt;scrollPosition());
</span><ins>+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     item-&gt;setExposedContentRect(frameView-&gt;exposedContentRect());
</span><span class="cx">     item-&gt;setUnobscuredContentRect(frameView-&gt;unobscuredContentRect());
</span><del>-    item-&gt;setObscuredInset(frameView-&gt;platformObscuredInset());
</del><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     Page* page = m_frame.page();
</span><del>-    if (page &amp;&amp; m_frame.isMainFrame())
</del><ins>+    if (page &amp;&amp; m_frame.isMainFrame()) {
</ins><span class="cx">         item-&gt;setPageScaleFactor(page-&gt;pageScaleFactor() / page-&gt;viewScaleFactor());
</span><ins>+#if PLATFORM(IOS)
+        item-&gt;setObscuredInset(page-&gt;obscuredInset());
+#endif
+    }
</ins><span class="cx"> 
</span><span class="cx">     // FIXME: It would be great to work out a way to put this code in WebCore instead of calling through to the client.
</span><span class="cx">     m_frame.loader().client().saveViewStateToItem(item);
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebCore/page/FrameView.cpp        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -2485,6 +2485,11 @@
</span><span class="cx">     bool verticallyScrollable;
</span><span class="cx">     bool clippedByAncestorView = static_cast&lt;bool&gt;(m_viewExposedRect);
</span><span class="cx"> 
</span><ins>+#if PLATFORM(IOS)
+    if (Page* page = frame().page())
+        clippedByAncestorView |= page-&gt;enclosedInScrollableAncestorView();
+#endif
+
</ins><span class="cx">     if (delegatesScrolling()) {
</span><span class="cx">         IntSize documentSize = contentsSize();
</span><span class="cx">         IntSize visibleSize = this-&gt;visibleSize();
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebCore/page/Page.h        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -294,7 +294,15 @@
</span><span class="cx"> 
</span><span class="cx">     float topContentInset() const { return m_topContentInset; }
</span><span class="cx">     WEBCORE_EXPORT void setTopContentInset(float);
</span><ins>+
+#if PLATFORM(IOS)
+    FloatSize obscuredInset() const { return m_obscuredInset; }
+    void setObscuredInset(FloatSize inset) { m_obscuredInset = inset; }
</ins><span class="cx">     
</span><ins>+    bool enclosedInScrollableAncestorView() const { return m_enclosedInScrollableAncestorView; }
+    void setEnclosedInScrollableAncestorView(bool f) { m_enclosedInScrollableAncestorView = f; }
+#endif
+
</ins><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx">     float textAutosizingWidth() const { return m_textAutosizingWidth; }
</span><span class="cx">     void setTextAutosizingWidth(float textAutosizingWidth) { m_textAutosizingWidth = textAutosizingWidth; }
</span><span class="lines">@@ -600,7 +608,13 @@
</span><span class="cx">     float m_viewScaleFactor { 1 };
</span><span class="cx"> 
</span><span class="cx">     float m_topContentInset;
</span><del>-    
</del><ins>+
+#if PLATFORM(IOS)
+    // This is only used for history scroll position restoration.
+    FloatSize m_obscuredInset;
+    bool m_enclosedInScrollableAncestorView { false };
+#endif
+
</ins><span class="cx"> #if ENABLE(IOS_TEXT_AUTOSIZING)
</span><span class="cx">     float m_textAutosizingWidth;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollView.h (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollView.h        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebCore/platform/ScrollView.h        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -378,11 +378,6 @@
</span><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT void scrollOffsetChangedViaPlatformWidget(const ScrollOffset&amp; oldOffset, const ScrollOffset&amp; newOffset);
</span><span class="cx"> 
</span><del>-#if PLATFORM(IOS)
-    FloatSize platformObscuredInset() const { return m_obscuredInset; }
-    void platformSetObscuredInset(FloatSize inset) { m_obscuredInset = inset; }
-#endif
-
</del><span class="cx"> protected:
</span><span class="cx">     ScrollView();
</span><span class="cx"> 
</span><span class="lines">@@ -458,7 +453,6 @@
</span><span class="cx">     FloatRect m_exposedContentRect;
</span><span class="cx">     FloatSize m_unobscuredContentSize;
</span><span class="cx">     // This is only used for history scroll position restoration.
</span><del>-    FloatSize m_obscuredInset;
</del><span class="cx"> #else
</span><span class="cx">     IntRect m_fixedVisibleContentRect;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/ChangeLog        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -1,3 +1,43 @@
</span><ins>+2016-05-05  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Revert r200390, thus putting r199259 and r200161 and back.
+
+        * Shared/VisibleContentRectUpdateInfo.cpp:
+        (WebKit::VisibleContentRectUpdateInfo::encode):
+        (WebKit::VisibleContentRectUpdateInfo::decode):
+        * Shared/VisibleContentRectUpdateInfo.h:
+        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+        (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollableAncestorView):
+        (WebKit::operator==):
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
+        (-[WKWebView _didFinishScrolling]):
+        (-[WKWebView scrollViewDidScroll:]):
+        (-[WKWebView scrollViewDidZoom:]):
+        (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
+        (-[WKWebView _scrollViewDidInterruptDecelerating:]):
+        (-[WKWebView _visibleRectInEnclosingScrollView:]):
+        (-[WKWebView _visibleContentRect]):
+        (-[WKWebView _didScroll]):
+        (-[WKWebView _enclosingScrollerScrollingEnded:]):
+        (-[WKWebView _frameOrBoundsChanged]):
+        (-[WKWebView _updateVisibleContentRects]):
+        (-[WKWebView _updateVisibleContentRectAfterScrollInView:]):
+        (scrollViewCanScroll):
+        (-[WKWebView _updateContentRectsWithState:]):
+        * UIProcess/API/Cocoa/WKWebViewInternal.h:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/ios/WKContentView.h:
+        * UIProcess/ios/WKContentView.mm:
+        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
+        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::updateVisibleContentRects):
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::updateVisibleContentRects):
+
</ins><span class="cx"> 2016-05-02  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         On platforms that support it, use a SecTrustRef as the basis of CertificateInfo instead of a chain of SecCertificateRefs.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedVisibleContentRectUpdateInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx">     encoder &lt;&lt; m_inStableState;
</span><span class="cx">     encoder &lt;&lt; m_isChangingObscuredInsetsInteractively;
</span><span class="cx">     encoder &lt;&lt; m_allowShrinkToFit;
</span><ins>+    encoder &lt;&lt; m_enclosedInScrollableAncestorView;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool VisibleContentRectUpdateInfo::decode(IPC::ArgumentDecoder&amp; decoder, VisibleContentRectUpdateInfo&amp; result)
</span><span class="lines">@@ -78,6 +79,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.m_allowShrinkToFit))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(result.m_enclosedInScrollableAncestorView))
+        return false;
</ins><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedVisibleContentRectUpdateInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx"> 
</span><span class="cx">     VisibleContentRectUpdateInfo(const WebCore::FloatRect&amp; exposedContentRect, const WebCore::FloatRect&amp; unobscuredContentRect,
</span><span class="cx">         const WebCore::FloatRect&amp; unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect&amp; customFixedPositionRect,
</span><del>-        const WebCore::FloatSize&amp; obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit,
</del><ins>+        const WebCore::FloatSize&amp; obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, bool enclosedInScrollableAncestorView,
</ins><span class="cx">         double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate, uint64_t lastLayerTreeTransactionId)
</span><span class="cx">         : m_exposedContentRect(exposedContentRect)
</span><span class="cx">         , m_unobscuredContentRect(unobscuredContentRect)
</span><span class="lines">@@ -57,6 +57,7 @@
</span><span class="cx">         , m_inStableState(inStableState)
</span><span class="cx">         , m_isChangingObscuredInsetsInteractively(isChangingObscuredInsetsInteractively)
</span><span class="cx">         , m_allowShrinkToFit(allowShrinkToFit)
</span><ins>+        , m_enclosedInScrollableAncestorView(enclosedInScrollableAncestorView)
</ins><span class="cx">     {
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -70,6 +71,7 @@
</span><span class="cx">     bool inStableState() const { return m_inStableState; }
</span><span class="cx">     bool isChangingObscuredInsetsInteractively() const { return m_isChangingObscuredInsetsInteractively; }
</span><span class="cx">     bool allowShrinkToFit() const { return m_allowShrinkToFit; }
</span><ins>+    bool enclosedInScrollableAncestorView() const { return m_enclosedInScrollableAncestorView; }
</ins><span class="cx"> 
</span><span class="cx">     double timestamp() const { return m_timestamp; }
</span><span class="cx">     double horizontalVelocity() const { return m_horizontalVelocity; }
</span><span class="lines">@@ -96,6 +98,7 @@
</span><span class="cx">     bool m_inStableState { false };
</span><span class="cx">     bool m_isChangingObscuredInsetsInteractively { false };
</span><span class="cx">     bool m_allowShrinkToFit { false };
</span><ins>+    bool m_enclosedInScrollableAncestorView { false };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> inline bool operator==(const VisibleContentRectUpdateInfo&amp; a, const VisibleContentRectUpdateInfo&amp; b)
</span><span class="lines">@@ -110,7 +113,8 @@
</span><span class="cx">         &amp;&amp; a.verticalVelocity() == b.verticalVelocity()
</span><span class="cx">         &amp;&amp; a.scaleChangeRate() == b.scaleChangeRate()
</span><span class="cx">         &amp;&amp; a.inStableState() == b.inStableState()
</span><del>-        &amp;&amp; a.allowShrinkToFit() == b.allowShrinkToFit();
</del><ins>+        &amp;&amp; a.allowShrinkToFit() == b.allowShrinkToFit()
+        &amp;&amp; a.enclosedInScrollableAncestorView() == b.enclosedInScrollableAncestorView();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -242,6 +242,9 @@
</span><span class="cx">     RetainPtr&lt;UIView &lt;WKWebViewContentProvider&gt;&gt; _customContentView;
</span><span class="cx">     RetainPtr&lt;UIView&gt; _customContentFixedOverlayView;
</span><span class="cx"> 
</span><ins>+    RetainPtr&lt;NSTimer&gt; _enclosingScrollViewScrollTimer;
+    BOOL _didScrollSinceLastTimerFire;
+
</ins><span class="cx">     WebCore::Color _scrollViewBackgroundColor;
</span><span class="cx"> 
</span><span class="cx">     // This value tracks the current adjustment added to the bottom inset due to the keyboard sliding out from the bottom
</span><span class="lines">@@ -1048,7 +1051,7 @@
</span><span class="cx">     _delayUpdateVisibleContentRects = NO;
</span><span class="cx">     if (_hadDelayedUpdateVisibleContentRects) {
</span><span class="cx">         _hadDelayedUpdateVisibleContentRects = NO;
</span><del>-        [self _updateVisibleContentRects];
</del><ins>+        [self _updateVisibleContentRectAfterScrollInView:_scrollView.get()];
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1792,7 +1795,7 @@
</span><span class="cx">     if (![self usesStandardContentView])
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    [self _updateVisibleContentRects];
</del><ins>+    [self _updateVisibleContentRectAfterScrollInView:_scrollView.get()];
</ins><span class="cx">     [_contentView didFinishScrolling];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1846,7 +1849,7 @@
</span><span class="cx">     if (![self usesStandardContentView])
</span><span class="cx">         [_customContentView scrollViewDidScroll:(UIScrollView *)scrollView];
</span><span class="cx"> 
</span><del>-    [self _updateVisibleContentRects];
</del><ins>+    [self _updateVisibleContentRectAfterScrollInView:scrollView];
</ins><span class="cx">     
</span><span class="cx">     if (WebKit::RemoteLayerTreeScrollingPerformanceData* scrollPerfData = _page-&gt;scrollingPerformanceData())
</span><span class="cx">         scrollPerfData-&gt;didScroll([self visibleRectInViewCoordinates]);
</span><span class="lines">@@ -1855,13 +1858,13 @@
</span><span class="cx"> - (void)scrollViewDidZoom:(UIScrollView *)scrollView
</span><span class="cx"> {
</span><span class="cx">     [self _updateScrollViewBackground];
</span><del>-    [self _updateVisibleContentRects];
</del><ins>+    [self _updateVisibleContentRectAfterScrollInView:scrollView];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)scrollViewDidEndZooming:(UIScrollView *)scrollView withView:(UIView *)view atScale:(CGFloat)scale
</span><span class="cx"> {
</span><span class="cx">     ASSERT(scrollView == _scrollView);
</span><del>-    [self _updateVisibleContentRects];
</del><ins>+    [self _updateVisibleContentRectAfterScrollInView:scrollView];
</ins><span class="cx">     [_contentView didZoomToScale:scale];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -1876,7 +1879,55 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     [_contentView didInterruptScrolling];
</span><ins>+    [self _updateVisibleContentRectAfterScrollInView:scrollView];
+}
+
+- (CGRect)_visibleRectInEnclosingScrollView:(UIScrollView *)enclosingScrollView
+{
+    if (!enclosingScrollView)
+        return self.bounds;
+
+    CGRect exposedRect = [enclosingScrollView convertRect:enclosingScrollView.bounds toView:self];
+    return CGRectIntersectsRect(exposedRect, self.bounds) ? CGRectIntersection(exposedRect, self.bounds) : CGRectZero;
+}
+
+- (CGRect)_visibleContentRect
+{
+    CGRect visibleRectInContentCoordinates = _frozenVisibleContentRect ? _frozenVisibleContentRect.value() : [self convertRect:self.bounds toView:_contentView.get()];
+    
+    if (UIScrollView *enclosingScroller = [self _scroller]) {
+        CGRect viewVisibleRect = [self _visibleRectInEnclosingScrollView:enclosingScroller];
+        CGRect viewVisibleContentRect = [self convertRect:viewVisibleRect toView:_contentView.get()];
+        visibleRectInContentCoordinates = CGRectIntersection(visibleRectInContentCoordinates, viewVisibleContentRect);
+    }
+
+    return visibleRectInContentCoordinates;
+}
+
+// Called when some ancestor UIScrollView scrolls.
+- (void)_didScroll
+{
+    [self _updateVisibleContentRectAfterScrollInView:[self _scroller]];
+
+    const NSTimeInterval ScrollingEndedTimerInterval = 0.032;
+    if (!_enclosingScrollViewScrollTimer) {
+        _enclosingScrollViewScrollTimer = adoptNS([[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:ScrollingEndedTimerInterval]
+            interval:0 target:self selector:@selector(_enclosingScrollerScrollingEnded:) userInfo:nil repeats:YES]);
+        [[NSRunLoop mainRunLoop] addTimer:_enclosingScrollViewScrollTimer.get() forMode:NSDefaultRunLoopMode];
+    }
+    _didScrollSinceLastTimerFire = YES;
+}
+
+- (void)_enclosingScrollerScrollingEnded:(NSTimer *)timer
+{
+    if (_didScrollSinceLastTimerFire) {
+        _didScrollSinceLastTimerFire = NO;
+        return;
+    }
+
</ins><span class="cx">     [self _updateVisibleContentRects];
</span><ins>+    [_enclosingScrollViewScrollTimer invalidate];
+    _enclosingScrollViewScrollTimer = nil;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_frameOrBoundsChanged
</span><span class="lines">@@ -1889,7 +1940,7 @@
</span><span class="cx">             _page-&gt;setViewportConfigurationMinimumLayoutSize(WebCore::FloatSize(bounds.size));
</span><span class="cx">         if (!_overridesMaximumUnobscuredSize)
</span><span class="cx">             _page-&gt;setMaximumUnobscuredSize(WebCore::FloatSize(bounds.size));
</span><del>-        if (WebKit::DrawingAreaProxy* drawingArea = _page-&gt;drawingArea())
</del><ins>+        if (auto drawingArea = _page-&gt;drawingArea())
</ins><span class="cx">             drawingArea-&gt;setSize(WebCore::IntSize(bounds.size), WebCore::IntSize(), WebCore::IntSize());
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -1919,6 +1970,42 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_updateVisibleContentRects
</span><span class="cx"> {
</span><ins>+    // For visible rect updates not associated with a spefic UIScrollView, just consider our own scroller.
+    [self _updateVisibleContentRectAfterScrollInView:_scrollView.get()];
+}
+
+- (void)_updateVisibleContentRectAfterScrollInView:(UIScrollView *)scrollView
+{
+    BOOL isStableState = !([scrollView isDragging] || [scrollView isDecelerating] || [scrollView isZooming] || [scrollView _isAnimatingZoom] || [scrollView _isScrollingToTop]);
+
+    if (isStableState &amp;&amp; scrollView == _scrollView.get())
+        isStableState = !_isChangingObscuredInsetsInteractively;
+    
+    if (isStableState &amp;&amp; scrollView == _scrollView.get())
+        isStableState = ![self _scrollViewIsRubberBanding];
+
+    // FIXME: this can be made static after we stop supporting iOS 8.x.
+    if (isStableState &amp;&amp; [scrollView respondsToSelector:@selector(_isInterruptingDeceleration)])
+        isStableState = ![scrollView performSelector:@selector(_isInterruptingDeceleration)];
+
+    [self _updateContentRectsWithState:isStableState];
+}
+
+static bool scrollViewCanScroll(UIScrollView *scrollView)
+{
+    if (!scrollView)
+        return NO;
+
+    UIEdgeInsets contentInset = scrollView.contentInset;
+    CGSize contentSize = scrollView.contentSize;
+    CGSize boundsSize = scrollView.bounds.size;
+
+    return (contentSize.width + contentInset.left + contentInset.right) &gt; boundsSize.width
+        || (contentSize.height + contentInset.top + contentInset.bottom) &gt; boundsSize.height;
+}
+
+- (void)_updateContentRectsWithState:(BOOL)inStableState
+{
</ins><span class="cx">     if (![self usesStandardContentView]) {
</span><span class="cx">         [_customContentView web_computedContentInsetDidChange];
</span><span class="cx">         return;
</span><span class="lines">@@ -1936,7 +2023,7 @@
</span><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     CGRect fullViewRect = self.bounds;
</span><del>-    CGRect visibleRectInContentCoordinates = _frozenVisibleContentRect ? _frozenVisibleContentRect.value() : [self convertRect:fullViewRect toView:_contentView.get()];
</del><ins>+    CGRect visibleRectInContentCoordinates = [self _visibleContentRect];
</ins><span class="cx"> 
</span><span class="cx">     UIEdgeInsets computedContentInsetUnadjustedForKeyboard = [self _computedContentInset];
</span><span class="cx">     if (!_haveSetObscuredInsets)
</span><span class="lines">@@ -1947,17 +2034,10 @@
</span><span class="cx"> 
</span><span class="cx">     CGFloat scaleFactor = contentZoomScale(self);
</span><span class="cx"> 
</span><del>-    BOOL isStableState = !(_isChangingObscuredInsetsInteractively || [_scrollView isDragging] || [_scrollView isDecelerating] || [_scrollView isZooming] || [_scrollView _isAnimatingZoom] || [_scrollView _isScrollingToTop] || [self _scrollViewIsRubberBanding]);
-
-    // FIXME: this can be made static after we stop supporting iOS 8.x.
-    if (isStableState &amp;&amp; [_scrollView respondsToSelector:@selector(_isInterruptingDeceleration)])
-        isStableState = ![_scrollView performSelector:@selector(_isInterruptingDeceleration)];
-
</del><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP) &amp;&amp; ENABLE(ASYNC_SCROLLING)
</span><del>-    if (isStableState) {
</del><ins>+    if (inStableState) {
</ins><span class="cx">         WebKit::RemoteScrollingCoordinatorProxy* coordinator = _page-&gt;scrollingCoordinatorProxy();
</span><span class="cx">         if (coordinator &amp;&amp; coordinator-&gt;hasActiveSnapPoint()) {
</span><del>-            CGRect fullViewRect = self.bounds;
</del><span class="cx">             CGRect unobscuredRect = UIEdgeInsetsInsetRect(fullViewRect, computedContentInsetUnadjustedForKeyboard);
</span><span class="cx">             
</span><span class="cx">             CGPoint currentPoint = [_scrollView contentOffset];
</span><span class="lines">@@ -1978,8 +2058,9 @@
</span><span class="cx">         unobscuredRectInScrollViewCoordinates:unobscuredRect
</span><span class="cx">         obscuredInset:CGSizeMake(_obscuredInsets.left, _obscuredInsets.top)
</span><span class="cx">         scale:scaleFactor minimumScale:[_scrollView minimumZoomScale]
</span><del>-        inStableState:isStableState
-        isChangingObscuredInsetsInteractively:_isChangingObscuredInsetsInteractively];
</del><ins>+        inStableState:inStableState
+        isChangingObscuredInsetsInteractively:_isChangingObscuredInsetsInteractively
+        enclosedInScrollableAncestorView:scrollViewCanScroll([self _scroller])];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_didFinishLoadForMainFrame
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewInternalh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -99,6 +99,8 @@
</span><span class="cx"> - (void)_didInvokeUIScrollViewDelegateCallback;
</span><span class="cx"> 
</span><span class="cx"> - (void)_updateVisibleContentRects;
</span><ins>+- (void)_updateVisibleContentRectAfterScrollInView:(UIScrollView *)scrollView;
+- (void)_updateContentRectsWithState:(BOOL)inStableState;
</ins><span class="cx"> 
</span><span class="cx"> - (void)_didFinishLoadForMainFrame;
</span><span class="cx"> - (void)_didFailLoadForMainFrame;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -455,7 +455,7 @@
</span><span class="cx">     const WebCore::FloatRect&amp; exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedContentRect(); }
</span><span class="cx">     const WebCore::FloatRect&amp; unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredContentRect(); }
</span><span class="cx"> 
</span><del>-    void updateVisibleContentRects(const WebCore::FloatRect&amp; exposedRect, const WebCore::FloatRect&amp; unobscuredRect, const WebCore::FloatRect&amp; unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect&amp; customFixedPositionRect, const WebCore::FloatSize&amp; obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate);
</del><ins>+    void updateVisibleContentRects(const VisibleContentRectUpdateInfo&amp;);
</ins><span class="cx">     void resendLastVisibleContentRects();
</span><span class="cx"> 
</span><span class="cx">     enum class UnobscuredRectConstraint { ConstrainedToDocumentRect, Unconstrained };
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.h (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -70,7 +70,9 @@
</span><span class="cx">     unobscuredRectInScrollViewCoordinates:(CGRect)unobscuredRectInScrollViewCoordinates
</span><span class="cx">     obscuredInset:(CGSize)topInset
</span><span class="cx">     scale:(CGFloat)scale minimumScale:(CGFloat)minimumScale
</span><del>-    inStableState:(BOOL)isStableState isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively;
</del><ins>+    inStableState:(BOOL)isStableState
+    isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively
+    enclosedInScrollableAncestorView:(BOOL)enclosedInScrollableAncestorView;
</ins><span class="cx"> 
</span><span class="cx"> - (void)didFinishScrolling;
</span><span class="cx"> - (void)didInterruptScrolling;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -356,8 +356,12 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)didUpdateVisibleRect:(CGRect)visibleRect unobscuredRect:(CGRect)unobscuredRect unobscuredRectInScrollViewCoordinates:(CGRect)unobscuredRectInScrollViewCoordinates
</span><del>-    obscuredInset:(CGSize)obscuredInset scale:(CGFloat)zoomScale minimumScale:(CGFloat)minimumScale inStableState:(BOOL)isStableState isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively
</del><ins>+    obscuredInset:(CGSize)obscuredInset scale:(CGFloat)zoomScale minimumScale:(CGFloat)minimumScale inStableState:(BOOL)isStableState isChangingObscuredInsetsInteractively:(BOOL)isChangingObscuredInsetsInteractively enclosedInScrollableAncestorView:(BOOL)enclosedInScrollableAncestorView
</ins><span class="cx"> {
</span><ins>+    auto drawingArea = _page-&gt;drawingArea();
+    if (!drawingArea)
+        return;
+
</ins><span class="cx">     double timestamp = monotonicallyIncreasingTime();
</span><span class="cx">     HistoricalVelocityData::VelocityData velocityData;
</span><span class="cx">     if (!isStableState)
</span><span class="lines">@@ -366,16 +370,32 @@
</span><span class="cx">         _historicalKinematicData.clear();
</span><span class="cx"> 
</span><span class="cx">     FloatRect fixedPositionRectForLayout = _page-&gt;computeCustomFixedPositionRect(unobscuredRect, zoomScale, WebPageProxy::UnobscuredRectConstraint::ConstrainedToDocumentRect);
</span><del>-    _page-&gt;updateVisibleContentRects(visibleRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, fixedPositionRectForLayout, WebCore::FloatSize(obscuredInset),
-        zoomScale, isStableState, isChangingObscuredInsetsInteractively, _webView._allowsViewportShrinkToFit, timestamp, velocityData.horizontalVelocity, velocityData.verticalVelocity, velocityData.scaleChangeRate);
</del><span class="cx"> 
</span><ins>+    VisibleContentRectUpdateInfo visibleContentRectUpdateInfo(
+        visibleRect,
+        unobscuredRect,
+        unobscuredRectInScrollViewCoordinates,
+        fixedPositionRectForLayout,
+        WebCore::FloatSize(obscuredInset),
+        zoomScale,
+        isStableState,
+        isChangingObscuredInsetsInteractively,
+        _webView._allowsViewportShrinkToFit,
+        enclosedInScrollableAncestorView,
+        timestamp,
+        velocityData.horizontalVelocity,
+        velocityData.verticalVelocity,
+        velocityData.scaleChangeRate,
+        downcast&lt;RemoteLayerTreeDrawingAreaProxy&gt;(*drawingArea).lastCommittedLayerTreeTransactionID());
+
+    _page-&gt;updateVisibleContentRects(visibleContentRectUpdateInfo);
+
</ins><span class="cx">     RemoteScrollingCoordinatorProxy* scrollingCoordinator = _page-&gt;scrollingCoordinatorProxy();
</span><span class="cx">     FloatRect fixedPositionRect = _page-&gt;computeCustomFixedPositionRect(_page-&gt;unobscuredContentRect(), zoomScale);
</span><span class="cx">     scrollingCoordinator-&gt;viewportChangedViaDelegatedScrolling(scrollingCoordinator-&gt;rootScrollingNodeID(), fixedPositionRect, zoomScale);
</span><span class="cx"> 
</span><del>-    if (auto drawingArea = _page-&gt;drawingArea())
-        drawingArea-&gt;updateDebugIndicator();
-        
</del><ins>+    drawingArea-&gt;updateDebugIndicator();
+    
</ins><span class="cx">     [self updateFixedClippingView:fixedPositionRect];
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -182,18 +182,16 @@
</span><span class="cx">     callback-&gt;performCallbackWithReturnValue(beforeText, markedText, selectedText, afterText, location, length);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::updateVisibleContentRects(const WebCore::FloatRect&amp; exposedRect, const WebCore::FloatRect&amp; unobscuredRect, const WebCore::FloatRect&amp; unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect&amp; customFixedPositionRect, const WebCore::FloatSize&amp; obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate)
</del><ins>+void WebPageProxy::updateVisibleContentRects(const VisibleContentRectUpdateInfo&amp; visibleContentRectUpdate)
</ins><span class="cx"> {
</span><span class="cx">     if (!isValid())
</span><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    VisibleContentRectUpdateInfo visibleContentRectUpdateInfo(exposedRect, unobscuredRect, unobscuredRectInScrollViewCoordinates, customFixedPositionRect, obscuredInset, scale, inStableState, isChangingObscuredInsetsInteractively, allowShrinkToFit, timestamp, horizontalVelocity, verticalVelocity, scaleChangeRate, downcast&lt;RemoteLayerTreeDrawingAreaProxy&gt;(*drawingArea()).lastCommittedLayerTreeTransactionID());
-
-    if (visibleContentRectUpdateInfo == m_lastVisibleContentRectUpdate)
</del><ins>+    if (visibleContentRectUpdate == m_lastVisibleContentRectUpdate)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    m_lastVisibleContentRectUpdate = visibleContentRectUpdateInfo;
-    m_process-&gt;send(Messages::ViewUpdateDispatcher::VisibleContentRectUpdate(m_pageID, visibleContentRectUpdateInfo), 0);
</del><ins>+    m_lastVisibleContentRectUpdate = visibleContentRectUpdate;
+    m_process-&gt;send(Messages::ViewUpdateDispatcher::VisibleContentRectUpdate(m_pageID, visibleContentRectUpdate), 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::resendLastVisibleContentRects()
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -259,6 +259,8 @@
</span><span class="cx">     if (m_webPageProxy.delegatesScrolling()) {
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">         FloatPoint tiledMapLocation = m_webPageProxy.unobscuredContentRect().location();
</span><ins>+        tiledMapLocation = tiledMapLocation.expandedTo(m_webPageProxy.exposedContentRect().location() + FloatSize(0, 60));
+
</ins><span class="cx">         float absoluteInset = indicatorInset / m_webPageProxy.displayedContentScale();
</span><span class="cx">         tiledMapLocation += FloatSize(absoluteInset, absoluteInset);
</span><span class="cx"> #else
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (200469 => 200470)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-05-05 19:46:12 UTC (rev 200469)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-05-05 20:01:13 UTC (rev 200470)
</span><span class="lines">@@ -2966,7 +2966,8 @@
</span><span class="cx">         viewportConfigurationChanged();
</span><span class="cx"> 
</span><span class="cx">     frameView.setUnobscuredContentSize(visibleContentRectUpdateInfo.unobscuredContentRect().size());
</span><del>-    frameView.platformSetObscuredInset(visibleContentRectUpdateInfo.obscuredInset());
</del><ins>+    m_page-&gt;setObscuredInset(visibleContentRectUpdateInfo.obscuredInset());
+    m_page-&gt;setEnclosedInScrollableAncestorView(visibleContentRectUpdateInfo.enclosedInScrollableAncestorView());
</ins><span class="cx"> 
</span><span class="cx">     double horizontalVelocity = visibleContentRectUpdateInfo.horizontalVelocity();
</span><span class="cx">     double verticalVelocity = visibleContentRectUpdateInfo.verticalVelocity();
</span></span></pre>
</div>
</div>

</body>
</html>