<!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>[170118] 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/170118">170118</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-06-18 14:43:30 -0700 (Wed, 18 Jun 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make ScrollingStateNodes refcounted, and other minor cleanup
https://bugs.webkit.org/show_bug.cgi?id=134040
Reviewed by Beth Dakin.
Source/WebCore:
Prepare for future scrolling frame gyrations by making
ScrollingStateNodes refcounted.
Rename ScrollingStateNode::removeChild() to removeDescendant()
since that's what it does. Also rename didRemoveNode() to willRemoveNode()
to better match the behavior.
Use 'auto' in more places.
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::syncChildPositions):
* page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::create):
(WebCore::ScrollingStateFixedNode::clone):
* page/scrolling/ScrollingStateFixedNode.h:
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::create):
(WebCore::ScrollingStateFrameScrollingNode::clone):
* page/scrolling/ScrollingStateFrameScrollingNode.h:
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::cloneAndReset):
(WebCore::ScrollingStateNode::appendChild):
(WebCore::ScrollingStateNode::removeDescendant):
(WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
(WebCore::ScrollingStateNode::removeChild): Deleted.
* page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::children):
* page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::create):
(WebCore::ScrollingStateOverflowScrollingNode::clone):
* page/scrolling/ScrollingStateOverflowScrollingNode.h:
* page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::create):
(WebCore::ScrollingStateStickyNode::clone):
* page/scrolling/ScrollingStateStickyNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::removeNode):
(WebCore::ScrollingStateTree::willRemoveNode):
(WebCore::ScrollingStateTree::didRemoveNode): Deleted.
* page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::setRootStateNode):
* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::updateTreeFromStateNode):
Source/WebKit2:
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::encodeNodeAndDescendants):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp">trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateFixedNodecpp">trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateFixedNodeh">trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateFrameScrollingNodecpp">trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateFrameScrollingNodeh">trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateNodecpp">trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateNodeh">trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateOverflowScrollingNodecpp">trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateOverflowScrollingNodeh">trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateStickyNodecpp">trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateStickyNodeh">trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateTreecpp">trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingStateTreeh">trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h</a></li>
<li><a href="#trunkSourceWebCorepagescrollingScrollingTreecpp">trunk/Source/WebCore/page/scrolling/ScrollingTree.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>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/ChangeLog        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -1,3 +1,55 @@
</span><ins>+2014-06-18 Simon Fraser <simon.fraser@apple.com>
+
+ Make ScrollingStateNodes refcounted, and other minor cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=134040
+
+ Reviewed by Beth Dakin.
+
+ Prepare for future scrolling frame gyrations by making
+ ScrollingStateNodes refcounted.
+
+ Rename ScrollingStateNode::removeChild() to removeDescendant()
+ since that's what it does. Also rename didRemoveNode() to willRemoveNode()
+ to better match the behavior.
+
+ Use 'auto' in more places.
+
+ * page/scrolling/AsyncScrollingCoordinator.cpp:
+ (WebCore::AsyncScrollingCoordinator::syncChildPositions):
+ * page/scrolling/ScrollingStateFixedNode.cpp:
+ (WebCore::ScrollingStateFixedNode::create):
+ (WebCore::ScrollingStateFixedNode::clone):
+ * page/scrolling/ScrollingStateFixedNode.h:
+ * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
+ (WebCore::ScrollingStateFrameScrollingNode::create):
+ (WebCore::ScrollingStateFrameScrollingNode::clone):
+ * page/scrolling/ScrollingStateFrameScrollingNode.h:
+ * page/scrolling/ScrollingStateNode.cpp:
+ (WebCore::ScrollingStateNode::cloneAndReset):
+ (WebCore::ScrollingStateNode::appendChild):
+ (WebCore::ScrollingStateNode::removeDescendant):
+ (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
+ (WebCore::ScrollingStateNode::removeChild): Deleted.
+ * page/scrolling/ScrollingStateNode.h:
+ (WebCore::ScrollingStateNode::children):
+ * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
+ (WebCore::ScrollingStateOverflowScrollingNode::create):
+ (WebCore::ScrollingStateOverflowScrollingNode::clone):
+ * page/scrolling/ScrollingStateOverflowScrollingNode.h:
+ * page/scrolling/ScrollingStateStickyNode.cpp:
+ (WebCore::ScrollingStateStickyNode::create):
+ (WebCore::ScrollingStateStickyNode::clone):
+ * page/scrolling/ScrollingStateStickyNode.h:
+ * page/scrolling/ScrollingStateTree.cpp:
+ (WebCore::ScrollingStateTree::attachNode):
+ (WebCore::ScrollingStateTree::removeNode):
+ (WebCore::ScrollingStateTree::willRemoveNode):
+ (WebCore::ScrollingStateTree::didRemoveNode): Deleted.
+ * page/scrolling/ScrollingStateTree.h:
+ (WebCore::ScrollingStateTree::setRootStateNode):
+ * page/scrolling/ScrollingTree.cpp:
+ (WebCore::ScrollingTree::updateTreeFromStateNode):
+
</ins><span class="cx"> 2014-06-18 Anders Carlsson <andersca@apple.com>
</span><span class="cx">
</span><span class="cx"> Adopt modern C++11 loops and fix WebArchive creation functions
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingAsyncScrollingCoordinatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -344,7 +344,7 @@
</span><span class="cx"> if (!m_scrollingStateTree->rootStateNode())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- Vector<OwnPtr<ScrollingStateNode>>* children = m_scrollingStateTree->rootStateNode()->children();
</del><ins>+ auto children = m_scrollingStateTree->rootStateNode()->children();
</ins><span class="cx"> if (!children)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateFixedNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -35,9 +35,9 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PassOwnPtr<ScrollingStateFixedNode> ScrollingStateFixedNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</del><ins>+PassRefPtr<ScrollingStateFixedNode> ScrollingStateFixedNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</ins><span class="cx"> {
</span><del>- return adoptPtr(new ScrollingStateFixedNode(stateTree, nodeID));
</del><ins>+ return adoptRef(new ScrollingStateFixedNode(stateTree, nodeID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ScrollingStateFixedNode::ScrollingStateFixedNode(ScrollingStateTree& tree, ScrollingNodeID nodeID)
</span><span class="lines">@@ -55,9 +55,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<ScrollingStateNode> ScrollingStateFixedNode::clone(ScrollingStateTree& adoptiveTree)
</del><ins>+PassRefPtr<ScrollingStateNode> ScrollingStateFixedNode::clone(ScrollingStateTree& adoptiveTree)
</ins><span class="cx"> {
</span><del>- return adoptPtr(new ScrollingStateFixedNode(*this, adoptiveTree));
</del><ins>+ return adoptRef(new ScrollingStateFixedNode(*this, adoptiveTree));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ScrollingStateFixedNode::updateConstraints(const FixedPositionViewportConstraints& constraints)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateFixedNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -39,9 +39,9 @@
</span><span class="cx">
</span><span class="cx"> class ScrollingStateFixedNode final : public ScrollingStateNode {
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<ScrollingStateFixedNode> create(ScrollingStateTree&, ScrollingNodeID);
</del><ins>+ static PassRefPtr<ScrollingStateFixedNode> create(ScrollingStateTree&, ScrollingNodeID);
</ins><span class="cx">
</span><del>- virtual PassOwnPtr<ScrollingStateNode> clone(ScrollingStateTree&);
</del><ins>+ virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&);
</ins><span class="cx">
</span><span class="cx"> virtual ~ScrollingStateFixedNode();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateFrameScrollingNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PassOwnPtr<ScrollingStateFrameScrollingNode> ScrollingStateFrameScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</del><ins>+PassRefPtr<ScrollingStateFrameScrollingNode> ScrollingStateFrameScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</ins><span class="cx"> {
</span><del>- return adoptPtr(new ScrollingStateFrameScrollingNode(stateTree, nodeID));
</del><ins>+ return adoptRef(new ScrollingStateFrameScrollingNode(stateTree, nodeID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</span><span class="lines">@@ -96,9 +96,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<ScrollingStateNode> ScrollingStateFrameScrollingNode::clone(ScrollingStateTree& adoptiveTree)
</del><ins>+PassRefPtr<ScrollingStateNode> ScrollingStateFrameScrollingNode::clone(ScrollingStateTree& adoptiveTree)
</ins><span class="cx"> {
</span><del>- return adoptPtr(new ScrollingStateFrameScrollingNode(*this, adoptiveTree));
</del><ins>+ return adoptRef(new ScrollingStateFrameScrollingNode(*this, adoptiveTree));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ScrollingStateFrameScrollingNode::setFrameScaleFactor(float scaleFactor)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateFrameScrollingNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -33,7 +33,6 @@
</span><span class="cx"> #include "ScrollbarThemeComposite.h"
</span><span class="cx"> #include "ScrollingCoordinator.h"
</span><span class="cx"> #include "ScrollingStateScrollingNode.h"
</span><del>-#include <wtf/PassOwnPtr.h>
</del><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><span class="lines">@@ -41,9 +40,9 @@
</span><span class="cx">
</span><span class="cx"> class ScrollingStateFrameScrollingNode final : public ScrollingStateScrollingNode {
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<ScrollingStateFrameScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
</del><ins>+ static PassRefPtr<ScrollingStateFrameScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
</ins><span class="cx">
</span><del>- virtual PassOwnPtr<ScrollingStateNode> clone(ScrollingStateTree&);
</del><ins>+ virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&);
</ins><span class="cx">
</span><span class="cx"> virtual ~ScrollingStateFrameScrollingNode();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -72,9 +72,9 @@
</span><span class="cx"> m_scrollingStateTree.setHasChangedProperties();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<ScrollingStateNode> ScrollingStateNode::cloneAndReset(ScrollingStateTree& adoptiveTree)
</del><ins>+PassRefPtr<ScrollingStateNode> ScrollingStateNode::cloneAndReset(ScrollingStateTree& adoptiveTree)
</ins><span class="cx"> {
</span><del>- OwnPtr<ScrollingStateNode> clone = this->clone(adoptiveTree);
</del><ins>+ RefPtr<ScrollingStateNode> clone = this->clone(adoptiveTree);
</ins><span class="cx">
</span><span class="cx"> // Now that this node is cloned, reset our change properties.
</span><span class="cx"> resetChangedProperties();
</span><span class="lines">@@ -92,25 +92,22 @@
</span><span class="cx"> clone.appendChild(child->cloneAndReset(adoptiveTree));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ScrollingStateNode::appendChild(PassOwnPtr<ScrollingStateNode> childNode)
</del><ins>+void ScrollingStateNode::appendChild(PassRefPtr<ScrollingStateNode> childNode)
</ins><span class="cx"> {
</span><span class="cx"> childNode->setParent(this);
</span><span class="cx">
</span><span class="cx"> if (!m_children)
</span><del>- m_children = adoptPtr(new Vector<OwnPtr<ScrollingStateNode>>);
</del><ins>+ m_children = adoptPtr(new Vector<RefPtr<ScrollingStateNode>>);
</ins><span class="cx">
</span><span class="cx"> m_children->append(childNode);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void ScrollingStateNode::removeChild(ScrollingStateNode* node)
</del><ins>+void ScrollingStateNode::removeDescendant(ScrollingStateNode* node)
</ins><span class="cx"> {
</span><span class="cx"> if (!m_children)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> size_t index = m_children->find(node);
</span><del>-
- // The index will be notFound if the node to remove is a deeper-than-1-level descendant or
- // if node is the root state node.
</del><span class="cx"> if (index != notFound) {
</span><span class="cx"> node->willBeRemovedFromStateTree();
</span><span class="cx"> m_children->remove(index);
</span><span class="lines">@@ -118,13 +115,12 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> for (auto& child : *m_children)
</span><del>- child->removeChild(node);
</del><ins>+ child->removeDescendant(node);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ScrollingStateNode::willBeRemovedFromStateTree()
</span><span class="cx"> {
</span><del>- scrollingStateTree().didRemoveNode(scrollingNodeID());
-
</del><ins>+ scrollingStateTree().willRemoveNode(this);
</ins><span class="cx"> if (!m_children)
</span><span class="cx"> return;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx"> #include "GraphicsLayer.h"
</span><span class="cx"> #include "ScrollingCoordinator.h"
</span><span class="cx"> #include <wtf/OwnPtr.h>
</span><del>-#include <wtf/PassOwnPtr.h>
</del><ins>+#include <wtf/RefCounted.h>
</ins><span class="cx"> #include <wtf/Vector.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="lines">@@ -150,7 +150,7 @@
</span><span class="cx"> Type m_representation;
</span><span class="cx"> };
</span><span class="cx">
</span><del>-class ScrollingStateNode {
</del><ins>+class ScrollingStateNode : public RefCounted<ScrollingStateNode> {
</ins><span class="cx"> WTF_MAKE_FAST_ALLOCATED;
</span><span class="cx"> public:
</span><span class="cx"> ScrollingStateNode(ScrollingNodeType, ScrollingStateTree&, ScrollingNodeID);
</span><span class="lines">@@ -164,8 +164,8 @@
</span><span class="cx"> bool isFrameScrollingNode() const { return m_nodeType == FrameScrollingNode; }
</span><span class="cx"> bool isOverflowScrollingNode() const { return m_nodeType == OverflowScrollingNode; }
</span><span class="cx">
</span><del>- virtual PassOwnPtr<ScrollingStateNode> clone(ScrollingStateTree& adoptiveTree) = 0;
- PassOwnPtr<ScrollingStateNode> cloneAndReset(ScrollingStateTree& adoptiveTree);
</del><ins>+ virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree& adoptiveTree) = 0;
+ PassRefPtr<ScrollingStateNode> cloneAndReset(ScrollingStateTree& adoptiveTree);
</ins><span class="cx"> void cloneAndResetChildren(ScrollingStateNode&, ScrollingStateTree& adoptiveTree);
</span><span class="cx">
</span><span class="cx"> enum {
</span><span class="lines">@@ -195,10 +195,10 @@
</span><span class="cx"> void setParent(ScrollingStateNode* parent) { m_parent = parent; }
</span><span class="cx"> ScrollingNodeID parentNodeID() const { return m_parent ? m_parent->scrollingNodeID() : 0; }
</span><span class="cx">
</span><del>- Vector<OwnPtr<ScrollingStateNode>>* children() const { return m_children.get(); }
</del><ins>+ Vector<RefPtr<ScrollingStateNode>>* children() const { return m_children.get(); }
</ins><span class="cx">
</span><del>- void appendChild(PassOwnPtr<ScrollingStateNode>);
- void removeChild(ScrollingStateNode*);
</del><ins>+ void appendChild(PassRefPtr<ScrollingStateNode>);
+ void removeDescendant(ScrollingStateNode*);
</ins><span class="cx">
</span><span class="cx"> String scrollingStateTreeAsText() const;
</span><span class="cx">
</span><span class="lines">@@ -218,7 +218,7 @@
</span><span class="cx"> ScrollingStateTree& m_scrollingStateTree;
</span><span class="cx">
</span><span class="cx"> ScrollingStateNode* m_parent;
</span><del>- OwnPtr<Vector<OwnPtr<ScrollingStateNode>>> m_children;
</del><ins>+ OwnPtr<Vector<RefPtr<ScrollingStateNode>>> m_children;
</ins><span class="cx">
</span><span class="cx"> LayerRepresentation m_layer;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateOverflowScrollingNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PassOwnPtr<ScrollingStateOverflowScrollingNode> ScrollingStateOverflowScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</del><ins>+PassRefPtr<ScrollingStateOverflowScrollingNode> ScrollingStateOverflowScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</ins><span class="cx"> {
</span><del>- return adoptPtr(new ScrollingStateOverflowScrollingNode(stateTree, nodeID));
</del><ins>+ return adoptRef(new ScrollingStateOverflowScrollingNode(stateTree, nodeID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</span><span class="lines">@@ -55,9 +55,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<ScrollingStateNode> ScrollingStateOverflowScrollingNode::clone(ScrollingStateTree& adoptiveTree)
</del><ins>+PassRefPtr<ScrollingStateNode> ScrollingStateOverflowScrollingNode::clone(ScrollingStateTree& adoptiveTree)
</ins><span class="cx"> {
</span><del>- return adoptPtr(new ScrollingStateOverflowScrollingNode(*this, adoptiveTree));
</del><ins>+ return adoptRef(new ScrollingStateOverflowScrollingNode(*this, adoptiveTree));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ScrollingStateOverflowScrollingNode::setScrolledContentsLayer(const LayerRepresentation& layerRepresentation)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateOverflowScrollingNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -34,9 +34,9 @@
</span><span class="cx">
</span><span class="cx"> class ScrollingStateOverflowScrollingNode : public ScrollingStateScrollingNode {
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<ScrollingStateOverflowScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
</del><ins>+ static PassRefPtr<ScrollingStateOverflowScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
</ins><span class="cx">
</span><del>- virtual PassOwnPtr<ScrollingStateNode> clone(ScrollingStateTree&);
</del><ins>+ virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&);
</ins><span class="cx">
</span><span class="cx"> virtual ~ScrollingStateOverflowScrollingNode();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateStickyNodecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -35,9 +35,9 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><del>-PassOwnPtr<ScrollingStateStickyNode> ScrollingStateStickyNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</del><ins>+PassRefPtr<ScrollingStateStickyNode> ScrollingStateStickyNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
</ins><span class="cx"> {
</span><del>- return adoptPtr(new ScrollingStateStickyNode(stateTree, nodeID));
</del><ins>+ return adoptRef(new ScrollingStateStickyNode(stateTree, nodeID));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ScrollingStateStickyNode::ScrollingStateStickyNode(ScrollingStateTree& tree, ScrollingNodeID nodeID)
</span><span class="lines">@@ -55,9 +55,9 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><del>-PassOwnPtr<ScrollingStateNode> ScrollingStateStickyNode::clone(ScrollingStateTree& adoptiveTree)
</del><ins>+PassRefPtr<ScrollingStateNode> ScrollingStateStickyNode::clone(ScrollingStateTree& adoptiveTree)
</ins><span class="cx"> {
</span><del>- return adoptPtr(new ScrollingStateStickyNode(*this, adoptiveTree));
</del><ins>+ return adoptRef(new ScrollingStateStickyNode(*this, adoptiveTree));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void ScrollingStateStickyNode::updateConstraints(const StickyPositionViewportConstraints& constraints)
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateStickyNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -39,9 +39,9 @@
</span><span class="cx">
</span><span class="cx"> class ScrollingStateStickyNode final : public ScrollingStateNode {
</span><span class="cx"> public:
</span><del>- static PassOwnPtr<ScrollingStateStickyNode> create(ScrollingStateTree&, ScrollingNodeID);
</del><ins>+ static PassRefPtr<ScrollingStateStickyNode> create(ScrollingStateTree&, ScrollingNodeID);
</ins><span class="cx">
</span><del>- virtual PassOwnPtr<ScrollingStateNode> clone(ScrollingStateTree&);
</del><ins>+ virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&);
</ins><span class="cx">
</span><span class="cx"> virtual ~ScrollingStateStickyNode();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -72,9 +72,13 @@
</span><span class="cx"> ASSERT(newNodeID);
</span><span class="cx">
</span><span class="cx"> if (ScrollingStateNode* node = stateNodeForID(newNodeID)) {
</span><ins>+ if (!parentID)
+ return newNodeID;
+
</ins><span class="cx"> ScrollingStateNode* parent = stateNodeForID(parentID);
</span><span class="cx"> if (!parent)
</span><span class="cx"> return newNodeID;
</span><ins>+
</ins><span class="cx"> if (node->parent() == parent)
</span><span class="cx"> return newNodeID;
</span><span class="cx">
</span><span class="lines">@@ -82,7 +86,7 @@
</span><span class="cx"> removeNode(node);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- ScrollingStateNode* newNode = 0;
</del><ins>+ ScrollingStateNode* newNode = nullptr;
</ins><span class="cx"> if (!parentID) {
</span><span class="cx"> // If we're resetting the root node, we should clear the HashMap and destroy the current children.
</span><span class="cx"> clear();
</span><span class="lines">@@ -97,25 +101,25 @@
</span><span class="cx">
</span><span class="cx"> switch (nodeType) {
</span><span class="cx"> case FixedNode: {
</span><del>- OwnPtr<ScrollingStateFixedNode> fixedNode = ScrollingStateFixedNode::create(*this, newNodeID);
</del><ins>+ RefPtr<ScrollingStateFixedNode> fixedNode = ScrollingStateFixedNode::create(*this, newNodeID);
</ins><span class="cx"> newNode = fixedNode.get();
</span><span class="cx"> parent->appendChild(fixedNode.release());
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case StickyNode: {
</span><del>- OwnPtr<ScrollingStateStickyNode> stickyNode = ScrollingStateStickyNode::create(*this, newNodeID);
</del><ins>+ RefPtr<ScrollingStateStickyNode> stickyNode = ScrollingStateStickyNode::create(*this, newNodeID);
</ins><span class="cx"> newNode = stickyNode.get();
</span><span class="cx"> parent->appendChild(stickyNode.release());
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case FrameScrollingNode: {
</span><del>- OwnPtr<ScrollingStateFrameScrollingNode> scrollingNode = ScrollingStateFrameScrollingNode::create(*this, newNodeID);
</del><ins>+ RefPtr<ScrollingStateFrameScrollingNode> scrollingNode = ScrollingStateFrameScrollingNode::create(*this, newNodeID);
</ins><span class="cx"> newNode = scrollingNode.get();
</span><span class="cx"> parent->appendChild(scrollingNode.release());
</span><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx"> case OverflowScrollingNode: {
</span><del>- OwnPtr<ScrollingStateOverflowScrollingNode> scrollingNode = ScrollingStateOverflowScrollingNode::create(*this, newNodeID);
</del><ins>+ RefPtr<ScrollingStateOverflowScrollingNode> scrollingNode = ScrollingStateOverflowScrollingNode::create(*this, newNodeID);
</ins><span class="cx"> newNode = scrollingNode.get();
</span><span class="cx"> parent->appendChild(scrollingNode.release());
</span><span class="cx"> break;
</span><span class="lines">@@ -179,24 +183,23 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (node == m_rootStateNode) {
</span><del>- didRemoveNode(node->scrollingNodeID());
</del><ins>+ willRemoveNode(node);
</ins><span class="cx"> m_rootStateNode = nullptr;
</span><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ASSERT(m_rootStateNode);
</span><del>- m_rootStateNode->removeChild(node);
</del><ins>+ m_rootStateNode->removeDescendant(node);
</ins><span class="cx">
</span><del>- // ScrollingStateTree::removeNode() will destroy children, so we have to make sure we remove those children
</del><ins>+ // ScrollingStateTree::removeDescendant() will destroy children, so we have to make sure we remove those children
</ins><span class="cx"> // from the HashMap.
</span><del>- size_t size = m_nodesRemovedSinceLastCommit.size();
- for (size_t i = 0; i < size; ++i)
- m_stateNodeMap.remove(m_nodesRemovedSinceLastCommit[i]);
</del><ins>+ for (auto removedNodeID : m_nodesRemovedSinceLastCommit)
+ m_stateNodeMap.remove(removedNodeID);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void ScrollingStateTree::didRemoveNode(ScrollingNodeID nodeID)
</del><ins>+void ScrollingStateTree::willRemoveNode(ScrollingStateNode* node)
</ins><span class="cx"> {
</span><del>- m_nodesRemovedSinceLastCommit.append(nodeID);
</del><ins>+ m_nodesRemovedSinceLastCommit.append(node->scrollingNodeID());
</ins><span class="cx"> setHasChangedProperties();
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingStateTreeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -79,14 +79,14 @@
</span><span class="cx"> private:
</span><span class="cx"> ScrollingStateTree(AsyncScrollingCoordinator*);
</span><span class="cx">
</span><del>- void setRootStateNode(PassOwnPtr<ScrollingStateFrameScrollingNode> rootStateNode) { m_rootStateNode = rootStateNode; }
</del><ins>+ void setRootStateNode(PassRefPtr<ScrollingStateFrameScrollingNode> rootStateNode) { m_rootStateNode = rootStateNode; }
</ins><span class="cx"> void addNode(ScrollingStateNode*);
</span><span class="cx"> void removeNode(ScrollingStateNode*);
</span><del>- void didRemoveNode(ScrollingNodeID);
</del><ins>+ void willRemoveNode(ScrollingStateNode*);
</ins><span class="cx">
</span><span class="cx"> AsyncScrollingCoordinator* m_scrollingCoordinator;
</span><span class="cx"> StateNodeMap m_stateNodeMap;
</span><del>- OwnPtr<ScrollingStateFrameScrollingNode> m_rootStateNode;
</del><ins>+ RefPtr<ScrollingStateFrameScrollingNode> m_rootStateNode;
</ins><span class="cx"> Vector<ScrollingNodeID> m_nodesRemovedSinceLastCommit;
</span><span class="cx"> bool m_hasChangedProperties;
</span><span class="cx"> bool m_hasNewRootStateNode;
</span></span></pre></div>
<a id="trunkSourceWebCorepagescrollingScrollingTreecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -197,11 +197,9 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> // Now update the children if we have any.
</span><del>- Vector<OwnPtr<ScrollingStateNode>>* stateNodeChildren = stateNode->children();
- if (stateNodeChildren) {
- size_t size = stateNodeChildren->size();
- for (size_t i = 0; i < size; ++i)
- updateTreeFromStateNode(stateNodeChildren->at(i).get());
</del><ins>+ if (auto children = stateNode->children()) {
+ for (auto& child : *children)
+ updateTreeFromStateNode(child.get());
</ins><span class="cx"> }
</span><span class="cx"> node->updateAfterChildren(*stateNode);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebKit2/ChangeLog        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2014-06-18 Simon Fraser <simon.fraser@apple.com>
+
+ Make ScrollingStateNodes refcounted, and other minor cleanup
+ https://bugs.webkit.org/show_bug.cgi?id=134040
+
+ Reviewed by Beth Dakin.
+
+ * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
+ (WebKit::encodeNodeAndDescendants):
+
</ins><span class="cx"> 2014-06-18 Benjamin Poulain <benjamin@webkit.org>
</span><span class="cx">
</span><span class="cx"> [iOS][WK2] Do not add padding when magnifying replaced elements
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedScrollingRemoteScrollingCoordinatorTransactioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp (170117 => 170118)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp        2014-06-18 21:41:44 UTC (rev 170117)
+++ trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp        2014-06-18 21:43:30 UTC (rev 170118)
</span><span class="lines">@@ -337,10 +337,8 @@
</span><span class="cx"> if (!stateNode.children())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- for (size_t i = 0; i < stateNode.children()->size(); ++i) {
- const OwnPtr<ScrollingStateNode>& child = stateNode.children()->at(i);
</del><ins>+ for (const auto& child : *stateNode.children())
</ins><span class="cx"> encodeNodeAndDescendants(encoder, *child.get());
</span><del>- }
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void RemoteScrollingCoordinatorTransaction::encode(IPC::ArgumentEncoder& encoder) const
</span></span></pre>
</div>
</div>
</body>
</html>