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

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

<h3>Log Message</h3>
<pre>Add scrolling tree logging to RemoteLayerTree output
https://bugs.webkit.org/show_bug.cgi?id=132640

Reviewed by Beth Dakin.

Source/WebCore:

Support scrolling tree logging in the RemoteLayerTree log channel
output.

ScrollingStateTree::commit() unconditionally set treeStateClone-&gt;m_hasChangedProperties
to true, but we should set it based on original scrolling state tree's
m_hasChangedProperties.

We have to encode all of the scrolling state nodes anyway (they only encode
changed properties), but we can use this for future optimizations, and to
avoid spurious logging.

* WebCore.exp.in: Export a couple of things we need.
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::commit):

Source/WebKit2:

Support scrolling tree logging in the RemoteLayerTree log channel
output.

Encode/decode ScrollingStateTree::hasChangedProperties() so we can use
it to avoid logging. Log all the things.

* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::encode):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream):
(WebKit::RemoteScrollingTreeTextStream::increaseIndent):
(WebKit::RemoteScrollingTreeTextStream::decreaseIndent):
(WebKit::RemoteScrollingTreeTextStream::writeIndent):
(WebKit::dumpProperty):
(WebKit::RemoteScrollingTreeTextStream::operator&lt;&lt;):
(WebKit::RemoteScrollingTreeTextStream::dump):
(WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes):
(WebKit::RemoteScrollingCoordinatorTransaction::description):
(WebKit::RemoteScrollingCoordinatorTransaction::dump):
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateTreecpp">trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactioncpp">trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactionh">trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168432 => 168433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-07 18:32:06 UTC (rev 168432)
+++ trunk/Source/WebCore/ChangeLog        2014-05-07 18:42:53 UTC (rev 168433)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2014-05-06  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Add scrolling tree logging to RemoteLayerTree output
+        https://bugs.webkit.org/show_bug.cgi?id=132640
+
+        Reviewed by Beth Dakin.
+
+        Support scrolling tree logging in the RemoteLayerTree log channel
+        output.
+        
+        ScrollingStateTree::commit() unconditionally set treeStateClone-&gt;m_hasChangedProperties
+        to true, but we should set it based on original scrolling state tree's 
+        m_hasChangedProperties.
+        
+        We have to encode all of the scrolling state nodes anyway (they only encode
+        changed properties), but we can use this for future optimizations, and to
+        avoid spurious logging.
+        
+        * WebCore.exp.in: Export a couple of things we need.
+        * page/scrolling/ScrollingStateTree.cpp:
+        (WebCore::ScrollingStateTree::commit):
+
</ins><span class="cx"> 2014-05-07  Chris Fleizach  &lt;cfleizach@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: aria-expanded changes are not communicated to clients
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (168432 => 168433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-05-07 18:32:06 UTC (rev 168432)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-05-07 18:42:53 UTC (rev 168433)
</span><span class="lines">@@ -107,6 +107,7 @@
</span><span class="cx"> __ZN7WebCore10TextStreamlsEPKc
</span><span class="cx"> __ZN7WebCore10TextStreamlsEPKv
</span><span class="cx"> __ZN7WebCore10TextStreamlsERKN3WTF6StringE
</span><ins>+__ZN7WebCore10TextStreamlsERKNS_10FloatPointE
</ins><span class="cx"> __ZN7WebCore10TextStreamlsERKNS_8IntPointE
</span><span class="cx"> __ZN7WebCore10TextStreamlsERKNS_9FloatSizeE
</span><span class="cx"> __ZN7WebCore10TextStreamlsEb
</span><span class="lines">@@ -2775,6 +2776,7 @@
</span><span class="cx"> __ZN7WebCore18ScrollingStateTree10attachNodeENS_17ScrollingNodeTypeEyy
</span><span class="cx"> __ZN7WebCore18ScrollingStateTree14stateNodeForIDEy
</span><span class="cx"> __ZN7WebCore18ScrollingStateTree15setRemovedNodesEN3WTF6VectorIyLm0ENS1_15CrashOnOverflowEEE
</span><ins>+__ZN7WebCore18ScrollingStateTree23setHasChangedPropertiesEb
</ins><span class="cx"> __ZN7WebCore18ScrollingStateTree6commitENS_19LayerRepresentation4TypeE
</span><span class="cx"> __ZN7WebCore18ScrollingStateTree6createEPNS_25AsyncScrollingCoordinatorE
</span><span class="cx"> __ZN7WebCore18ScrollingStateTreeD1Ev
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp (168432 => 168433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp        2014-05-07 18:32:06 UTC (rev 168432)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp        2014-05-07 18:42:53 UTC (rev 168433)
</span><span class="lines">@@ -153,7 +153,7 @@
</span><span class="cx">     treeStateClone-&gt;m_nodesRemovedSinceLastCommit.swap(m_nodesRemovedSinceLastCommit);
</span><span class="cx"> 
</span><span class="cx">     // Now the clone tree has changed properties, and the original tree does not.
</span><del>-    treeStateClone-&gt;m_hasChangedProperties = true;
</del><ins>+    treeStateClone-&gt;m_hasChangedProperties = m_hasChangedProperties;
</ins><span class="cx">     m_hasChangedProperties = false;
</span><span class="cx"> 
</span><span class="cx">     treeStateClone-&gt;m_hasNewRootStateNode = m_hasNewRootStateNode;
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (168432 => 168433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-05-07 18:32:06 UTC (rev 168432)
+++ trunk/Source/WebKit2/ChangeLog        2014-05-07 18:42:53 UTC (rev 168433)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2014-05-06  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Add scrolling tree logging to RemoteLayerTree output
+        https://bugs.webkit.org/show_bug.cgi?id=132640
+
+        Reviewed by Beth Dakin.
+        
+        Support scrolling tree logging in the RemoteLayerTree log channel
+        output.
+        
+        Encode/decode ScrollingStateTree::hasChangedProperties() so we can use
+        it to avoid logging. Log all the things.
+
+        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
+        (WebKit::RemoteScrollingCoordinatorTransaction::encode):
+        (WebKit::RemoteScrollingCoordinatorTransaction::decode):
+        (WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream):
+        (WebKit::RemoteScrollingTreeTextStream::increaseIndent):
+        (WebKit::RemoteScrollingTreeTextStream::decreaseIndent):
+        (WebKit::RemoteScrollingTreeTextStream::writeIndent):
+        (WebKit::dumpProperty):
+        (WebKit::RemoteScrollingTreeTextStream::operator&lt;&lt;):
+        (WebKit::RemoteScrollingTreeTextStream::dump):
+        (WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes):
+        (WebKit::RemoteScrollingCoordinatorTransaction::description):
+        (WebKit::RemoteScrollingCoordinatorTransaction::dump):
+        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
+
</ins><span class="cx"> 2014-05-07  Hyowon Kim  &lt;hw1008.kim@samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         GraphicsLayer::client() should return a reference.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp (168432 => 168433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp        2014-05-07 18:32:06 UTC (rev 168432)
+++ trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp        2014-05-07 18:42:53 UTC (rev 168433)
</span><span class="lines">@@ -34,6 +34,10 @@
</span><span class="cx"> #include &lt;WebCore/ScrollingStateFixedNode.h&gt;
</span><span class="cx"> #include &lt;WebCore/ScrollingStateScrollingNode.h&gt;
</span><span class="cx"> #include &lt;WebCore/ScrollingStateStickyNode.h&gt;
</span><ins>+#include &lt;WebCore/ScrollingStateTree.h&gt;
+#include &lt;WebCore/TextStream.h&gt;
+#include &lt;wtf/text/CString.h&gt;
+#include &lt;wtf/text/StringBuilder.h&gt;
</ins><span class="cx"> 
</span><span class="cx"> #include &lt;wtf/HashMap.h&gt;
</span><span class="cx"> 
</span><span class="lines">@@ -277,6 +281,8 @@
</span><span class="cx">     encoder &lt;&lt; hasNewRootNode;
</span><span class="cx"> 
</span><span class="cx">     if (m_scrollingStateTree) {
</span><ins>+        encoder &lt;&lt; m_scrollingStateTree-&gt;hasChangedProperties();
+
</ins><span class="cx">         if (const ScrollingStateNode* rootNode = m_scrollingStateTree-&gt;rootStateNode())
</span><span class="cx">             encodeNodeAndDescendants(encoder, *rootNode);
</span><span class="cx"> 
</span><span class="lines">@@ -301,7 +307,13 @@
</span><span class="cx">         return false;
</span><span class="cx">     
</span><span class="cx">     m_scrollingStateTree = ScrollingStateTree::create();
</span><del>-    
</del><ins>+
+    bool hasChangedProperties;
+    if (!decoder.decode(hasChangedProperties))
+        return false;
+
+    m_scrollingStateTree-&gt;setHasChangedProperties(hasChangedProperties);
+
</ins><span class="cx">     for (int i = 0; i &lt; numNodes; ++i) {
</span><span class="cx">         ScrollingNodeType nodeType;
</span><span class="cx">         if (!decoder.decodeEnum(nodeType))
</span><span class="lines">@@ -350,6 +362,261 @@
</span><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if !defined(NDEBUG) || !LOG_DISABLED
+
+class RemoteScrollingTreeTextStream : public TextStream {
+public:
+    using TextStream::operator&lt;&lt;;
+
+    RemoteScrollingTreeTextStream()
+        : m_indent(0)
+    {
+    }
+
+    RemoteScrollingTreeTextStream&amp; operator&lt;&lt;(FloatRect);
+    RemoteScrollingTreeTextStream&amp; operator&lt;&lt;(ScrollingNodeType);
+
+    RemoteScrollingTreeTextStream&amp; operator&lt;&lt;(const FixedPositionViewportConstraints&amp;);
+    RemoteScrollingTreeTextStream&amp; operator&lt;&lt;(const StickyPositionViewportConstraints&amp;);
+
+    void dump(const ScrollingStateTree&amp;, bool changedPropertiesOnly = true);
+
+    void dump(const ScrollingStateNode&amp;, bool changedPropertiesOnly = true);
+    void dump(const ScrollingStateScrollingNode&amp;, bool changedPropertiesOnly = true);
+    void dump(const ScrollingStateFixedNode&amp;, bool changedPropertiesOnly = true);
+    void dump(const ScrollingStateStickyNode&amp;, bool changedPropertiesOnly = true);
+
+    void increaseIndent() { ++m_indent; }
+    void decreaseIndent() { --m_indent; ASSERT(m_indent &gt;= 0); }
+
+    void writeIndent();
+
+private:
+    void recursiveDumpNodes(const ScrollingStateNode&amp;, bool changedPropertiesOnly);
+
+    int m_indent;
+};
+
+void RemoteScrollingTreeTextStream::writeIndent()
+{
+    for (int i = 0; i &lt; m_indent; ++i)
+        *this &lt;&lt; &quot;  &quot;;
+}
+
+template &lt;class T&gt;
+static void dumpProperty(RemoteScrollingTreeTextStream&amp; ts, String name, T value)
+{
+    ts &lt;&lt; &quot;\n&quot;;
+    ts.increaseIndent();
+    ts.writeIndent();
+    ts &lt;&lt; &quot;(&quot; &lt;&lt; name &lt;&lt; &quot; &quot;;
+    ts &lt;&lt; value &lt;&lt; &quot;)&quot;;
+    ts.decreaseIndent();
+}
+
+RemoteScrollingTreeTextStream&amp; RemoteScrollingTreeTextStream::operator&lt;&lt;(FloatRect rect)
+{
+    RemoteScrollingTreeTextStream&amp; ts = *this;
+    ts &lt;&lt; rect.x() &lt;&lt; &quot; &quot; &lt;&lt; rect.y() &lt;&lt; &quot; &quot; &lt;&lt; rect.width() &lt;&lt; &quot; &quot; &lt;&lt; rect.height();
+    return ts;
+}
+
+RemoteScrollingTreeTextStream&amp; RemoteScrollingTreeTextStream::operator&lt;&lt;(ScrollingNodeType nodeType)
+{
+    RemoteScrollingTreeTextStream&amp; ts = *this;
+
+    switch (nodeType) {
+    case FrameScrollingNode: ts &lt;&lt; &quot;frame-scrolling&quot;; break;
+    case OverflowScrollingNode: ts &lt;&lt; &quot;overflow-scrolling&quot;; break;
+    case FixedNode: ts &lt;&lt; &quot;fixed&quot;; break;
+    case StickyNode: ts &lt;&lt; &quot;sticky&quot;; break;
+    }
+
+    return ts;
+}
+
+RemoteScrollingTreeTextStream&amp; RemoteScrollingTreeTextStream::operator&lt;&lt;(const FixedPositionViewportConstraints&amp; constraints)
+{
+    RemoteScrollingTreeTextStream&amp; ts = *this;
+
+    dumpProperty(ts, &quot;viewport-rect-at-last-layout&quot;, constraints.viewportRectAtLastLayout());
+    dumpProperty(ts, &quot;layer-position-at-last-layout&quot;, constraints.layerPositionAtLastLayout());
+
+    return ts;
+}
+
+RemoteScrollingTreeTextStream&amp; RemoteScrollingTreeTextStream::operator&lt;&lt;(const StickyPositionViewportConstraints&amp; constraints)
+{
+    RemoteScrollingTreeTextStream&amp; ts = *this;
+
+    dumpProperty(ts, &quot;sticky-position-at-last-layout&quot;, constraints.stickyOffsetAtLastLayout());
+    dumpProperty(ts, &quot;layer-position-at-last-layout&quot;, constraints.layerPositionAtLastLayout());
+
+    return ts;
+}
+
+void RemoteScrollingTreeTextStream::dump(const ScrollingStateNode&amp; node, bool changedPropertiesOnly)
+{
+    RemoteScrollingTreeTextStream&amp; ts = *this;
+
+    ts &lt;&lt; &quot;(node &quot; &lt;&lt; node.scrollingNodeID();
+
+    dumpProperty(ts, &quot;type&quot;, node.nodeType());
+
+    switch (node.nodeType()) {
+    case FrameScrollingNode:
+    case OverflowScrollingNode:
+        dump(toScrollingStateScrollingNode(node), changedPropertiesOnly);
+        break;
+    case FixedNode:
+        dump(toScrollingStateFixedNode(node), changedPropertiesOnly);
+        break;
+    case StickyNode:
+        dump(toScrollingStateStickyNode(node), changedPropertiesOnly);
+        break;
+    }
+}
+
+void RemoteScrollingTreeTextStream::dump(const ScrollingStateScrollingNode&amp; node, bool changedPropertiesOnly)
+{
+    RemoteScrollingTreeTextStream&amp; ts = *this;
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ViewportSize))
+        dumpProperty(ts, &quot;viewport-size&quot;, node.viewportSize());
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::TotalContentsSize))
+        dumpProperty(ts, &quot;total-contents-size&quot;, node.totalContentsSize());
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ScrollPosition))
+        dumpProperty(ts, &quot;scroll-position&quot;, node.scrollPosition());
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ScrollOrigin))
+        dumpProperty(ts, &quot;scroll-origin&quot;, node.scrollOrigin());
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::FrameScaleFactor))
+        dumpProperty(ts, &quot;frame-scale-factor&quot;, node.frameScaleFactor());
+
+    // FIXME: dump nonFastScrollableRegion
+    // FIXME: dump wheelEventHandlerCount
+    // FIXME: dump synchronousScrollingReasons
+    // FIXME: dump scrollableAreaParameters
+    // FIXME: dump scrollBehaviorForFixedElements
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition)) {
+        dumpProperty(ts, &quot;requested-scroll-position&quot;, node.requestedScrollPosition());
+        dumpProperty(ts, &quot;requested-scroll-position-is-programatic&quot;, node.requestedScrollPositionRepresentsProgrammaticScroll());
+    }
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::HeaderHeight))
+        dumpProperty(ts, &quot;header-height&quot;, node.headerHeight());
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::FooterHeight))
+        dumpProperty(ts, &quot;footer-height&quot;, node.footerHeight());
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::TopContentInset))
+        dumpProperty(ts, &quot;top-content-inset&quot;, node.topContentInset());
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
+        dumpProperty(ts, &quot;scrolled-contents-layer&quot;, static_cast&lt;GraphicsLayer::PlatformLayerID&gt;(node.scrolledContentsLayer()));
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer))
+        dumpProperty(ts, &quot;counter-scrolling-layer&quot;, static_cast&lt;GraphicsLayer::PlatformLayerID&gt;(node.counterScrollingLayer()));
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::InsetClipLayer))
+        dumpProperty(ts, &quot;clip-inset-layer&quot;, static_cast&lt;GraphicsLayer::PlatformLayerID&gt;(node.insetClipLayer()));
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::HeaderLayer))
+        dumpProperty(ts, &quot;header-layer&quot;, static_cast&lt;GraphicsLayer::PlatformLayerID&gt;(node.headerLayer()));
+
+    if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::FooterLayer))
+        dumpProperty(ts, &quot;footer-layer&quot;, static_cast&lt;GraphicsLayer::PlatformLayerID&gt;(node.footerLayer()));
+}
+
+void RemoteScrollingTreeTextStream::dump(const ScrollingStateFixedNode&amp; node, bool changedPropertiesOnly)
+{
+    RemoteScrollingTreeTextStream&amp; ts = *this;
+
+    ts &lt;&lt; node.viewportConstraints();
+}
+
+void RemoteScrollingTreeTextStream::dump(const ScrollingStateStickyNode&amp; node, bool changedPropertiesOnly)
+{
+    RemoteScrollingTreeTextStream&amp; ts = *this;
+
+    ts &lt;&lt; node.viewportConstraints();
+}
+
+void RemoteScrollingTreeTextStream::recursiveDumpNodes(const ScrollingStateNode&amp; node, bool changedPropertiesOnly)
+{
+    RemoteScrollingTreeTextStream&amp; ts = *this;
+
+    ts &lt;&lt; &quot;\n&quot;;
+    ts.increaseIndent();
+    ts.writeIndent();
+    dump(node, changedPropertiesOnly);
+
+    if (node.children()) {
+        ts &lt;&lt; &quot;\n&quot;;
+        ts.increaseIndent();
+        ts.writeIndent();
+        ts &lt;&lt; &quot;(children&quot;;
+        ts.increaseIndent();
+
+        for (auto&amp; childNode : *node.children())
+            recursiveDumpNodes(*childNode, changedPropertiesOnly);
+
+        ts &lt;&lt; &quot;)&quot;;
+        ts.decreaseIndent();
+        ts.decreaseIndent();
+    }
+
+    ts &lt;&lt; &quot;)&quot;;
+    ts.decreaseIndent();
+}
+
+void RemoteScrollingTreeTextStream::dump(const ScrollingStateTree&amp; stateTree, bool changedPropertiesOnly)
+{
+    RemoteScrollingTreeTextStream&amp; ts = *this;
+
+    dumpProperty(ts, &quot;has changed properties&quot;, stateTree.hasChangedProperties());
+    dumpProperty(ts, &quot;has new root node&quot;, stateTree.hasNewRootStateNode());
+
+    if (stateTree.rootStateNode())
+        recursiveDumpNodes(*stateTree.rootStateNode(), changedPropertiesOnly);
+
+    if (!stateTree.removedNodes().isEmpty())
+        dumpProperty&lt;Vector&lt;ScrollingNodeID&gt;&gt;(ts, &quot;removed-nodes&quot;, stateTree.removedNodes());
+}
+
+WTF::CString RemoteScrollingCoordinatorTransaction::description() const
+{
+    RemoteScrollingTreeTextStream ts;
+
+    ts &lt;&lt; &quot;(\n&quot;;
+    ts.increaseIndent();
+    ts.writeIndent();
+    ts &lt;&lt; &quot;(scrolling state tree&quot;;
+
+    if (m_scrollingStateTree) {
+        if (!m_scrollingStateTree-&gt;hasChangedProperties())
+            ts &lt;&lt; &quot; - no changes&quot;;
+        else
+            ts.dump(*m_scrollingStateTree.get());
+    } else
+        ts &lt;&lt; &quot; - none&quot;;
+
+    ts &lt;&lt; &quot;)\n&quot;;
+    ts.decreaseIndent();
+
+    return ts.release().utf8();
+}
+
+void RemoteScrollingCoordinatorTransaction::dump() const
+{
+    fprintf(stderr, &quot;%s&quot;, description().data());
+}
+#endif
+
</ins><span class="cx"> } // namespace WebKit
</span><span class="cx"> 
</span><span class="cx"> #else // !ENABLE(ASYNC_SCROLLING)
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h (168432 => 168433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h        2014-05-07 18:32:06 UTC (rev 168432)
+++ trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h        2014-05-07 18:42:53 UTC (rev 168433)
</span><span class="lines">@@ -48,6 +48,11 @@
</span><span class="cx">     void encode(IPC::ArgumentEncoder&amp;) const;
</span><span class="cx">     static bool decode(IPC::ArgumentDecoder&amp;, RemoteScrollingCoordinatorTransaction&amp;);
</span><span class="cx"> 
</span><ins>+#if !defined(NDEBUG) || !LOG_DISABLED
+    WTF::CString description() const;
+    void dump() const;
+#endif
+
</ins><span class="cx"> private:
</span><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx">     bool decode(IPC::ArgumentDecoder&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (168432 => 168433)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2014-05-07 18:32:06 UTC (rev 168432)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2014-05-07 18:42:53 UTC (rev 168433)
</span><span class="lines">@@ -30,6 +30,7 @@
</span><span class="cx"> #import &quot;RemoteLayerTreeDrawingAreaProxyMessages.h&quot;
</span><span class="cx"> #import &quot;DrawingAreaMessages.h&quot;
</span><span class="cx"> #import &quot;RemoteScrollingCoordinatorProxy.h&quot;
</span><ins>+#import &quot;RemoteScrollingCoordinatorTransaction.h&quot;
</ins><span class="cx"> #import &quot;WebPageProxy.h&quot;
</span><span class="cx"> #import &quot;WebProcessProxy.h&quot;
</span><span class="cx"> #import &lt;QuartzCore/QuartzCore.h&gt;
</span><span class="lines">@@ -118,6 +119,7 @@
</span><span class="cx"> void RemoteLayerTreeDrawingAreaProxy::commitLayerTree(const RemoteLayerTreeTransaction&amp; layerTreeTransaction, const RemoteScrollingCoordinatorTransaction&amp; scrollingTreeTransaction)
</span><span class="cx"> {
</span><span class="cx">     LOG(RemoteLayerTree, &quot;%s&quot;, layerTreeTransaction.description().data());
</span><ins>+    LOG(RemoteLayerTree, &quot;%s&quot;, scrollingTreeTransaction.description().data());
</ins><span class="cx"> 
</span><span class="cx">     if (m_remoteLayerTreeHost.updateLayerTree(layerTreeTransaction))
</span><span class="cx">         m_webPageProxy-&gt;setAcceleratedCompositingRootLayer(m_remoteLayerTreeHost.rootLayer());
</span></span></pre>
</div>
</div>

</body>
</html>