<!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>[190064] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/190064">190064</a></dd>
<dt>Author</dt> <dd>timothy_horton@apple.com</dd>
<dt>Date</dt> <dd>2015-09-21 12:03:31 -0700 (Mon, 21 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>Layout milestones aren't synchronized with UI-side compositing transactions
https://bugs.webkit.org/show_bug.cgi?id=149362

Reviewed by Anders Carlsson.

Because layout milestones are primarily used to synchronize things with
the displayed layout/rendering of the page, they should fire at the same
time as the contents of the view change.

However, with UI-side compositing, the layer tree transaction will
most likely come in *after* the layout milestones associated with its
contents fire, breaking this synchronization.

Instead, put the layout milestones inside the transaction and fire them
immediately after it is committed in the UI process.

* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
(WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones):
(WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
Add LayoutMilestones to the transaction.

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didLayout):
* UIProcess/API/APINavigationClient.h:
(API::NavigationClient::renderingProgressDidChange):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
(WKPageSetPageNavigationClient):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
Remove the UserData parameter from didLayout/renderingProgressDidChange,
except for at the API level where we'll always pass null.
Nobody uses UserData on didLayout, and we'll assert if any client sets it
(and it won't get passed through to the UI process).

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didLayoutForCustomContentProvider):
Just call didLayout with the relevant milestones instead of reimplementing it.

(WebKit::WebPageProxy::didLayout):
* UIProcess/WebPageProxy.h:
Make didLayout public.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
Let WebPage handle dispatching didLayout.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dispatchDidLayout):
* WebProcess/WebPage/WebPage.h:
Let the DrawingArea handle dispatching didLayout.
If it doesn't want to handle it, we'll just do the normal thing
and dispatch an async message.

* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
If we reach a new layout milestone, dispatch didLayout client/delegate callbacks.

* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::dispatchDidLayout):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout):
Queue up milestones as we reach them, and send them in the transaction.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionh">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h</a></li>
<li><a href="#trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionmm">trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPILoaderClienth">trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPINavigationClienth">trunk/Source/WebKit2/UIProcess/API/APINavigationClient.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICWKPagecpp">trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaNavigationStateh">trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaNavigationStatemm">trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm</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="#trunkSourceWebKit2UIProcessWebPageProxymessagesin">trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in</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="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/ChangeLog        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -1,3 +1,80 @@
</span><ins>+2015-09-21  Tim Horton  &lt;timothy_horton@apple.com&gt;
+
+        Layout milestones aren't synchronized with UI-side compositing transactions
+        https://bugs.webkit.org/show_bug.cgi?id=149362
+
+        Reviewed by Anders Carlsson.
+        
+        Because layout milestones are primarily used to synchronize things with
+        the displayed layout/rendering of the page, they should fire at the same
+        time as the contents of the view change.
+
+        However, with UI-side compositing, the layer tree transaction will
+        most likely come in *after* the layout milestones associated with its
+        contents fire, breaking this synchronization.
+
+        Instead, put the layout milestones inside the transaction and fire them
+        immediately after it is committed in the UI process.
+
+        * Shared/mac/RemoteLayerTreeTransaction.h:
+        (WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
+        (WebKit::RemoteLayerTreeTransaction::newlyReachedLayoutMilestones):
+        (WebKit::RemoteLayerTreeTransaction::setNewlyReachedLayoutMilestones):
+        * Shared/mac/RemoteLayerTreeTransaction.mm:
+        (WebKit::RemoteLayerTreeTransaction::RemoteLayerTreeTransaction):
+        (WebKit::RemoteLayerTreeTransaction::encode):
+        (WebKit::RemoteLayerTreeTransaction::decode):
+        Add LayoutMilestones to the transaction.
+
+        * UIProcess/API/APILoaderClient.h:
+        (API::LoaderClient::didLayout):
+        * UIProcess/API/APINavigationClient.h:
+        (API::NavigationClient::renderingProgressDidChange):
+        * UIProcess/API/C/WKPage.cpp:
+        (WKPageSetPageLoaderClient):
+        (WKPageSetPageNavigationClient):
+        * UIProcess/Cocoa/NavigationState.h:
+        * UIProcess/Cocoa/NavigationState.mm:
+        (WebKit::NavigationState::NavigationClient::renderingProgressDidChange):
+        * UIProcess/WebPageProxy.messages.in:
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::didCommitLayerTree):
+        Remove the UserData parameter from didLayout/renderingProgressDidChange,
+        except for at the API level where we'll always pass null.
+        Nobody uses UserData on didLayout, and we'll assert if any client sets it
+        (and it won't get passed through to the UI process).
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::didLayoutForCustomContentProvider):
+        Just call didLayout with the relevant milestones instead of reimplementing it.
+
+        (WebKit::WebPageProxy::didLayout):
+        * UIProcess/WebPageProxy.h:
+        Make didLayout public.
+
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDidLayout):
+        Let WebPage handle dispatching didLayout.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::dispatchDidLayout):
+        * WebProcess/WebPage/WebPage.h:
+        Let the DrawingArea handle dispatching didLayout.
+        If it doesn't want to handle it, we'll just do the normal thing
+        and dispatch an async message.
+
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
+        If we reach a new layout milestone, dispatch didLayout client/delegate callbacks.
+
+        * WebProcess/WebPage/DrawingArea.h:
+        (WebKit::DrawingArea::dispatchDidLayout):
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
+        * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+        (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+        (WebKit::RemoteLayerTreeDrawingArea::dispatchDidLayout):
+        Queue up milestones as we reach them, and send them in the transaction.
+
</ins><span class="cx"> 2015-09-20  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove XHR_TIMEOUT compilation guard
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &lt;WebCore/FilterOperations.h&gt;
</span><span class="cx"> #include &lt;WebCore/FloatPoint3D.h&gt;
</span><span class="cx"> #include &lt;WebCore/FloatSize.h&gt;
</span><ins>+#include &lt;WebCore/LayoutMilestones.h&gt;
</ins><span class="cx"> #include &lt;WebCore/PlatformCALayer.h&gt;
</span><span class="cx"> #include &lt;WebCore/TransformationMatrix.h&gt;
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="lines">@@ -231,7 +232,10 @@
</span><span class="cx"> 
</span><span class="cx">     typedef uint64_t TransactionCallbackID;
</span><span class="cx">     const Vector&lt;TransactionCallbackID&gt;&amp; callbackIDs() const { return m_callbackIDs; }
</span><del>-    void setCallbackIDs(Vector&lt;TransactionCallbackID&gt; callbackIDs) { m_callbackIDs = WTF::move(callbackIDs); }
</del><ins>+    void setCallbackIDs(Vector&lt;TransactionCallbackID&gt;&amp;&amp; callbackIDs) { m_callbackIDs = WTF::move(callbackIDs); }
+
+    WebCore::LayoutMilestones newlyReachedLayoutMilestones() const { return m_newlyReachedLayoutMilestones; }
+    void setNewlyReachedLayoutMilestones(WebCore::LayoutMilestones milestones) { m_newlyReachedLayoutMilestones = milestones; }
</ins><span class="cx">     
</span><span class="cx"> private:
</span><span class="cx">     WebCore::GraphicsLayer::PlatformLayerID m_rootLayerID;
</span><span class="lines">@@ -251,13 +255,14 @@
</span><span class="cx">     WebCore::IntPoint m_scrollPosition;
</span><span class="cx"> #endif
</span><span class="cx">     WebCore::Color m_pageExtendedBackgroundColor;
</span><del>-    double m_pageScaleFactor;
-    double m_minimumScaleFactor;
-    double m_maximumScaleFactor;
-    uint64_t m_renderTreeSize;
-    uint64_t m_transactionID;
-    bool m_scaleWasSetByUIProcess;
-    bool m_allowsUserScaling;
</del><ins>+    double m_pageScaleFactor { 1 };
+    double m_minimumScaleFactor { 1 };
+    double m_maximumScaleFactor { 1 };
+    uint64_t m_renderTreeSize { 0 };
+    uint64_t m_transactionID { 0 };
+    WebCore::LayoutMilestones m_newlyReachedLayoutMilestones { 0 };
+    bool m_scaleWasSetByUIProcess { false };
+    bool m_allowsUserScaling { false };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacRemoteLayerTreeTransactionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -485,13 +485,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RemoteLayerTreeTransaction::RemoteLayerTreeTransaction()
</span><del>-    : m_pageScaleFactor(1)
-    , m_minimumScaleFactor(1)
-    , m_maximumScaleFactor(1)
-    , m_renderTreeSize(0)
-    , m_transactionID(0)
-    , m_scaleWasSetByUIProcess(false)
-    , m_allowsUserScaling(false)
</del><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -528,6 +521,8 @@
</span><span class="cx">     encoder &lt;&lt; m_renderTreeSize;
</span><span class="cx">     encoder &lt;&lt; m_transactionID;
</span><span class="cx"> 
</span><ins>+    encoder &lt;&lt; m_newlyReachedLayoutMilestones;
+
</ins><span class="cx">     encoder &lt;&lt; m_scaleWasSetByUIProcess;
</span><span class="cx">     encoder &lt;&lt; m_allowsUserScaling;
</span><span class="cx"> 
</span><span class="lines">@@ -608,6 +603,9 @@
</span><span class="cx">     if (!decoder.decode(result.m_transactionID))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+    if (!decoder.decode(result.m_newlyReachedLayoutMilestones))
+        return false;
+
</ins><span class="cx">     if (!decoder.decode(result.m_scaleWasSetByUIProcess))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPILoaderClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/UIProcess/API/APILoaderClient.h        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">     virtual void didRunInsecureContentForFrame(WebKit::WebPageProxy&amp;, WebKit::WebFrameProxy&amp;, API::Object*) { }
</span><span class="cx">     virtual void didDetectXSSForFrame(WebKit::WebPageProxy&amp;, WebKit::WebFrameProxy&amp;, API::Object*) { }
</span><span class="cx"> 
</span><del>-    virtual void didLayout(WebKit::WebPageProxy&amp;, WebCore::LayoutMilestones, API::Object*) { }
</del><ins>+    virtual void didLayout(WebKit::WebPageProxy&amp;, WebCore::LayoutMilestones) { }
</ins><span class="cx">     
</span><span class="cx">     virtual bool canAuthenticateAgainstProtectionSpaceInFrame(WebKit::WebPageProxy&amp;, WebKit::WebFrameProxy&amp;, WebKit::WebProtectionSpace*) { return false; }
</span><span class="cx">     virtual void didReceiveAuthenticationChallengeInFrame(WebKit::WebPageProxy&amp;, WebKit::WebFrameProxy&amp;, WebKit::AuthenticationChallengeProxy*) { }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPINavigationClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APINavigationClient.h (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APINavigationClient.h        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/UIProcess/API/APINavigationClient.h        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">     virtual void didFailNavigationWithError(WebKit::WebPageProxy&amp;, WebKit::WebFrameProxy&amp;, API::Navigation*, const WebCore::ResourceError&amp;, API::Object*) { }
</span><span class="cx">     virtual void didSameDocumentNavigation(WebKit::WebPageProxy&amp;, API::Navigation*, WebKit::SameDocumentNavigationType, API::Object*) { }
</span><span class="cx"> 
</span><del>-    virtual void renderingProgressDidChange(WebKit::WebPageProxy&amp;, WebCore::LayoutMilestones, API::Object*) { }
</del><ins>+    virtual void renderingProgressDidChange(WebKit::WebPageProxy&amp;, WebCore::LayoutMilestones) { }
</ins><span class="cx"> 
</span><span class="cx">     virtual bool canAuthenticateAgainstProtectionSpace(WebKit::WebPageProxy&amp;, WebKit::WebProtectionSpace*) { return false; }
</span><span class="cx">     virtual void didReceiveAuthenticationChallenge(WebKit::WebPageProxy&amp;, WebKit::AuthenticationChallengeProxy*) { }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICWKPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -1013,12 +1013,12 @@
</span><span class="cx">             m_client.didFirstVisuallyNonEmptyLayoutForFrame(toAPI(&amp;page), toAPI(&amp;frame), toAPI(userData), m_client.base.clientInfo);
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        virtual void didLayout(WebPageProxy&amp; page, LayoutMilestones milestones, API::Object* userData) override
</del><ins>+        virtual void didLayout(WebPageProxy&amp; page, LayoutMilestones milestones) override
</ins><span class="cx">         {
</span><span class="cx">             if (!m_client.didLayout)
</span><span class="cx">                 return;
</span><span class="cx"> 
</span><del>-            m_client.didLayout(toAPI(&amp;page), toWKLayoutMilestones(milestones), toAPI(userData), m_client.base.clientInfo);
</del><ins>+            m_client.didLayout(toAPI(&amp;page), toWKLayoutMilestones(milestones), nullptr, m_client.base.clientInfo);
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         virtual void didRemoveFrameFromHierarchy(WebPageProxy&amp; page, WebFrameProxy&amp; frame, API::Object* userData) override
</span><span class="lines">@@ -2068,11 +2068,11 @@
</span><span class="cx">             m_client.didSameDocumentNavigation(toAPI(&amp;page), toAPI(navigation), toAPI(navigationType), toAPI(userData), m_client.base.clientInfo);
</span><span class="cx">         }
</span><span class="cx">         
</span><del>-        virtual void renderingProgressDidChange(WebPageProxy&amp; page, WebCore::LayoutMilestones milestones, API::Object* userData) override
</del><ins>+        virtual void renderingProgressDidChange(WebPageProxy&amp; page, WebCore::LayoutMilestones milestones) override
</ins><span class="cx">         {
</span><span class="cx">             if (!m_client.renderingProgressDidChange)
</span><span class="cx">                 return;
</span><del>-            m_client.renderingProgressDidChange(toAPI(&amp;page), pageRenderingProgressEvents(milestones), toAPI(userData), m_client.base.clientInfo);
</del><ins>+            m_client.renderingProgressDidChange(toAPI(&amp;page), pageRenderingProgressEvents(milestones), nullptr, m_client.base.clientInfo);
</ins><span class="cx">         }
</span><span class="cx">         
</span><span class="cx">         virtual bool canAuthenticateAgainstProtectionSpace(WebPageProxy&amp; page, WebProtectionSpace* protectionSpace) override
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.h        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">         virtual void didFailNavigationWithError(WebPageProxy&amp;, WebFrameProxy&amp;, API::Navigation*, const WebCore::ResourceError&amp;, API::Object*) override;
</span><span class="cx">         virtual void didSameDocumentNavigation(WebPageProxy&amp;, API::Navigation*, SameDocumentNavigationType, API::Object*) override;
</span><span class="cx"> 
</span><del>-        virtual void renderingProgressDidChange(WebPageProxy&amp;, WebCore::LayoutMilestones, API::Object*) override;
</del><ins>+        virtual void renderingProgressDidChange(WebPageProxy&amp;, WebCore::LayoutMilestones) override;
</ins><span class="cx"> 
</span><span class="cx">         virtual bool canAuthenticateAgainstProtectionSpace(WebPageProxy&amp;, WebProtectionSpace*) override;
</span><span class="cx">         virtual void didReceiveAuthenticationChallenge(WebPageProxy&amp;, AuthenticationChallengeProxy*) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaNavigationStatemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/NavigationState.mm        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -583,7 +583,7 @@
</span><span class="cx">     [static_cast&lt;id &lt;WKNavigationDelegatePrivate&gt;&gt;(navigationDelegate.get()) _webView:m_navigationState.m_webView navigation:wkNavigation didSameDocumentNavigation:toWKSameDocumentNavigationType(navigationType)];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void NavigationState::NavigationClient::renderingProgressDidChange(WebKit::WebPageProxy&amp;, WebCore::LayoutMilestones layoutMilestones, API::Object*)
</del><ins>+void NavigationState::NavigationClient::renderingProgressDidChange(WebKit::WebPageProxy&amp;, WebCore::LayoutMilestones layoutMilestones)
</ins><span class="cx"> {
</span><span class="cx">     if (!m_navigationState.m_navigationDelegateMethods.webViewRenderingProgressDidChange)
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -3168,23 +3168,17 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::didLayoutForCustomContentProvider()
</span><span class="cx"> {
</span><del>-    PageClientProtector protector(m_pageClient);
-
-    LayoutMilestones milestones = DidFirstLayout | DidFirstVisuallyNonEmptyLayout | DidHitRelevantRepaintedObjectsAreaThreshold;
-    if (m_navigationClient)
-        m_navigationClient-&gt;renderingProgressDidChange(*this, milestones, nullptr);
-    else
-        m_loaderClient-&gt;didLayout(*this, milestones, nullptr);
</del><ins>+    didLayout(DidFirstLayout | DidFirstVisuallyNonEmptyLayout | DidHitRelevantRepaintedObjectsAreaThreshold);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::didLayout(uint32_t layoutMilestones, const UserData&amp; userData)
</del><ins>+void WebPageProxy::didLayout(uint32_t layoutMilestones)
</ins><span class="cx"> {
</span><span class="cx">     PageClientProtector protector(m_pageClient);
</span><span class="cx"> 
</span><span class="cx">     if (m_navigationClient)
</span><del>-        m_navigationClient-&gt;renderingProgressDidChange(*this, static_cast&lt;LayoutMilestones&gt;(layoutMilestones), m_process-&gt;transformHandlesToObjects(userData.object()).get());
</del><ins>+        m_navigationClient-&gt;renderingProgressDidChange(*this, static_cast&lt;LayoutMilestones&gt;(layoutMilestones));
</ins><span class="cx">     else
</span><del>-        m_loaderClient-&gt;didLayout(*this, static_cast&lt;LayoutMilestones&gt;(layoutMilestones), m_process-&gt;transformHandlesToObjects(userData.object()).get());
</del><ins>+        m_loaderClient-&gt;didLayout(*this, static_cast&lt;LayoutMilestones&gt;(layoutMilestones));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::didRemoveFrameFromHierarchy(uint64_t frameID, const UserData&amp; userData)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -1059,6 +1059,8 @@
</span><span class="cx"> 
</span><span class="cx">     void clearWheelEventTestTrigger();
</span><span class="cx"> 
</span><ins>+    void didLayout(uint32_t layoutMilestones);
+
</ins><span class="cx"> private:
</span><span class="cx">     WebPageProxy(PageClient&amp;, WebProcessProxy&amp;, uint64_t pageID, Ref&lt;API::PageConfiguration&gt;&amp;&amp;);
</span><span class="cx">     void platformInitialize();
</span><span class="lines">@@ -1108,7 +1110,6 @@
</span><span class="cx">     void didReceiveTitleForFrame(uint64_t frameID, const String&amp;, const UserData&amp;);
</span><span class="cx">     void didFirstLayoutForFrame(uint64_t frameID, const UserData&amp;);
</span><span class="cx">     void didFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, const UserData&amp;);
</span><del>-    void didLayout(uint32_t layoutMilestones, const UserData&amp;);
</del><span class="cx">     void didRemoveFrameFromHierarchy(uint64_t frameID, const UserData&amp;);
</span><span class="cx">     void didDisplayInsecureContentForFrame(uint64_t frameID, const UserData&amp;);
</span><span class="cx">     void didRunInsecureContentForFrame(uint64_t frameID, const UserData&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -136,7 +136,7 @@
</span><span class="cx">     DidFinishLoadForFrame(uint64_t frameID, uint64_t navigationID, WebKit::UserData userData)
</span><span class="cx">     DidFirstLayoutForFrame(uint64_t frameID, WebKit::UserData userData)
</span><span class="cx">     DidFirstVisuallyNonEmptyLayoutForFrame(uint64_t frameID, WebKit::UserData userData)
</span><del>-    DidLayout(uint32_t type, WebKit::UserData userData)
</del><ins>+    DidLayout(uint32_t type)
</ins><span class="cx">     DidRemoveFrameFromHierarchy(uint64_t frameID, WebKit::UserData userData)
</span><span class="cx">     DidReceiveTitleForFrame(uint64_t frameID, String title, WebKit::UserData userData)
</span><span class="cx">     DidDisplayInsecureContentForFrame(uint64_t frameID, WebKit::UserData userData)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -352,10 +352,11 @@
</span><span class="cx"> 
</span><span class="cx">     m_pageClient.didCommitLayerTree(layerTreeTransaction);
</span><span class="cx"> 
</span><ins>+    // FIXME: Remove this special mechanism and fold it into the transaction's layout milestones.
</ins><span class="cx">     if (m_wantsSessionRestorationRenderTreeSizeThresholdEvent &amp;&amp; !m_hitRenderTreeSizeThreshold
</span><span class="cx">         &amp;&amp; exceedsRenderTreeSizeSizeThreshold(m_sessionRestorationRenderTreeSize, layerTreeTransaction.renderTreeSize())) {
</span><span class="cx">         m_hitRenderTreeSizeThreshold = true;
</span><del>-        didLayout(WebCore::ReachedSessionRestorationRenderTreeSizeThreshold, UserData());
</del><ins>+        didLayout(WebCore::ReachedSessionRestorationRenderTreeSizeThreshold);
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -238,6 +238,9 @@
</span><span class="cx"> #else
</span><span class="cx">     didRefreshDisplay(monotonicallyIncreasingTime());
</span><span class="cx"> #endif
</span><ins>+
+    if (auto milestones = layerTreeTransaction.newlyReachedLayoutMilestones())
+        m_webPageProxy.didLayout(milestones);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart(uint64_t layerID, const String&amp; key, double startTime)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -604,8 +604,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Send this after DidFirstLayout-specific calls since some clients expect to get those messages first.
</span><del>-    webPage-&gt;injectedBundleLoaderClient().didLayout(webPage, milestones, userData);
-    webPage-&gt;send(Messages::WebPageProxy::DidLayout(milestones, UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
</del><ins>+    webPage-&gt;dispatchDidLayout(milestones);
</ins><span class="cx"> 
</span><span class="cx">     if (milestones &amp; DidFirstVisuallyNonEmptyLayout) {
</span><span class="cx">         if (m_frame-&gt;isMainFrame() &amp;&amp; !m_didCompletePageTransition &amp;&amp; !webPage-&gt;corePage()-&gt;settings().suppressesIncrementalRendering()) {
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.h        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #include &lt;WebCore/FloatRect.h&gt;
</span><span class="cx"> #include &lt;WebCore/IntRect.h&gt;
</span><span class="cx"> #include &lt;WebCore/LayerFlushThrottleState.h&gt;
</span><ins>+#include &lt;WebCore/LayoutMilestones.h&gt;
</ins><span class="cx"> #include &lt;WebCore/PlatformScreen.h&gt;
</span><span class="cx"> #include &lt;WebCore/ViewState.h&gt;
</span><span class="cx"> #include &lt;functional&gt;
</span><span class="lines">@@ -129,6 +130,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual void setShouldScaleViewToFitDocument(bool) { }
</span><span class="cx"> 
</span><ins>+    virtual bool dispatchDidLayout(WebCore::LayoutMilestones) { return false; }
+
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     // Used by TiledCoreAnimationDrawingArea.
</span><span class="cx">     virtual void updateGeometry(const WebCore::IntSize&amp; viewSize, const WebCore::IntSize&amp; layerPosition, bool flushSynchronously, const WebCore::MachSendRight&amp; fencePort) { }
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -5019,4 +5019,19 @@
</span><span class="cx">     m_userContentController-&gt;userContentController().removeAllUserContent();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void WebPage::dispatchDidLayout(WebCore::LayoutMilestones milestones)
+{
+    RefPtr&lt;API::Object&gt; userData;
+    injectedBundleLoaderClient().didLayout(this, milestones, userData);
+
+    // Clients should not set userData for this message, and it won't be passed through.
+    ASSERT(!userData);
+
+    // The drawing area might want to defer dispatch of didLayout to the UI process.
+    if (m_drawingArea &amp;&amp; m_drawingArea-&gt;dispatchDidLayout(milestones))
+        return;
+
+    send(Messages::WebPageProxy::DidLayout(milestones));
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -919,6 +919,8 @@
</span><span class="cx">     void addUserStyleSheet(const String&amp; source, WebCore::UserContentInjectedFrames);
</span><span class="cx">     void removeAllUserContent();
</span><span class="cx"> 
</span><ins>+    void dispatchDidLayout(WebCore::LayoutMilestones);
+
</ins><span class="cx"> private:
</span><span class="cx">     WebPage(uint64_t pageID, const WebPageCreationParameters&amp;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -111,6 +111,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool adjustLayerFlushThrottling(WebCore::LayerFlushThrottleState::Flags) override;
</span><span class="cx"> 
</span><ins>+    virtual bool dispatchDidLayout(WebCore::LayoutMilestones) override;
+
</ins><span class="cx">     void updateScrolledExposedRect();
</span><span class="cx">     void updateRootLayers();
</span><span class="cx"> 
</span><span class="lines">@@ -166,6 +168,8 @@
</span><span class="cx">     uint64_t m_currentTransactionID;
</span><span class="cx">     Vector&lt;RemoteLayerTreeTransaction::TransactionCallbackID&gt; m_pendingCallbackIDs;
</span><span class="cx"> 
</span><ins>+    WebCore::LayoutMilestones m_pendingNewlyReachedLayoutMilestones;
+
</ins><span class="cx">     WebCore::GraphicsLayer* m_contentLayer;
</span><span class="cx">     WebCore::GraphicsLayer* m_viewOverlayRootLayer;
</span><span class="cx">     
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (190063 => 190064)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2015-09-21 18:59:34 UTC (rev 190063)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2015-09-21 19:03:31 UTC (rev 190064)
</span><span class="lines">@@ -383,6 +383,9 @@
</span><span class="cx">     backingStoreCollection.willCommitLayerTree(layerTransaction);
</span><span class="cx">     m_webPage.willCommitLayerTree(layerTransaction);
</span><span class="cx"> 
</span><ins>+    layerTransaction.setNewlyReachedLayoutMilestones(m_pendingNewlyReachedLayoutMilestones);
+    m_pendingNewlyReachedLayoutMilestones = 0;
+
</ins><span class="cx">     RemoteScrollingCoordinatorTransaction scrollingTransaction;
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx">     if (m_webPage.scrollingCoordinator())
</span><span class="lines">@@ -504,4 +507,10 @@
</span><span class="cx">     scheduleCompositingLayerFlush();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool RemoteLayerTreeDrawingArea::dispatchDidLayout(WebCore::LayoutMilestones layoutMilestones)
+{
+    m_pendingNewlyReachedLayoutMilestones |= layoutMilestones;
+    return true;
+}
+
</ins><span class="cx"> } // namespace WebKit
</span></span></pre>
</div>
</div>

</body>
</html>