<!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->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<<):
(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 <simon.fraser@apple.com>
+
+ 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->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 <cfleizach@apple.com>
</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->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->m_hasChangedProperties = true;
</del><ins>+ treeStateClone->m_hasChangedProperties = m_hasChangedProperties;
</ins><span class="cx"> m_hasChangedProperties = false;
</span><span class="cx">
</span><span class="cx"> treeStateClone->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 <simon.fraser@apple.com>
+
+ 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<<):
+ (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 <hw1008.kim@samsung.com>
</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 <WebCore/ScrollingStateFixedNode.h>
</span><span class="cx"> #include <WebCore/ScrollingStateScrollingNode.h>
</span><span class="cx"> #include <WebCore/ScrollingStateStickyNode.h>
</span><ins>+#include <WebCore/ScrollingStateTree.h>
+#include <WebCore/TextStream.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/StringBuilder.h>
</ins><span class="cx">
</span><span class="cx"> #include <wtf/HashMap.h>
</span><span class="cx">
</span><span class="lines">@@ -277,6 +281,8 @@
</span><span class="cx"> encoder << hasNewRootNode;
</span><span class="cx">
</span><span class="cx"> if (m_scrollingStateTree) {
</span><ins>+ encoder << m_scrollingStateTree->hasChangedProperties();
+
</ins><span class="cx"> if (const ScrollingStateNode* rootNode = m_scrollingStateTree->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->setHasChangedProperties(hasChangedProperties);
+
</ins><span class="cx"> for (int i = 0; i < 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<<;
+
+ RemoteScrollingTreeTextStream()
+ : m_indent(0)
+ {
+ }
+
+ RemoteScrollingTreeTextStream& operator<<(FloatRect);
+ RemoteScrollingTreeTextStream& operator<<(ScrollingNodeType);
+
+ RemoteScrollingTreeTextStream& operator<<(const FixedPositionViewportConstraints&);
+ RemoteScrollingTreeTextStream& operator<<(const StickyPositionViewportConstraints&);
+
+ void dump(const ScrollingStateTree&, bool changedPropertiesOnly = true);
+
+ void dump(const ScrollingStateNode&, bool changedPropertiesOnly = true);
+ void dump(const ScrollingStateScrollingNode&, bool changedPropertiesOnly = true);
+ void dump(const ScrollingStateFixedNode&, bool changedPropertiesOnly = true);
+ void dump(const ScrollingStateStickyNode&, bool changedPropertiesOnly = true);
+
+ void increaseIndent() { ++m_indent; }
+ void decreaseIndent() { --m_indent; ASSERT(m_indent >= 0); }
+
+ void writeIndent();
+
+private:
+ void recursiveDumpNodes(const ScrollingStateNode&, bool changedPropertiesOnly);
+
+ int m_indent;
+};
+
+void RemoteScrollingTreeTextStream::writeIndent()
+{
+ for (int i = 0; i < m_indent; ++i)
+ *this << " ";
+}
+
+template <class T>
+static void dumpProperty(RemoteScrollingTreeTextStream& ts, String name, T value)
+{
+ ts << "\n";
+ ts.increaseIndent();
+ ts.writeIndent();
+ ts << "(" << name << " ";
+ ts << value << ")";
+ ts.decreaseIndent();
+}
+
+RemoteScrollingTreeTextStream& RemoteScrollingTreeTextStream::operator<<(FloatRect rect)
+{
+ RemoteScrollingTreeTextStream& ts = *this;
+ ts << rect.x() << " " << rect.y() << " " << rect.width() << " " << rect.height();
+ return ts;
+}
+
+RemoteScrollingTreeTextStream& RemoteScrollingTreeTextStream::operator<<(ScrollingNodeType nodeType)
+{
+ RemoteScrollingTreeTextStream& ts = *this;
+
+ switch (nodeType) {
+ case FrameScrollingNode: ts << "frame-scrolling"; break;
+ case OverflowScrollingNode: ts << "overflow-scrolling"; break;
+ case FixedNode: ts << "fixed"; break;
+ case StickyNode: ts << "sticky"; break;
+ }
+
+ return ts;
+}
+
+RemoteScrollingTreeTextStream& RemoteScrollingTreeTextStream::operator<<(const FixedPositionViewportConstraints& constraints)
+{
+ RemoteScrollingTreeTextStream& ts = *this;
+
+ dumpProperty(ts, "viewport-rect-at-last-layout", constraints.viewportRectAtLastLayout());
+ dumpProperty(ts, "layer-position-at-last-layout", constraints.layerPositionAtLastLayout());
+
+ return ts;
+}
+
+RemoteScrollingTreeTextStream& RemoteScrollingTreeTextStream::operator<<(const StickyPositionViewportConstraints& constraints)
+{
+ RemoteScrollingTreeTextStream& ts = *this;
+
+ dumpProperty(ts, "sticky-position-at-last-layout", constraints.stickyOffsetAtLastLayout());
+ dumpProperty(ts, "layer-position-at-last-layout", constraints.layerPositionAtLastLayout());
+
+ return ts;
+}
+
+void RemoteScrollingTreeTextStream::dump(const ScrollingStateNode& node, bool changedPropertiesOnly)
+{
+ RemoteScrollingTreeTextStream& ts = *this;
+
+ ts << "(node " << node.scrollingNodeID();
+
+ dumpProperty(ts, "type", 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& node, bool changedPropertiesOnly)
+{
+ RemoteScrollingTreeTextStream& ts = *this;
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ViewportSize))
+ dumpProperty(ts, "viewport-size", node.viewportSize());
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::TotalContentsSize))
+ dumpProperty(ts, "total-contents-size", node.totalContentsSize());
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ScrollPosition))
+ dumpProperty(ts, "scroll-position", node.scrollPosition());
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ScrollOrigin))
+ dumpProperty(ts, "scroll-origin", node.scrollOrigin());
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::FrameScaleFactor))
+ dumpProperty(ts, "frame-scale-factor", 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, "requested-scroll-position", node.requestedScrollPosition());
+ dumpProperty(ts, "requested-scroll-position-is-programatic", node.requestedScrollPositionRepresentsProgrammaticScroll());
+ }
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::HeaderHeight))
+ dumpProperty(ts, "header-height", node.headerHeight());
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::FooterHeight))
+ dumpProperty(ts, "footer-height", node.footerHeight());
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::TopContentInset))
+ dumpProperty(ts, "top-content-inset", node.topContentInset());
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::ScrolledContentsLayer))
+ dumpProperty(ts, "scrolled-contents-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.scrolledContentsLayer()));
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::CounterScrollingLayer))
+ dumpProperty(ts, "counter-scrolling-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.counterScrollingLayer()));
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::InsetClipLayer))
+ dumpProperty(ts, "clip-inset-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.insetClipLayer()));
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::HeaderLayer))
+ dumpProperty(ts, "header-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.headerLayer()));
+
+ if (!changedPropertiesOnly || node.hasChangedProperty(ScrollingStateScrollingNode::FooterLayer))
+ dumpProperty(ts, "footer-layer", static_cast<GraphicsLayer::PlatformLayerID>(node.footerLayer()));
+}
+
+void RemoteScrollingTreeTextStream::dump(const ScrollingStateFixedNode& node, bool changedPropertiesOnly)
+{
+ RemoteScrollingTreeTextStream& ts = *this;
+
+ ts << node.viewportConstraints();
+}
+
+void RemoteScrollingTreeTextStream::dump(const ScrollingStateStickyNode& node, bool changedPropertiesOnly)
+{
+ RemoteScrollingTreeTextStream& ts = *this;
+
+ ts << node.viewportConstraints();
+}
+
+void RemoteScrollingTreeTextStream::recursiveDumpNodes(const ScrollingStateNode& node, bool changedPropertiesOnly)
+{
+ RemoteScrollingTreeTextStream& ts = *this;
+
+ ts << "\n";
+ ts.increaseIndent();
+ ts.writeIndent();
+ dump(node, changedPropertiesOnly);
+
+ if (node.children()) {
+ ts << "\n";
+ ts.increaseIndent();
+ ts.writeIndent();
+ ts << "(children";
+ ts.increaseIndent();
+
+ for (auto& childNode : *node.children())
+ recursiveDumpNodes(*childNode, changedPropertiesOnly);
+
+ ts << ")";
+ ts.decreaseIndent();
+ ts.decreaseIndent();
+ }
+
+ ts << ")";
+ ts.decreaseIndent();
+}
+
+void RemoteScrollingTreeTextStream::dump(const ScrollingStateTree& stateTree, bool changedPropertiesOnly)
+{
+ RemoteScrollingTreeTextStream& ts = *this;
+
+ dumpProperty(ts, "has changed properties", stateTree.hasChangedProperties());
+ dumpProperty(ts, "has new root node", stateTree.hasNewRootStateNode());
+
+ if (stateTree.rootStateNode())
+ recursiveDumpNodes(*stateTree.rootStateNode(), changedPropertiesOnly);
+
+ if (!stateTree.removedNodes().isEmpty())
+ dumpProperty<Vector<ScrollingNodeID>>(ts, "removed-nodes", stateTree.removedNodes());
+}
+
+WTF::CString RemoteScrollingCoordinatorTransaction::description() const
+{
+ RemoteScrollingTreeTextStream ts;
+
+ ts << "(\n";
+ ts.increaseIndent();
+ ts.writeIndent();
+ ts << "(scrolling state tree";
+
+ if (m_scrollingStateTree) {
+ if (!m_scrollingStateTree->hasChangedProperties())
+ ts << " - no changes";
+ else
+ ts.dump(*m_scrollingStateTree.get());
+ } else
+ ts << " - none";
+
+ ts << ")\n";
+ ts.decreaseIndent();
+
+ return ts.release().utf8();
+}
+
+void RemoteScrollingCoordinatorTransaction::dump() const
+{
+ fprintf(stderr, "%s", 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&) const;
</span><span class="cx"> static bool decode(IPC::ArgumentDecoder&, RemoteScrollingCoordinatorTransaction&);
</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&);
</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 "RemoteLayerTreeDrawingAreaProxyMessages.h"
</span><span class="cx"> #import "DrawingAreaMessages.h"
</span><span class="cx"> #import "RemoteScrollingCoordinatorProxy.h"
</span><ins>+#import "RemoteScrollingCoordinatorTransaction.h"
</ins><span class="cx"> #import "WebPageProxy.h"
</span><span class="cx"> #import "WebProcessProxy.h"
</span><span class="cx"> #import <QuartzCore/QuartzCore.h>
</span><span class="lines">@@ -118,6 +119,7 @@
</span><span class="cx"> void RemoteLayerTreeDrawingAreaProxy::commitLayerTree(const RemoteLayerTreeTransaction& layerTreeTransaction, const RemoteScrollingCoordinatorTransaction& scrollingTreeTransaction)
</span><span class="cx"> {
</span><span class="cx"> LOG(RemoteLayerTree, "%s", layerTreeTransaction.description().data());
</span><ins>+ LOG(RemoteLayerTree, "%s", scrollingTreeTransaction.description().data());
</ins><span class="cx">
</span><span class="cx"> if (m_remoteLayerTreeHost.updateLayerTree(layerTreeTransaction))
</span><span class="cx"> m_webPageProxy->setAcceleratedCompositingRootLayer(m_remoteLayerTreeHost.rootLayer());
</span></span></pre>
</div>
</div>
</body>
</html>