<!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>[199259] 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/199259">199259</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-04-08 18:18:46 -0700 (Fri, 08 Apr 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[iOS WK2] WKWebViews should consult ancestor UIScrollViews to determine tiling area
https://bugs.webkit.org/show_bug.cgi?id=156429
rdar://problem/25455111
Reviewed by Tim Horton.
When a WKWebView is expanded to full size, then embedded in UIScrollView, it would
create huge tiles that cover the entire view area (since it considered itself non-scrollable).
Fix to always use 512x512 tiles in this configuration, and to adjust the tile coverage
for the area exposed through the enclosing UIScrollView.
Source/WebCore:
* loader/HistoryController.cpp:
(WebCore::HistoryController::saveScrollPositionAndViewStateToItem): setObscuredInset()
moved from FrameView to Page.
* page/FrameView.cpp:
(WebCore::FrameView::adjustTiledBackingScrollability): If we're clipped by an ancestor scrollView,
just assume we're scrollable on both axes.
* page/Page.h:
(WebCore::Page::obscuredInset):
(WebCore::Page::setObscuredInset):
(WebCore::Page::enclosedInScrollView):
(WebCore::Page::setEnclosedInScrollView):
* platform/ScrollView.h:
(WebCore::ScrollView::platformObscuredInset): Deleted.
(WebCore::ScrollView::platformSetObscuredInset): Deleted.
Source/WebKit2:
* Shared/VisibleContentRectUpdateInfo.cpp: Add enclosedInScrollView(), which is used to
trigger normal-sized tiles.
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::enclosedInScrollView):
(WebKit::operator==):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didInvokeUIScrollViewDelegateCallback]): Pass our scrollView.
(-[WKWebView _didFinishScrolling]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView scrollViewDidZoom:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[WKWebView _scrollViewDidInterruptDecelerating:]):
(-[WKWebView _visibleRectInEnclosingScrollView:]):
(-[WKWebView _visibleContentRect]): Compute the exposed part of the content relative
to the WKWebView, then intersect with the exposed part via any ancestor UIScrollView.
(-[WKWebView _didScroll]): This is called by UIKit when some ancestor UIScrollView scrolls.
However, we don't get all the UIScrollView delegate callbacks, so have to use a timer to
trigger a call to -_updateVisibleContentRects when we're in a stable state.
(-[WKWebView _enclosingScrollerScrollingEnded:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Get the stable state from the
scroll view that the user is interacting with.
(-[WKWebView _updateContentRectsWithState:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/WebPageProxy.h: Rather than pass a bazillion arguments through updateVisibleContentRects(), just
pass the VisibleContentRectUpdateInfo struct.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* 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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebCore/ChangeLog        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2016-04-08 Simon Fraser <simon.fraser@apple.com>
+
+ [iOS WK2] WKWebViews should consult ancestor UIScrollViews to determine tiling area
+ https://bugs.webkit.org/show_bug.cgi?id=156429
+ rdar://problem/25455111
+
+ Reviewed by Tim Horton.
+
+ When a WKWebView is expanded to full size, then embedded in UIScrollView, it would
+ create huge tiles that cover the entire view area (since it considered itself non-scrollable).
+
+ Fix to always use 512x512 tiles in this configuration, and to adjust the tile coverage
+ for the area exposed through the enclosing UIScrollView.
+
+ * loader/HistoryController.cpp:
+ (WebCore::HistoryController::saveScrollPositionAndViewStateToItem): setObscuredInset()
+ moved from FrameView to Page.
+ * page/FrameView.cpp:
+ (WebCore::FrameView::adjustTiledBackingScrollability): If we're clipped by an ancestor scrollView,
+ just assume we're scrollable on both axes.
+ * page/Page.h:
+ (WebCore::Page::obscuredInset):
+ (WebCore::Page::setObscuredInset):
+ (WebCore::Page::enclosedInScrollView):
+ (WebCore::Page::setEnclosedInScrollView):
+ * platform/ScrollView.h:
+ (WebCore::ScrollView::platformObscuredInset): Deleted.
+ (WebCore::ScrollView::platformSetObscuredInset): Deleted.
+
</ins><span class="cx"> 2016-04-08 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS Simulator] Build failure (property 'contentsFormat' not found on object of type 'LegacyTileLayer *')
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderHistoryControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/HistoryController.cpp (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/HistoryController.cpp        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebCore/loader/HistoryController.cpp        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -79,15 +79,19 @@
</span><span class="cx"> item->setScrollPosition(frameView->cachedScrollPosition());
</span><span class="cx"> else
</span><span class="cx"> item->setScrollPosition(frameView->scrollPosition());
</span><ins>+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> item->setExposedContentRect(frameView->exposedContentRect());
</span><span class="cx"> item->setUnobscuredContentRect(frameView->unobscuredContentRect());
</span><del>- item->setObscuredInset(frameView->platformObscuredInset());
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> Page* page = m_frame.page();
</span><del>- if (page && m_frame.isMainFrame())
</del><ins>+ if (page && m_frame.isMainFrame()) {
</ins><span class="cx"> item->setPageScaleFactor(page->pageScaleFactor() / page->viewScaleFactor());
</span><ins>+#if PLATFORM(IOS)
+ item->setObscuredInset(page->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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebCore/page/FrameView.cpp        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -2485,6 +2485,11 @@
</span><span class="cx"> bool verticallyScrollable;
</span><span class="cx"> bool clippedByAncestorView = static_cast<bool>(m_viewExposedRect);
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ if (Page* page = frame().page())
+ clippedByAncestorView |= page->enclosedInScrollView();
+#endif
+
</ins><span class="cx"> if (delegatesScrolling()) {
</span><span class="cx"> IntSize documentSize = contentsSize();
</span><span class="cx"> IntSize visibleSize = this->visibleSize();
</span></span></pre></div>
<a id="trunkSourceWebCorepagePageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/Page.h (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/Page.h        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebCore/page/Page.h        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -293,7 +293,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 enclosedInScrollView() const { return m_enclosedInScrollView; }
+ void setEnclosedInScrollView(bool f) { m_enclosedInScrollView = 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">@@ -599,7 +607,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_enclosedInScrollView { 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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollView.h        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebCore/platform/ScrollView.h        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -378,11 +378,6 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT void scrollOffsetChangedViaPlatformWidget(const ScrollOffset& oldOffset, const ScrollOffset& 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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/ChangeLog        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -1,3 +1,61 @@
</span><ins>+2016-04-08 Simon Fraser <simon.fraser@apple.com>
+
+ [iOS WK2] WKWebViews should consult ancestor UIScrollViews to determine tiling area
+ https://bugs.webkit.org/show_bug.cgi?id=156429
+ rdar://problem/25455111
+
+ Reviewed by Tim Horton.
+
+ When a WKWebView is expanded to full size, then embedded in UIScrollView, it would
+ create huge tiles that cover the entire view area (since it considered itself non-scrollable).
+
+ Fix to always use 512x512 tiles in this configuration, and to adjust the tile coverage
+ for the area exposed through the enclosing UIScrollView.
+
+ * Shared/VisibleContentRectUpdateInfo.cpp: Add enclosedInScrollView(), which is used to
+ trigger normal-sized tiles.
+ (WebKit::VisibleContentRectUpdateInfo::encode):
+ (WebKit::VisibleContentRectUpdateInfo::decode):
+ * Shared/VisibleContentRectUpdateInfo.h:
+ (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+ (WebKit::VisibleContentRectUpdateInfo::enclosedInScrollView):
+ (WebKit::operator==):
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView _didInvokeUIScrollViewDelegateCallback]): Pass our scrollView.
+ (-[WKWebView _didFinishScrolling]):
+ (-[WKWebView scrollViewDidScroll:]):
+ (-[WKWebView scrollViewDidZoom:]):
+ (-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
+ (-[WKWebView _scrollViewDidInterruptDecelerating:]):
+ (-[WKWebView _visibleRectInEnclosingScrollView:]):
+ (-[WKWebView _visibleContentRect]): Compute the exposed part of the content relative
+ to the WKWebView, then intersect with the exposed part via any ancestor UIScrollView.
+ (-[WKWebView _didScroll]): This is called by UIKit when some ancestor UIScrollView scrolls.
+ However, we don't get all the UIScrollView delegate callbacks, so have to use a timer to
+ trigger a call to -_updateVisibleContentRects when we're in a stable state.
+ (-[WKWebView _enclosingScrollerScrollingEnded:]):
+ (-[WKWebView _frameOrBoundsChanged]):
+ (-[WKWebView _updateVisibleContentRects]):
+ (-[WKWebView _updateVisibleContentRectAfterScrollInView:]): Get the stable state from the
+ scroll view that the user is interacting with.
+ (-[WKWebView _updateContentRectsWithState:]):
+ * UIProcess/API/Cocoa/WKWebViewInternal.h:
+ * UIProcess/WebPageProxy.h: Rather than pass a bazillion arguments through updateVisibleContentRects(), just
+ pass the VisibleContentRectUpdateInfo struct.
+ * UIProcess/ios/WKContentView.h:
+ * UIProcess/ios/WKContentView.mm:
+ (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollView:]):
+ (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::updateVisibleContentRects):
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::updateVisibleContentRects):
+
</ins><span class="cx"> 2016-04-08 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> [iOS Simulator] Build failure (property 'contentsFormat' not found on object of type 'LegacyTileLayer *')
</span><span class="lines">@@ -79,13 +137,15 @@
</span><span class="cx"> * UIProcess/ios/WKContentView.h:
</span><span class="cx"> * UIProcess/ios/WKContentView.mm:
</span><span class="cx"> (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
</span><ins>+ Make the VisibleContentRectUpdateInfo here and pass it down.
</ins><span class="cx"> (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]): Deleted.
</span><span class="cx"> * UIProcess/ios/WebPageProxyIOS.mm:
</span><span class="cx"> (WebKit::WebPageProxy::updateVisibleContentRects):
</span><span class="cx"> (WebKit::WebPageProxy::restorePageState):
</span><span class="cx"> * WebProcess/WebPage/ios/WebPageIOS.mm:
</span><span class="cx"> (WebKit::WebPage::restorePageState):
</span><del>- (WebKit::WebPage::updateVisibleContentRects):
</del><ins>+ (WebKit::WebPage::updateVisibleContentRects): setObscuredInset() moved from FrameView to Page.
+ Also call setEnclosedInScrollView() on Page.
</ins><span class="cx">
</span><span class="cx"> 2016-04-08 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedVisibleContentRectUpdateInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -46,6 +46,7 @@
</span><span class="cx"> encoder << m_inStableState;
</span><span class="cx"> encoder << m_isChangingObscuredInsetsInteractively;
</span><span class="cx"> encoder << m_allowShrinkToFit;
</span><ins>+ encoder << m_enclosedInScrollView;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool VisibleContentRectUpdateInfo::decode(IPC::ArgumentDecoder& decoder, VisibleContentRectUpdateInfo& 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_enclosedInScrollView))
+ 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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -41,7 +41,7 @@
</span><span class="cx">
</span><span class="cx"> VisibleContentRectUpdateInfo(const WebCore::FloatRect& exposedContentRect, const WebCore::FloatRect& unobscuredContentRect,
</span><span class="cx"> const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect,
</span><del>- const WebCore::FloatSize& obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit,
</del><ins>+ const WebCore::FloatSize& obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, bool enclosedInScrollView,
</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_enclosedInScrollView(enclosedInScrollView)
</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 enclosedInScrollView() const { return m_enclosedInScrollView; }
</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_enclosedInScrollView { false };
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> inline bool operator==(const VisibleContentRectUpdateInfo& a, const VisibleContentRectUpdateInfo& b)
</span><span class="lines">@@ -110,7 +113,8 @@
</span><span class="cx"> && a.verticalVelocity() == b.verticalVelocity()
</span><span class="cx"> && a.scaleChangeRate() == b.scaleChangeRate()
</span><span class="cx"> && a.inStableState() == b.inStableState()
</span><del>- && a.allowShrinkToFit() == b.allowShrinkToFit();
</del><ins>+ && a.allowShrinkToFit() == b.allowShrinkToFit()
+ && a.enclosedInScrollView() == b.enclosedInScrollView();
</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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -240,6 +240,9 @@
</span><span class="cx"> RetainPtr<UIView <WKWebViewContentProvider>> _customContentView;
</span><span class="cx"> RetainPtr<UIView> _customContentFixedOverlayView;
</span><span class="cx">
</span><ins>+ RetainPtr<NSTimer> _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">@@ -1006,7 +1009,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">@@ -1750,7 +1753,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">@@ -1804,7 +1807,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->scrollingPerformanceData())
</span><span class="cx"> scrollPerfData->didScroll([self visibleRectInViewCoordinates]);
</span><span class="lines">@@ -1813,13 +1816,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">@@ -1834,7 +1837,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">@@ -1847,7 +1898,7 @@
</span><span class="cx"> _page->setViewportConfigurationMinimumLayoutSize(WebCore::FloatSize(bounds.size));
</span><span class="cx"> if (!_overridesMaximumUnobscuredSize)
</span><span class="cx"> _page->setMaximumUnobscuredSize(WebCore::FloatSize(bounds.size));
</span><del>- if (WebKit::DrawingAreaProxy* drawingArea = _page->drawingArea())
</del><ins>+ if (auto drawingArea = _page->drawingArea())
</ins><span class="cx"> drawingArea->setSize(WebCore::IntSize(bounds.size), WebCore::IntSize(), WebCore::IntSize());
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1877,6 +1928,29 @@
</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 && scrollView == _scrollView.get())
+ isStableState = !_isChangingObscuredInsetsInteractively;
+
+ if (isStableState && scrollView == _scrollView.get())
+ isStableState = ![self _scrollViewIsRubberBanding];
+
+ // FIXME: this can be made static after we stop supporting iOS 8.x.
+ if (isStableState && [scrollView respondsToSelector:@selector(_isInterruptingDeceleration)])
+ isStableState = ![scrollView performSelector:@selector(_isInterruptingDeceleration)];
+
+ [self _updateContentRectsWithState:isStableState];
+}
+
+- (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">@@ -1894,7 +1968,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">@@ -1905,17 +1979,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 && [_scrollView respondsToSelector:@selector(_isInterruptingDeceleration)])
- isStableState = ![_scrollView performSelector:@selector(_isInterruptingDeceleration)];
-
</del><span class="cx"> #if ENABLE(CSS_SCROLL_SNAP) && ENABLE(ASYNC_SCROLLING)
</span><del>- if (isStableState) {
</del><ins>+ if (inStableState) {
</ins><span class="cx"> WebKit::RemoteScrollingCoordinatorProxy* coordinator = _page->scrollingCoordinatorProxy();
</span><span class="cx"> if (coordinator && coordinator->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">@@ -1936,8 +2003,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
+ enclosedInScrollView:[self _scroller] != nil];
</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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2016-04-09 01:18:46 UTC (rev 199259)
</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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -452,7 +452,7 @@
</span><span class="cx"> const WebCore::FloatRect& exposedContentRect() const { return m_lastVisibleContentRectUpdate.exposedContentRect(); }
</span><span class="cx"> const WebCore::FloatRect& unobscuredContentRect() const { return m_lastVisibleContentRectUpdate.unobscuredContentRect(); }
</span><span class="cx">
</span><del>- void updateVisibleContentRects(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, const WebCore::FloatSize& obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate);
</del><ins>+ void updateVisibleContentRects(const VisibleContentRectUpdateInfo&);
</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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2016-04-09 01:18:46 UTC (rev 199259)
</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
+ enclosedInScrollView:(BOOL)enclosedInScrollView;
</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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2016-04-09 01:18:46 UTC (rev 199259)
</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 enclosedInScrollView:(BOOL)enclosedInScrollView
</ins><span class="cx"> {
</span><ins>+ auto drawingArea = _page->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->computeCustomFixedPositionRect(unobscuredRect, zoomScale, WebPageProxy::UnobscuredRectConstraint::ConstrainedToDocumentRect);
</span><del>- _page->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,
+ enclosedInScrollView,
+ timestamp,
+ velocityData.horizontalVelocity,
+ velocityData.verticalVelocity,
+ velocityData.scaleChangeRate,
+ downcast<RemoteLayerTreeDrawingAreaProxy>(*drawingArea).lastCommittedLayerTreeTransactionID());
+
+ _page->updateVisibleContentRects(visibleContentRectUpdateInfo);
+
</ins><span class="cx"> RemoteScrollingCoordinatorProxy* scrollingCoordinator = _page->scrollingCoordinatorProxy();
</span><span class="cx"> FloatRect fixedPositionRect = _page->computeCustomFixedPositionRect(_page->unobscuredContentRect(), zoomScale);
</span><span class="cx"> scrollingCoordinator->viewportChangedViaDelegatedScrolling(scrollingCoordinator->rootScrollingNodeID(), fixedPositionRect, zoomScale);
</span><span class="cx">
</span><del>- if (auto drawingArea = _page->drawingArea())
- drawingArea->updateDebugIndicator();
-
</del><ins>+ drawingArea->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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -182,18 +182,16 @@
</span><span class="cx"> callback->performCallbackWithReturnValue(beforeText, markedText, selectedText, afterText, location, length);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::updateVisibleContentRects(const WebCore::FloatRect& exposedRect, const WebCore::FloatRect& unobscuredRect, const WebCore::FloatRect& unobscuredRectInScrollViewCoordinates, const WebCore::FloatRect& customFixedPositionRect, const WebCore::FloatSize& obscuredInset, double scale, bool inStableState, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, double timestamp, double horizontalVelocity, double verticalVelocity, double scaleChangeRate)
</del><ins>+void WebPageProxy::updateVisibleContentRects(const VisibleContentRectUpdateInfo& 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<RemoteLayerTreeDrawingAreaProxy>(*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->send(Messages::ViewUpdateDispatcher::VisibleContentRectUpdate(m_pageID, visibleContentRectUpdateInfo), 0);
</del><ins>+ m_lastVisibleContentRectUpdate = visibleContentRectUpdate;
+ m_process->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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2016-04-09 01:18:46 UTC (rev 199259)
</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 (199258 => 199259)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-04-09 00:42:53 UTC (rev 199258)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-04-09 01:18:46 UTC (rev 199259)
</span><span class="lines">@@ -2964,7 +2964,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->setObscuredInset(visibleContentRectUpdateInfo.obscuredInset());
+ m_page->setEnclosedInScrollView(visibleContentRectUpdateInfo.enclosedInScrollView());
</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>