<!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>[209845] trunk</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/209845">209845</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2016-12-14 17:06:21 -0800 (Wed, 14 Dec 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Fix cause of viewport-related flakiness in iOS tests
https://bugs.webkit.org/show_bug.cgi?id=165878

Reviewed by Tim Horton.

Source/WebKit2:

When TestController::platformConfigureViewForTest() changes the view size for a flexible
viewport test, the page would not have updated with the new scale by the time the load event
fired, causing flakiness depending on test order.

This was caused by code added in <a href="http://trac.webkit.org/projects/webkit/changeset/170325">r170325</a> that delayed visible content rect updates until
after the UI process has received the transaction after didCommitLoad. So fix by overriding
this mechanism if the view has been resized.

* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
(WebKit::operator&lt;&lt;):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::isFirstUpdateForNewViewSize):
(WebKit::operator==):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateContentRectsWithState:]):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::setSize):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):

LayoutTests:

Try un-flaking some viewport tests.

* platform/ios-simulator-wk2/TestExpectations:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformiossimulatorwk2TestExpectations">trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations</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="#trunkSourceWebKit2UIProcessDrawingAreaProxycpp">trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessDrawingAreaProxyh">trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxycpp">trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#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="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/LayoutTests/ChangeLog        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-12-14  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Fix cause of viewport-related flakiness in iOS tests
+        https://bugs.webkit.org/show_bug.cgi?id=165878
+
+        Reviewed by Tim Horton.
+
+        Try un-flaking some viewport tests.
+
+        * platform/ios-simulator-wk2/TestExpectations:
+
</ins><span class="cx"> 2016-12-12  Jon Lee  &lt;jonlee@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Full Pass CSS Variables Test Suite
</span></span></pre></div>
<a id="trunkLayoutTestsplatformiossimulatorwk2TestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -1809,10 +1809,6 @@
</span><span class="cx"> # Forcing always allow user scalable is not supported on certain OS version.
</span><span class="cx"> webkit.org/b/155056 fast/viewport/ios/force-always-user-scalable.html [ Skip ]
</span><span class="cx"> 
</span><del>-webkit.org/b/153110 fast/viewport/ios/width-is-device-width-overflowing.html [ Pass Failure ]
-webkit.org/b/153110 fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden.html [ Pass Failure ]
-webkit.org/b/153110 fast/viewport/ios/width-is-device-width-overflowing-body-overflow-hidden-tall.html [ Pass Failure ]
-
</del><span class="cx"> webkit.org/b/155501 animations/3d/transform-origin-vs-functions.html [ Pass Failure ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/155495 compositing/visible-rect/animated-from-none.html [ Pass Failure ]
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/ChangeLog        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -1,3 +1,41 @@
</span><ins>+2016-12-14  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Fix cause of viewport-related flakiness in iOS tests
+        https://bugs.webkit.org/show_bug.cgi?id=165878
+
+        Reviewed by Tim Horton.
+
+        When TestController::platformConfigureViewForTest() changes the view size for a flexible
+        viewport test, the page would not have updated with the new scale by the time the load event
+        fired, causing flakiness depending on test order.
+
+        This was caused by code added in r170325 that delayed visible content rect updates until
+        after the UI process has received the transaction after didCommitLoad. So fix by overriding
+        this mechanism if the view has been resized.
+
+        * Shared/VisibleContentRectUpdateInfo.cpp:
+        (WebKit::VisibleContentRectUpdateInfo::encode):
+        (WebKit::VisibleContentRectUpdateInfo::decode):
+        (WebKit::operator&lt;&lt;):
+        * Shared/VisibleContentRectUpdateInfo.h:
+        (WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
+        (WebKit::VisibleContentRectUpdateInfo::isFirstUpdateForNewViewSize):
+        (WebKit::operator==):
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _frameOrBoundsChanged]):
+        (-[WKWebView _updateContentRectsWithState:]):
+        * UIProcess/DrawingAreaProxy.cpp:
+        (WebKit::DrawingAreaProxy::setSize):
+        * UIProcess/DrawingAreaProxy.h:
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::WebPageProxy):
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/ios/WKContentView.h:
+        * UIProcess/ios/WKContentView.mm:
+        (-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:obscuredInset:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:enclosedInScrollableAncestorView:]):
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::updateVisibleContentRects):
+
</ins><span class="cx"> 2016-12-04  Sam Weinig  &lt;sam@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebIDL] Add support for converting dictionaries to JS
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedVisibleContentRectUpdateInfocpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.cpp        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -47,6 +47,7 @@
</span><span class="cx">     encoder &lt;&lt; m_verticalVelocity;
</span><span class="cx">     encoder &lt;&lt; m_scaleChangeRate;
</span><span class="cx">     encoder &lt;&lt; m_inStableState;
</span><ins>+    encoder &lt;&lt; m_isFirstUpdateForNewViewSize;
</ins><span class="cx">     encoder &lt;&lt; m_isChangingObscuredInsetsInteractively;
</span><span class="cx">     encoder &lt;&lt; m_allowShrinkToFit;
</span><span class="cx">     encoder &lt;&lt; m_enclosedInScrollableAncestorView;
</span><span class="lines">@@ -78,6 +79,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.m_inStableState))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decode(result.m_isFirstUpdateForNewViewSize))
+        return false;
</ins><span class="cx">     if (!decoder.decode(result.m_isChangingObscuredInsetsInteractively))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.m_allowShrinkToFit))
</span><span class="lines">@@ -111,6 +114,7 @@
</span><span class="cx"> 
</span><span class="cx">     ts.dumpProperty(&quot;scale&quot;, info.scale());
</span><span class="cx">     ts.dumpProperty(&quot;inStableState&quot;, info.inStableState());
</span><ins>+    ts.dumpProperty(&quot;isFirstUpdateForNewViewSize&quot;, info.isFirstUpdateForNewViewSize());
</ins><span class="cx">     if (info.isChangingObscuredInsetsInteractively())
</span><span class="cx">         ts.dumpProperty(&quot;isChangingObscuredInsetsInteractively&quot;, info.isChangingObscuredInsetsInteractively());
</span><span class="cx">     if (info.enclosedInScrollableAncestorView())
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedVisibleContentRectUpdateInfoh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/Shared/VisibleContentRectUpdateInfo.h        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -23,8 +23,7 @@
</span><span class="cx">  * THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">  */
</span><span class="cx"> 
</span><del>-#ifndef VisibleContentRectUpdateInfo_h
-#define VisibleContentRectUpdateInfo_h
</del><ins>+#pragma once
</ins><span class="cx"> 
</span><span class="cx"> #include &lt;WebCore/FloatRect.h&gt;
</span><span class="cx"> #include &lt;wtf/MonotonicTime.h&gt;
</span><span class="lines">@@ -47,7 +46,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, bool enclosedInScrollableAncestorView,
</del><ins>+        const WebCore::FloatSize&amp; obscuredInset, double scale, bool inStableState, bool isFirstUpdateForNewViewSize, bool isChangingObscuredInsetsInteractively, bool allowShrinkToFit, bool enclosedInScrollableAncestorView,
</ins><span class="cx">         MonotonicTime 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">@@ -61,6 +60,7 @@
</span><span class="cx">         , m_verticalVelocity(verticalVelocity)
</span><span class="cx">         , m_scaleChangeRate(scaleChangeRate)
</span><span class="cx">         , m_inStableState(inStableState)
</span><ins>+        , m_isFirstUpdateForNewViewSize(isFirstUpdateForNewViewSize)
</ins><span class="cx">         , m_isChangingObscuredInsetsInteractively(isChangingObscuredInsetsInteractively)
</span><span class="cx">         , m_allowShrinkToFit(allowShrinkToFit)
</span><span class="cx">         , m_enclosedInScrollableAncestorView(enclosedInScrollableAncestorView)
</span><span class="lines">@@ -75,6 +75,7 @@
</span><span class="cx"> 
</span><span class="cx">     double scale() const { return m_scale; }
</span><span class="cx">     bool inStableState() const { return m_inStableState; }
</span><ins>+    bool isFirstUpdateForNewViewSize() const { return m_isFirstUpdateForNewViewSize; }
</ins><span class="cx">     bool isChangingObscuredInsetsInteractively() const { return m_isChangingObscuredInsetsInteractively; }
</span><span class="cx">     bool allowShrinkToFit() const { return m_allowShrinkToFit; }
</span><span class="cx">     bool enclosedInScrollableAncestorView() const { return m_enclosedInScrollableAncestorView; }
</span><span class="lines">@@ -104,6 +105,7 @@
</span><span class="cx">     double m_verticalVelocity { 0 };
</span><span class="cx">     double m_scaleChangeRate { 0 };
</span><span class="cx">     bool m_inStableState { false };
</span><ins>+    bool m_isFirstUpdateForNewViewSize { false };
</ins><span class="cx">     bool m_isChangingObscuredInsetsInteractively { false };
</span><span class="cx">     bool m_allowShrinkToFit { false };
</span><span class="cx">     bool m_enclosedInScrollableAncestorView { false };
</span><span class="lines">@@ -121,6 +123,7 @@
</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><ins>+        &amp;&amp; a.isFirstUpdateForNewViewSize() == b.isFirstUpdateForNewViewSize()
</ins><span class="cx">         &amp;&amp; a.allowShrinkToFit() == b.allowShrinkToFit()
</span><span class="cx">         &amp;&amp; a.enclosedInScrollableAncestorView() == b.enclosedInScrollableAncestorView();
</span><span class="cx"> }
</span><span class="lines">@@ -128,5 +131,3 @@
</span><span class="cx"> WebCore::TextStream&amp; operator&lt;&lt;(WebCore::TextStream&amp;, const VisibleContentRectUpdateInfo&amp;);
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span><del>-
-#endif // VisibleContentRectUpdateInfo_h
</del></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -2025,8 +2025,13 @@
</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><ins>+        
+        BOOL sizeChanged = NO;
</ins><span class="cx">         if (auto drawingArea = _page-&gt;drawingArea())
</span><del>-            drawingArea-&gt;setSize(WebCore::IntSize(bounds.size), WebCore::IntSize(), WebCore::IntSize());
</del><ins>+            sizeChanged = drawingArea-&gt;setSize(WebCore::IntSize(bounds.size), WebCore::IntSize(), WebCore::IntSize());
+        
+        if (sizeChanged &amp; [self usesStandardContentView])
+            [_contentView setSizeChangedSinceLastVisibleContentRectUpdate:YES];
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     [_customContentView web_setMinimumSize:bounds.size];
</span><span class="lines">@@ -2105,7 +2110,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (_dynamicViewportUpdateMode != DynamicViewportUpdateMode::NotResizing
</span><del>-        || _needsResetViewStateAfterCommitLoadForMainFrame
</del><ins>+        || (_needsResetViewStateAfterCommitLoadForMainFrame &amp;&amp; ![_contentView sizeChangedSinceLastVisibleContentRectUpdate])
</ins><span class="cx">         || [_scrollView isZoomBouncing]
</span><span class="cx">         || _currentlyAdjustingScrollViewInsetsForKeyboard)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.cpp        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -55,15 +55,16 @@
</span><span class="cx">     m_webPageProxy.process().removeMessageReceiver(Messages::DrawingAreaProxy::messageReceiverName(), m_webPageProxy.pageID());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DrawingAreaProxy::setSize(const IntSize&amp; size, const IntSize&amp; layerPosition, const IntSize&amp; scrollOffset)
</del><ins>+bool DrawingAreaProxy::setSize(const IntSize&amp; size, const IntSize&amp; layerPosition, const IntSize&amp; scrollOffset)
</ins><span class="cx"> { 
</span><span class="cx">     if (m_size == size &amp;&amp; m_layerPosition == layerPosition &amp;&amp; scrollOffset.isZero())
</span><del>-        return;
</del><ins>+        return false;
</ins><span class="cx"> 
</span><span class="cx">     m_size = size;
</span><span class="cx">     m_layerPosition = layerPosition;
</span><span class="cx">     m_scrollOffset += scrollOffset;
</span><span class="cx">     sizeDidChange();
</span><ins>+    return true;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(COCOA)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessDrawingAreaProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/UIProcess/DrawingAreaProxy.h        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -68,7 +68,7 @@
</span><span class="cx">     virtual void waitForBackingStoreUpdateOnNextPaint() { }
</span><span class="cx"> 
</span><span class="cx">     const WebCore::IntSize&amp; size() const { return m_size; }
</span><del>-    void setSize(const WebCore::IntSize&amp;, const WebCore::IntSize&amp;, const WebCore::IntSize&amp; scrollOffset);
</del><ins>+    bool setSize(const WebCore::IntSize&amp;, const WebCore::IntSize&amp;, const WebCore::IntSize&amp; scrollOffset);
</ins><span class="cx"> 
</span><span class="cx">     // The timeout we use when waiting for a DidUpdateGeometry message.
</span><span class="cx">     static constexpr Seconds didUpdateBackingStoreStateTimeout() { return Seconds::fromMilliseconds(500); }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -346,16 +346,6 @@
</span><span class="cx"> #if ENABLE(FULLSCREEN_API)
</span><span class="cx">     , m_fullscreenClient(std::make_unique&lt;API::FullscreenClient&gt;())
</span><span class="cx"> #endif
</span><del>-#if PLATFORM(IOS)
-    , m_hasReceivedLayerTreeTransactionAfterDidCommitLoad(true)
-    , m_firstLayerTreeTransactionIdAfterDidCommitLoad(0)
-    , m_deviceOrientation(0)
-    , m_dynamicViewportSizeUpdateWaitingForTarget(false)
-    , m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit(false)
-    , m_dynamicViewportSizeUpdateLayerTreeTransactionID(0)
-    , m_layerTreeTransactionIdAtLastTouchStart(0)
-    , m_hasNetworkRequestsOnSuspended(false)
-#endif
</del><span class="cx">     , m_geolocationPermissionRequestManager(*this)
</span><span class="cx">     , m_notificationPermissionRequestManager(*this)
</span><span class="cx">     , m_activityState(ActivityState::NoFlags)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -1655,15 +1655,15 @@
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     VisibleContentRectUpdateInfo m_lastVisibleContentRectUpdate;
</span><del>-    bool m_hasReceivedLayerTreeTransactionAfterDidCommitLoad;
-    uint64_t m_firstLayerTreeTransactionIdAfterDidCommitLoad;
-    int32_t m_deviceOrientation;
-    bool m_dynamicViewportSizeUpdateWaitingForTarget;
-    bool m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit;
-    uint64_t m_dynamicViewportSizeUpdateLayerTreeTransactionID;
-    uint64_t m_layerTreeTransactionIdAtLastTouchStart;
</del><ins>+    bool m_hasReceivedLayerTreeTransactionAfterDidCommitLoad { true };
+    uint64_t m_firstLayerTreeTransactionIdAfterDidCommitLoad { 0 };
+    int32_t m_deviceOrientation { 0 };
+    bool m_dynamicViewportSizeUpdateWaitingForTarget { false };
+    bool m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit { false };
+    uint64_t m_dynamicViewportSizeUpdateLayerTreeTransactionID { 0 };
+    uint64_t m_layerTreeTransactionIdAtLastTouchStart { 0 };
</ins><span class="cx">     uint64_t m_currentDynamicViewportSizeUpdateID { 0 };
</span><del>-    bool m_hasNetworkRequestsOnSuspended;
</del><ins>+    bool m_hasNetworkRequestsOnSuspended { false };
</ins><span class="cx">     bool m_isKeyboardAnimatingIn { false };
</span><span class="cx">     bool m_isScrollingOrZooming { false };
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.h (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.h        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -63,6 +63,7 @@
</span><span class="cx"> @property (nonatomic, getter=isShowingInspectorIndication) BOOL showingInspectorIndication;
</span><span class="cx"> @property (nonatomic, readonly) BOOL isBackground;
</span><span class="cx"> @property (nonatomic, readonly, getter=isResigningFirstResponder) BOOL resigningFirstResponder;
</span><ins>+@property (nonatomic) BOOL sizeChangedSinceLastVisibleContentRectUpdate;
</ins><span class="cx"> 
</span><span class="cx"> - (instancetype)initWithFrame:(CGRect)frame processPool:(WebKit::WebProcessPool&amp;)processPool configuration:(Ref&lt;API::PageConfiguration&gt;&amp;&amp;)configuration webView:(WKWebView *)webView;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentView.mm        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -393,6 +393,7 @@
</span><span class="cx">         WebCore::FloatSize(obscuredInset),
</span><span class="cx">         zoomScale,
</span><span class="cx">         isStableState,
</span><ins>+        _sizeChangedSinceLastVisibleContentRectUpdate,
</ins><span class="cx">         isChangingObscuredInsetsInteractively,
</span><span class="cx">         _webView._allowsViewportShrinkToFit,
</span><span class="cx">         enclosedInScrollableAncestorView,
</span><span class="lines">@@ -406,6 +407,8 @@
</span><span class="cx"> 
</span><span class="cx">     _page-&gt;updateVisibleContentRects(visibleContentRectUpdateInfo);
</span><span class="cx"> 
</span><ins>+    _sizeChangedSinceLastVisibleContentRectUpdate = NO;
+
</ins><span class="cx">     FloatRect fixedPositionRect = _page-&gt;computeCustomFixedPositionRect(_page-&gt;unobscuredContentRect(), _page-&gt;customFixedPositionRect(), zoomScale, WebPageProxy::UnobscuredRectConstraint::Unconstrained, scrollingCoordinator-&gt;visualViewportEnabled());
</span><span class="cx">     scrollingCoordinator-&gt;viewportChangedViaDelegatedScrolling(scrollingCoordinator-&gt;rootScrollingNodeID(), fixedPositionRect, zoomScale);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (209844 => 209845)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-12-15 00:47:54 UTC (rev 209844)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-12-15 01:06:21 UTC (rev 209845)
</span><span class="lines">@@ -3007,12 +3007,12 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::updateVisibleContentRects(const VisibleContentRectUpdateInfo&amp; visibleContentRectUpdateInfo, MonotonicTime oldestTimestamp)
</span><span class="cx"> {
</span><ins>+    LOG_WITH_STREAM(VisibleRects, stream &lt;&lt; &quot;\nWebPage::updateVisibleContentRects &quot; &lt;&lt; visibleContentRectUpdateInfo);
+
</ins><span class="cx">     // Skip any VisibleContentRectUpdate that have been queued before DidCommitLoad suppresses the updates in the UIProcess.
</span><del>-    if (visibleContentRectUpdateInfo.lastLayerTreeTransactionID() &lt; m_mainFrame-&gt;firstLayerTreeTransactionIDAfterDidCommitLoad())
</del><ins>+    if (visibleContentRectUpdateInfo.lastLayerTreeTransactionID() &lt; m_mainFrame-&gt;firstLayerTreeTransactionIDAfterDidCommitLoad() &amp;&amp; !visibleContentRectUpdateInfo.isFirstUpdateForNewViewSize())
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><del>-    LOG_WITH_STREAM(VisibleRects, stream &lt;&lt; &quot;\nWebPage::updateVisibleContentRects &quot; &lt;&lt; visibleContentRectUpdateInfo);
-
</del><span class="cx">     m_hasReceivedVisibleContentRectsAfterDidCommitLoad = true;
</span><span class="cx">     m_isInStableState = visibleContentRectUpdateInfo.inStableState();
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>