<!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>[171549] branches/safari-600.1-branch/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/171549">171549</a></dd>
<dt>Author</dt> <dd>lforschler@apple.com</dd>
<dt>Date</dt> <dd>2014-07-24 16:21:38 -0700 (Thu, 24 Jul 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/171532">r171532</a>.  &lt;rdar://problem/17279500&gt;</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari6001branchSourceWebCoreChangeLog">branches/safari-600.1-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari6001branchSourceWebCorepagescrollingScrollingTreecpp">branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.cpp</a></li>
<li><a href="#branchessafari6001branchSourceWebCorepagescrollingScrollingTreeh">branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.h</a></li>
<li><a href="#branchessafari6001branchSourceWebCorepagescrollingmacScrollingTreeFixedNodemm">branches/safari-600.1-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm</a></li>
<li><a href="#branchessafari6001branchSourceWebCorepagescrollingmacScrollingTreeStickyNodemm">branches/safari-600.1-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2ChangeLog">branches/safari-600.1-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessScrollingRemoteScrollingCoordinatorProxycpp">branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessScrollingRemoteScrollingCoordinatorProxyh">branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessiosRemoteScrollingCoordinatorProxyIOSmm">branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm</a></li>
<li><a href="#branchessafari6001branchSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm">branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari6001branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/ChangeLog (171548 => 171549)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/ChangeLog        2014-07-24 23:17:43 UTC (rev 171548)
+++ branches/safari-600.1-branch/Source/WebCore/ChangeLog        2014-07-24 23:21:38 UTC (rev 171549)
</span><span class="lines">@@ -1,5 +1,32 @@
</span><span class="cx"> 2014-07-24  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r171532
+
+    2014-07-24  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
+
+            [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
+            https://bugs.webkit.org/show_bug.cgi?id=135227
+            &lt;rdar://problem/17279500&gt;
+
+            Reviewed by Simon Fraser.
+
+            Keep track of the creation/destruction of Fixed and Sticky nodes in the ScrollingTree.
+
+            * page/scrolling/ScrollingTree.cpp:
+            (WebCore::ScrollingTree::ScrollingTree):
+            * page/scrolling/ScrollingTree.h:
+            (WebCore::ScrollingTree::hasFixedOrSticky):
+            (WebCore::ScrollingTree::fixedOrStickyNodeAdded):
+            (WebCore::ScrollingTree::fixedOrStickyNodeRemoved):
+            * page/scrolling/mac/ScrollingTreeFixedNode.mm:
+            (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
+            (WebCore::ScrollingTreeFixedNode::~ScrollingTreeFixedNode):
+            * page/scrolling/mac/ScrollingTreeStickyNode.mm:
+            (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
+            (WebCore::ScrollingTreeStickyNode::~ScrollingTreeStickyNode):
+
+2014-07-24  Lucas Forschler  &lt;lforschler@apple.com&gt;
+
</ins><span class="cx">         Merge r171526
</span><span class="cx"> 
</span><span class="cx">     2014-07-24  Pratik Solanki  &lt;psolanki@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCorepagescrollingScrollingTreecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.cpp (171548 => 171549)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.cpp        2014-07-24 23:17:43 UTC (rev 171548)
+++ branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.cpp        2014-07-24 23:21:38 UTC (rev 171549)
</span><span class="lines">@@ -51,6 +51,7 @@
</span><span class="cx">     , m_latchedNode(0)
</span><span class="cx">     , m_scrollingPerformanceLoggingEnabled(false)
</span><span class="cx">     , m_isHandlingProgrammaticScroll(false)
</span><ins>+    , m_fixedOrStickyNodeCount(0)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCorepagescrollingScrollingTreeh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.h (171548 => 171549)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.h        2014-07-24 23:17:43 UTC (rev 171548)
+++ branches/safari-600.1-branch/Source/WebCore/page/scrolling/ScrollingTree.h        2014-07-24 23:21:38 UTC (rev 171549)
</span><span class="lines">@@ -128,6 +128,14 @@
</span><span class="cx"> 
</span><span class="cx">     bool hasLatchedNode() const { return m_latchedNode; }
</span><span class="cx">     void setOrClearLatchedNode(const PlatformWheelEvent&amp;, ScrollingNodeID);
</span><ins>+
+    bool hasFixedOrSticky() const { return !!m_fixedOrStickyNodeCount; }
+    void fixedOrStickyNodeAdded() { ++m_fixedOrStickyNodeCount; }
+    void fixedOrStickyNodeRemoved()
+    {
+        ASSERT(m_fixedOrStickyNodeCount);
+        --m_fixedOrStickyNodeCount;
+    }
</ins><span class="cx">     
</span><span class="cx"> protected:
</span><span class="cx">     void setMainFrameScrollPosition(FloatPoint);
</span><span class="lines">@@ -167,6 +175,7 @@
</span><span class="cx">     bool m_scrollingPerformanceLoggingEnabled;
</span><span class="cx">     
</span><span class="cx">     bool m_isHandlingProgrammaticScroll;
</span><ins>+    unsigned m_fixedOrStickyNodeCount;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> #define SCROLLING_TREE_TYPE_CASTS(ToValueTypeName, predicate) \
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCorepagescrollingmacScrollingTreeFixedNodemm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm (171548 => 171549)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm        2014-07-24 23:17:43 UTC (rev 171548)
+++ branches/safari-600.1-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm        2014-07-24 23:21:38 UTC (rev 171549)
</span><span class="lines">@@ -42,10 +42,12 @@
</span><span class="cx"> ScrollingTreeFixedNode::ScrollingTreeFixedNode(ScrollingTree&amp; scrollingTree, ScrollingNodeID nodeID)
</span><span class="cx">     : ScrollingTreeNode(scrollingTree, FixedNode, nodeID)
</span><span class="cx"> {
</span><ins>+    scrollingTree.fixedOrStickyNodeAdded();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ScrollingTreeFixedNode::~ScrollingTreeFixedNode()
</span><span class="cx"> {
</span><ins>+    scrollingTree().fixedOrStickyNodeRemoved();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ScrollingTreeFixedNode::updateBeforeChildren(const ScrollingStateNode&amp; stateNode)
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebCorepagescrollingmacScrollingTreeStickyNodemm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm (171548 => 171549)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm        2014-07-24 23:17:43 UTC (rev 171548)
+++ branches/safari-600.1-branch/Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm        2014-07-24 23:21:38 UTC (rev 171549)
</span><span class="lines">@@ -43,10 +43,12 @@
</span><span class="cx"> ScrollingTreeStickyNode::ScrollingTreeStickyNode(ScrollingTree&amp; scrollingTree, ScrollingNodeID nodeID)
</span><span class="cx">     : ScrollingTreeNode(scrollingTree, StickyNode, nodeID)
</span><span class="cx"> {
</span><ins>+    scrollingTree.fixedOrStickyNodeAdded();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> ScrollingTreeStickyNode::~ScrollingTreeStickyNode()
</span><span class="cx"> {
</span><ins>+    scrollingTree().fixedOrStickyNodeRemoved();
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void ScrollingTreeStickyNode::updateBeforeChildren(const ScrollingStateNode&amp; stateNode)
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/ChangeLog (171548 => 171549)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/ChangeLog        2014-07-24 23:17:43 UTC (rev 171548)
+++ branches/safari-600.1-branch/Source/WebKit2/ChangeLog        2014-07-24 23:21:38 UTC (rev 171549)
</span><span class="lines">@@ -1,5 +1,46 @@
</span><span class="cx"> 2014-07-24  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Merge r171532
+
+    2014-07-24  Benjamin Poulain  &lt;benjamin@webkit.org&gt;
+
+            [WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
+            https://bugs.webkit.org/show_bug.cgi?id=135227
+            &lt;rdar://problem/17279500&gt;
+
+            Reviewed by Simon Fraser.
+
+            In some cases, a fixed or sticky positioned layer would end up at its position corresponding to the WebProcess
+            instead of sticking the to real viewport in the UIProcess.
+
+            The sequence of event is:
+            1) A layer becomes fixed in some ScrollingTree transaction.
+            2) Later, some change in the WebProcess causes a LayerTree update for that exact same layer, but no corresponding
+               ScrollingTree update is made.
+            3) In the UIProcess, the position of the fixed layer is changed due to the LayerTree update.
+               But! There is no ScrollingTree change, updateScrollingTree() never sets fixedOrStickyLayerChanged to true,
+               and the position is not corrected.
+            -&gt; The layer is now at the wrong position until the next VisibleContentRectUpdate.
+
+            Ideally, we should have fixedOrStickyLayerChanged track if either the position or size of a fixed layer changed
+            in the layer tree. This is tricky since the layer tree does not keep track of the fixed nodes of the scrolling tree.
+
+            Since this complexity seems risky at this point, I went for something simpler but with more overhead:
+            any time the scrolling tree contains either a fixed or sticky layer, viewportChangedViaDelegatedScrolling()
+            is called to &quot;fix&quot; the position.
+
+            * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
+            (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
+            (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
+            * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
+            (WebKit::RemoteScrollingCoordinatorProxy::hasFixedOrSticky):
+            * UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
+            (WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
+            * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+            (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
+
+2014-07-24  Lucas Forschler  &lt;lforschler@apple.com&gt;
+
</ins><span class="cx">         Merge r171519
</span><span class="cx"> 
</span><span class="cx">     2014-07-24  Oliver Hunt  &lt;oliver@apple.com&gt;
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessScrollingRemoteScrollingCoordinatorProxycpp"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp (171548 => 171549)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp        2014-07-24 23:17:43 UTC (rev 171548)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp        2014-07-24 23:21:38 UTC (rev 171549)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx"> #include &quot;RemoteScrollingCoordinator.h&quot;
</span><span class="cx"> #include &quot;RemoteScrollingCoordinatorMessages.h&quot;
</span><span class="cx"> #include &quot;RemoteScrollingCoordinatorTransaction.h&quot;
</span><del>-#include &quot;RemoteScrollingTree.h&quot;
</del><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><span class="cx"> #include &quot;WebProcessProxy.h&quot;
</span><span class="cx"> #include &lt;WebCore/ScrollingStateFrameScrollingNode.h&gt;
</span><span class="lines">@@ -78,7 +77,7 @@
</span><span class="cx">     return &amp;remoteDrawingArea-&gt;remoteLayerTreeHost();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteScrollingCoordinatorProxy::updateScrollingTree(const RemoteScrollingCoordinatorTransaction&amp; transaction, bool&amp; fixedOrStickyLayerChanged)
</del><ins>+void RemoteScrollingCoordinatorProxy::updateScrollingTree(const RemoteScrollingCoordinatorTransaction&amp; transaction)
</ins><span class="cx"> {
</span><span class="cx">     OwnPtr&lt;ScrollingStateTree&gt; stateTree = const_cast&lt;RemoteScrollingCoordinatorTransaction&amp;&gt;(transaction).scrollingStateTree().release();
</span><span class="cx">     
</span><span class="lines">@@ -88,12 +87,12 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    connectStateNodeLayers(*stateTree, *layerTreeHost, fixedOrStickyLayerChanged);
</del><ins>+    connectStateNodeLayers(*stateTree, *layerTreeHost);
</ins><span class="cx">     m_scrollingTree-&gt;commitNewTreeState(stateTree.release());
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(IOS)
</span><del>-void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree&amp; stateTree, const RemoteLayerTreeHost&amp; layerTreeHost, bool&amp; fixedOrStickyLayerChanged)
</del><ins>+void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree&amp; stateTree, const RemoteLayerTreeHost&amp; layerTreeHost)
</ins><span class="cx"> {
</span><span class="cx">     for (auto&amp; currNode : stateTree.nodeMap().values()) {
</span><span class="cx">         if (currNode-&gt;hasChangedProperty(ScrollingStateNode::ScrollLayer))
</span><span class="lines">@@ -131,12 +130,7 @@
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case FixedNode:
</span><del>-            if (currNode-&gt;hasChangedProperty(ScrollingStateNode::ScrollLayer))
-                fixedOrStickyLayerChanged = true;
-            break;
</del><span class="cx">         case StickyNode:
</span><del>-            if (currNode-&gt;hasChangedProperty(ScrollingStateNode::ScrollLayer))
-                fixedOrStickyLayerChanged = true;
</del><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessScrollingRemoteScrollingCoordinatorProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h (171548 => 171549)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h        2014-07-24 23:17:43 UTC (rev 171548)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h        2014-07-24 23:21:38 UTC (rev 171549)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> 
</span><span class="cx"> #include &quot;MessageReceiver.h&quot;
</span><span class="cx"> #include &quot;RemoteScrollingCoordinator.h&quot;
</span><ins>+#include &quot;RemoteScrollingTree.h&quot;
</ins><span class="cx"> #include &lt;wtf/Noncopyable.h&gt;
</span><span class="cx"> #include &lt;wtf/RefPtr.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -67,10 +68,11 @@
</span><span class="cx"> 
</span><span class="cx">     const RemoteLayerTreeHost* layerTreeHost() const;
</span><span class="cx"> 
</span><del>-    void updateScrollingTree(const RemoteScrollingCoordinatorTransaction&amp;, bool&amp; fixedOrStickyLayerChanged);
</del><ins>+    void updateScrollingTree(const RemoteScrollingCoordinatorTransaction&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void setPropagatesMainFrameScrolls(bool propagatesMainFrameScrolls) { m_propagatesMainFrameScrolls = propagatesMainFrameScrolls; }
</span><span class="cx">     bool propagatesMainFrameScrolls() const { return m_propagatesMainFrameScrolls; }
</span><ins>+    bool hasFixedOrSticky() const { return m_scrollingTree-&gt;hasFixedOrSticky(); }
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     WebCore::FloatRect customFixedPositionRect() const;
</span><span class="lines">@@ -80,7 +82,7 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> private:
</span><del>-    void connectStateNodeLayers(WebCore::ScrollingStateTree&amp;, const RemoteLayerTreeHost&amp;, bool&amp; fixedOrStickyLayerChanged);
</del><ins>+    void connectStateNodeLayers(WebCore::ScrollingStateTree&amp;, const RemoteLayerTreeHost&amp;);
</ins><span class="cx"> 
</span><span class="cx">     WebPageProxy&amp; m_webPageProxy;
</span><span class="cx">     RefPtr&lt;RemoteScrollingTree&gt; m_scrollingTree;
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessiosRemoteScrollingCoordinatorProxyIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm (171548 => 171549)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm        2014-07-24 23:17:43 UTC (rev 171548)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm        2014-07-24 23:21:38 UTC (rev 171549)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">     return LayerRepresentation(layerOrView.layer);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree&amp; stateTree, const RemoteLayerTreeHost&amp; layerTreeHost, bool&amp; fixedOrStickyLayerChanged)
</del><ins>+void RemoteScrollingCoordinatorProxy::connectStateNodeLayers(ScrollingStateTree&amp; stateTree, const RemoteLayerTreeHost&amp; layerTreeHost)
</ins><span class="cx"> {
</span><span class="cx">     for (auto&amp; currNode : stateTree.nodeMap().values()) {
</span><span class="cx">         switch (currNode-&gt;nodeType()) {
</span><span class="lines">@@ -78,16 +78,9 @@
</span><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">         case FixedNode:
</span><del>-            if (currNode-&gt;hasChangedProperty(ScrollingStateNode::ScrollLayer))
-                currNode-&gt;setLayer(layerRepresentationFromLayerOrView(layerTreeHost.getLayer(currNode-&gt;layer())));
-            
-            fixedOrStickyLayerChanged |= currNode-&gt;hasChangedProperties();
-            break;
</del><span class="cx">         case StickyNode:
</span><span class="cx">             if (currNode-&gt;hasChangedProperty(ScrollingStateNode::ScrollLayer))
</span><span class="cx">                 currNode-&gt;setLayer(layerRepresentationFromLayerOrView(layerTreeHost.getLayer(currNode-&gt;layer())));
</span><del>-
-            fixedOrStickyLayerChanged |= currNode-&gt;hasChangedProperties();
</del><span class="cx">             break;
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="branchessafari6001branchSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (171548 => 171549)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2014-07-24 23:17:43 UTC (rev 171548)
+++ branches/safari-600.1-branch/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2014-07-24 23:21:38 UTC (rev 171549)
</span><span class="lines">@@ -205,11 +205,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><del>-    bool fixedOrStickyLayerChanged = false;
-    m_webPageProxy-&gt;scrollingCoordinatorProxy()-&gt;updateScrollingTree(scrollingTreeTransaction, fixedOrStickyLayerChanged);
</del><ins>+    m_webPageProxy-&gt;scrollingCoordinatorProxy()-&gt;updateScrollingTree(scrollingTreeTransaction);
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(IOS)
</span><del>-    if (fixedOrStickyLayerChanged) {
</del><ins>+    if (m_webPageProxy-&gt;scrollingCoordinatorProxy()-&gt;hasFixedOrSticky()) {
</ins><span class="cx">         FloatRect customFixedPositionRect = m_webPageProxy-&gt;computeCustomFixedPositionRect(m_webPageProxy-&gt;unobscuredContentRect(), m_webPageProxy-&gt;displayedContentScale());
</span><span class="cx">         // If we got a new layer for a fixed or sticky node, its position from the WebProcess is probably stale. We need to re-run the &quot;viewport&quot; changed logic to udpate it with our UI-side state.
</span><span class="cx">         m_webPageProxy-&gt;scrollingCoordinatorProxy()-&gt;viewportChangedViaDelegatedScrolling(m_webPageProxy-&gt;scrollingCoordinatorProxy()-&gt;rootScrollingNodeID(), customFixedPositionRect, m_webPageProxy-&gt;displayedContentScale());
</span></span></pre>
</div>
</div>

</body>
</html>