Changeset 170118 in webkit


Ignore:
Timestamp:
Jun 18, 2014, 2:43:30 PM (11 years ago)
Author:
Simon Fraser
Message:

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):

Location:
trunk/Source
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r170113 r170118  
     12014-06-18  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make ScrollingStateNodes refcounted, and other minor cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=134040
     5
     6        Reviewed by Beth Dakin.
     7
     8        Prepare for future scrolling frame gyrations by making
     9        ScrollingStateNodes refcounted.
     10       
     11        Rename ScrollingStateNode::removeChild() to removeDescendant()
     12        since that's what it does. Also rename didRemoveNode() to willRemoveNode()
     13        to better match the behavior.
     14       
     15        Use 'auto' in more places.
     16
     17        * page/scrolling/AsyncScrollingCoordinator.cpp:
     18        (WebCore::AsyncScrollingCoordinator::syncChildPositions):
     19        * page/scrolling/ScrollingStateFixedNode.cpp:
     20        (WebCore::ScrollingStateFixedNode::create):
     21        (WebCore::ScrollingStateFixedNode::clone):
     22        * page/scrolling/ScrollingStateFixedNode.h:
     23        * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
     24        (WebCore::ScrollingStateFrameScrollingNode::create):
     25        (WebCore::ScrollingStateFrameScrollingNode::clone):
     26        * page/scrolling/ScrollingStateFrameScrollingNode.h:
     27        * page/scrolling/ScrollingStateNode.cpp:
     28        (WebCore::ScrollingStateNode::cloneAndReset):
     29        (WebCore::ScrollingStateNode::appendChild):
     30        (WebCore::ScrollingStateNode::removeDescendant):
     31        (WebCore::ScrollingStateNode::willBeRemovedFromStateTree):
     32        (WebCore::ScrollingStateNode::removeChild): Deleted.
     33        * page/scrolling/ScrollingStateNode.h:
     34        (WebCore::ScrollingStateNode::children):
     35        * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
     36        (WebCore::ScrollingStateOverflowScrollingNode::create):
     37        (WebCore::ScrollingStateOverflowScrollingNode::clone):
     38        * page/scrolling/ScrollingStateOverflowScrollingNode.h:
     39        * page/scrolling/ScrollingStateStickyNode.cpp:
     40        (WebCore::ScrollingStateStickyNode::create):
     41        (WebCore::ScrollingStateStickyNode::clone):
     42        * page/scrolling/ScrollingStateStickyNode.h:
     43        * page/scrolling/ScrollingStateTree.cpp:
     44        (WebCore::ScrollingStateTree::attachNode):
     45        (WebCore::ScrollingStateTree::removeNode):
     46        (WebCore::ScrollingStateTree::willRemoveNode):
     47        (WebCore::ScrollingStateTree::didRemoveNode): Deleted.
     48        * page/scrolling/ScrollingStateTree.h:
     49        (WebCore::ScrollingStateTree::setRootStateNode):
     50        * page/scrolling/ScrollingTree.cpp:
     51        (WebCore::ScrollingTree::updateTreeFromStateNode):
     52
    1532014-06-18  Anders Carlsson  <andersca@apple.com>
    254
  • trunk/Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp

    r169913 r170118  
    345345        return;
    346346
    347     Vector<OwnPtr<ScrollingStateNode>>* children = m_scrollingStateTree->rootStateNode()->children();
     347    auto children = m_scrollingStateTree->rootStateNode()->children();
    348348    if (!children)
    349349        return;
  • trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp

    r161315 r170118  
    3636namespace WebCore {
    3737
    38 PassOwnPtr<ScrollingStateFixedNode> ScrollingStateFixedNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
     38PassRefPtr<ScrollingStateFixedNode> ScrollingStateFixedNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
    3939{
    40     return adoptPtr(new ScrollingStateFixedNode(stateTree, nodeID));
     40    return adoptRef(new ScrollingStateFixedNode(stateTree, nodeID));
    4141}
    4242
     
    5656}
    5757
    58 PassOwnPtr<ScrollingStateNode> ScrollingStateFixedNode::clone(ScrollingStateTree& adoptiveTree)
     58PassRefPtr<ScrollingStateNode> ScrollingStateFixedNode::clone(ScrollingStateTree& adoptiveTree)
    5959{
    60     return adoptPtr(new ScrollingStateFixedNode(*this, adoptiveTree));
     60    return adoptRef(new ScrollingStateFixedNode(*this, adoptiveTree));
    6161}
    6262
  • trunk/Source/WebCore/page/scrolling/ScrollingStateFixedNode.h

    r166293 r170118  
    4040class ScrollingStateFixedNode final : public ScrollingStateNode {
    4141public:
    42     static PassOwnPtr<ScrollingStateFixedNode> create(ScrollingStateTree&, ScrollingNodeID);
     42    static PassRefPtr<ScrollingStateFixedNode> create(ScrollingStateTree&, ScrollingNodeID);
    4343
    44     virtual PassOwnPtr<ScrollingStateNode> clone(ScrollingStateTree&);
     44    virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&);
    4545
    4646    virtual ~ScrollingStateFixedNode();
  • trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp

    r169123 r170118  
    3535namespace WebCore {
    3636
    37 PassOwnPtr<ScrollingStateFrameScrollingNode> ScrollingStateFrameScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
    38 {
    39     return adoptPtr(new ScrollingStateFrameScrollingNode(stateTree, nodeID));
     37PassRefPtr<ScrollingStateFrameScrollingNode> ScrollingStateFrameScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
     38{
     39    return adoptRef(new ScrollingStateFrameScrollingNode(stateTree, nodeID));
    4040}
    4141
     
    9797}
    9898
    99 PassOwnPtr<ScrollingStateNode> ScrollingStateFrameScrollingNode::clone(ScrollingStateTree& adoptiveTree)
    100 {
    101     return adoptPtr(new ScrollingStateFrameScrollingNode(*this, adoptiveTree));
     99PassRefPtr<ScrollingStateNode> ScrollingStateFrameScrollingNode::clone(ScrollingStateTree& adoptiveTree)
     100{
     101    return adoptRef(new ScrollingStateFrameScrollingNode(*this, adoptiveTree));
    102102}
    103103
  • trunk/Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h

    r169123 r170118  
    3434#include "ScrollingCoordinator.h"
    3535#include "ScrollingStateScrollingNode.h"
    36 #include <wtf/PassOwnPtr.h>
    3736
    3837namespace WebCore {
     
    4241class ScrollingStateFrameScrollingNode final : public ScrollingStateScrollingNode {
    4342public:
    44     static PassOwnPtr<ScrollingStateFrameScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
     43    static PassRefPtr<ScrollingStateFrameScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
    4544
    46     virtual PassOwnPtr<ScrollingStateNode> clone(ScrollingStateTree&);
     45    virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&);
    4746
    4847    virtual ~ScrollingStateFrameScrollingNode();
  • trunk/Source/WebCore/page/scrolling/ScrollingStateNode.cpp

    r169773 r170118  
    7373}
    7474
    75 PassOwnPtr<ScrollingStateNode> ScrollingStateNode::cloneAndReset(ScrollingStateTree& adoptiveTree)
     75PassRefPtr<ScrollingStateNode> ScrollingStateNode::cloneAndReset(ScrollingStateTree& adoptiveTree)
    7676{
    77     OwnPtr<ScrollingStateNode> clone = this->clone(adoptiveTree);
     77    RefPtr<ScrollingStateNode> clone = this->clone(adoptiveTree);
    7878
    7979    // Now that this node is cloned, reset our change properties.
     
    9393}
    9494
    95 void ScrollingStateNode::appendChild(PassOwnPtr<ScrollingStateNode> childNode)
     95void ScrollingStateNode::appendChild(PassRefPtr<ScrollingStateNode> childNode)
    9696{
    9797    childNode->setParent(this);
    9898
    9999    if (!m_children)
    100         m_children = adoptPtr(new Vector<OwnPtr<ScrollingStateNode>>);
     100        m_children = adoptPtr(new Vector<RefPtr<ScrollingStateNode>>);
    101101
    102102    m_children->append(childNode);
    103103}
    104104
    105 void ScrollingStateNode::removeChild(ScrollingStateNode* node)
     105void ScrollingStateNode::removeDescendant(ScrollingStateNode* node)
    106106{
    107107    if (!m_children)
     
    109109
    110110    size_t index = m_children->find(node);
    111 
    112     // The index will be notFound if the node to remove is a deeper-than-1-level descendant or
    113     // if node is the root state node.
    114111    if (index != notFound) {
    115112        node->willBeRemovedFromStateTree();
     
    119116
    120117    for (auto& child : *m_children)
    121         child->removeChild(node);
     118        child->removeDescendant(node);
    122119}
    123120
    124121void ScrollingStateNode::willBeRemovedFromStateTree()
    125122{
    126     scrollingStateTree().didRemoveNode(scrollingNodeID());
    127 
     123    scrollingStateTree().willRemoveNode(this);
    128124    if (!m_children)
    129125        return;
  • trunk/Source/WebCore/page/scrolling/ScrollingStateNode.h

    r169063 r170118  
    3232#include "ScrollingCoordinator.h"
    3333#include <wtf/OwnPtr.h>
    34 #include <wtf/PassOwnPtr.h>
     34#include <wtf/RefCounted.h>
    3535#include <wtf/Vector.h>
    3636
     
    151151};
    152152
    153 class ScrollingStateNode {
     153class ScrollingStateNode : public RefCounted<ScrollingStateNode> {
    154154    WTF_MAKE_FAST_ALLOCATED;
    155155public:
     
    165165    bool isOverflowScrollingNode() const { return m_nodeType == OverflowScrollingNode; }
    166166
    167     virtual PassOwnPtr<ScrollingStateNode> clone(ScrollingStateTree& adoptiveTree) = 0;
    168     PassOwnPtr<ScrollingStateNode> cloneAndReset(ScrollingStateTree& adoptiveTree);
     167    virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree& adoptiveTree) = 0;
     168    PassRefPtr<ScrollingStateNode> cloneAndReset(ScrollingStateTree& adoptiveTree);
    169169    void cloneAndResetChildren(ScrollingStateNode&, ScrollingStateTree& adoptiveTree);
    170170
     
    196196    ScrollingNodeID parentNodeID() const { return m_parent ? m_parent->scrollingNodeID() : 0; }
    197197
    198     Vector<OwnPtr<ScrollingStateNode>>* children() const { return m_children.get(); }
    199 
    200     void appendChild(PassOwnPtr<ScrollingStateNode>);
    201     void removeChild(ScrollingStateNode*);
     198    Vector<RefPtr<ScrollingStateNode>>* children() const { return m_children.get(); }
     199
     200    void appendChild(PassRefPtr<ScrollingStateNode>);
     201    void removeDescendant(ScrollingStateNode*);
    202202
    203203    String scrollingStateTreeAsText() const;
     
    219219
    220220    ScrollingStateNode* m_parent;
    221     OwnPtr<Vector<OwnPtr<ScrollingStateNode>>> m_children;
     221    OwnPtr<Vector<RefPtr<ScrollingStateNode>>> m_children;
    222222
    223223    LayerRepresentation m_layer;
  • trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp

    r169063 r170118  
    3535namespace WebCore {
    3636
    37 PassOwnPtr<ScrollingStateOverflowScrollingNode> ScrollingStateOverflowScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
     37PassRefPtr<ScrollingStateOverflowScrollingNode> ScrollingStateOverflowScrollingNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
    3838{
    39     return adoptPtr(new ScrollingStateOverflowScrollingNode(stateTree, nodeID));
     39    return adoptRef(new ScrollingStateOverflowScrollingNode(stateTree, nodeID));
    4040}
    4141
     
    5656}
    5757
    58 PassOwnPtr<ScrollingStateNode> ScrollingStateOverflowScrollingNode::clone(ScrollingStateTree& adoptiveTree)
     58PassRefPtr<ScrollingStateNode> ScrollingStateOverflowScrollingNode::clone(ScrollingStateTree& adoptiveTree)
    5959{
    60     return adoptPtr(new ScrollingStateOverflowScrollingNode(*this, adoptiveTree));
     60    return adoptRef(new ScrollingStateOverflowScrollingNode(*this, adoptiveTree));
    6161}
    6262   
  • trunk/Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h

    r169063 r170118  
    3535class ScrollingStateOverflowScrollingNode : public ScrollingStateScrollingNode {
    3636public:
    37     static PassOwnPtr<ScrollingStateOverflowScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
     37    static PassRefPtr<ScrollingStateOverflowScrollingNode> create(ScrollingStateTree&, ScrollingNodeID);
    3838
    39     virtual PassOwnPtr<ScrollingStateNode> clone(ScrollingStateTree&);
     39    virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&);
    4040
    4141    virtual ~ScrollingStateOverflowScrollingNode();
  • trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp

    r169745 r170118  
    3636namespace WebCore {
    3737
    38 PassOwnPtr<ScrollingStateStickyNode> ScrollingStateStickyNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
     38PassRefPtr<ScrollingStateStickyNode> ScrollingStateStickyNode::create(ScrollingStateTree& stateTree, ScrollingNodeID nodeID)
    3939{
    40     return adoptPtr(new ScrollingStateStickyNode(stateTree, nodeID));
     40    return adoptRef(new ScrollingStateStickyNode(stateTree, nodeID));
    4141}
    4242
     
    5656}
    5757
    58 PassOwnPtr<ScrollingStateNode> ScrollingStateStickyNode::clone(ScrollingStateTree& adoptiveTree)
     58PassRefPtr<ScrollingStateNode> ScrollingStateStickyNode::clone(ScrollingStateTree& adoptiveTree)
    5959{
    60     return adoptPtr(new ScrollingStateStickyNode(*this, adoptiveTree));
     60    return adoptRef(new ScrollingStateStickyNode(*this, adoptiveTree));
    6161}
    6262
  • trunk/Source/WebCore/page/scrolling/ScrollingStateStickyNode.h

    r166293 r170118  
    4040class ScrollingStateStickyNode final : public ScrollingStateNode {
    4141public:
    42     static PassOwnPtr<ScrollingStateStickyNode> create(ScrollingStateTree&, ScrollingNodeID);
     42    static PassRefPtr<ScrollingStateStickyNode> create(ScrollingStateTree&, ScrollingNodeID);
    4343
    44     virtual PassOwnPtr<ScrollingStateNode> clone(ScrollingStateTree&);
     44    virtual PassRefPtr<ScrollingStateNode> clone(ScrollingStateTree&);
    4545
    4646    virtual ~ScrollingStateStickyNode();
  • trunk/Source/WebCore/page/scrolling/ScrollingStateTree.cpp

    r169063 r170118  
    7373
    7474    if (ScrollingStateNode* node = stateNodeForID(newNodeID)) {
     75        if (!parentID)
     76            return newNodeID;
     77
    7578        ScrollingStateNode* parent = stateNodeForID(parentID);
    7679        if (!parent)
    7780            return newNodeID;
     81
    7882        if (node->parent() == parent)
    7983            return newNodeID;
     
    8387    }
    8488
    85     ScrollingStateNode* newNode = 0;
     89    ScrollingStateNode* newNode = nullptr;
    8690    if (!parentID) {
    8791        // If we're resetting the root node, we should clear the HashMap and destroy the current children.
     
    98102        switch (nodeType) {
    99103        case FixedNode: {
    100             OwnPtr<ScrollingStateFixedNode> fixedNode = ScrollingStateFixedNode::create(*this, newNodeID);
     104            RefPtr<ScrollingStateFixedNode> fixedNode = ScrollingStateFixedNode::create(*this, newNodeID);
    101105            newNode = fixedNode.get();
    102106            parent->appendChild(fixedNode.release());
     
    104108        }
    105109        case StickyNode: {
    106             OwnPtr<ScrollingStateStickyNode> stickyNode = ScrollingStateStickyNode::create(*this, newNodeID);
     110            RefPtr<ScrollingStateStickyNode> stickyNode = ScrollingStateStickyNode::create(*this, newNodeID);
    107111            newNode = stickyNode.get();
    108112            parent->appendChild(stickyNode.release());
     
    110114        }
    111115        case FrameScrollingNode: {
    112             OwnPtr<ScrollingStateFrameScrollingNode> scrollingNode = ScrollingStateFrameScrollingNode::create(*this, newNodeID);
     116            RefPtr<ScrollingStateFrameScrollingNode> scrollingNode = ScrollingStateFrameScrollingNode::create(*this, newNodeID);
    113117            newNode = scrollingNode.get();
    114118            parent->appendChild(scrollingNode.release());
     
    116120        }
    117121        case OverflowScrollingNode: {
    118             OwnPtr<ScrollingStateOverflowScrollingNode> scrollingNode = ScrollingStateOverflowScrollingNode::create(*this, newNodeID);
     122            RefPtr<ScrollingStateOverflowScrollingNode> scrollingNode = ScrollingStateOverflowScrollingNode::create(*this, newNodeID);
    119123            newNode = scrollingNode.get();
    120124            parent->appendChild(scrollingNode.release());
     
    180184
    181185    if (node == m_rootStateNode) {
    182         didRemoveNode(node->scrollingNodeID());
     186        willRemoveNode(node);
    183187        m_rootStateNode = nullptr;
    184188        return;
     
    186190
    187191    ASSERT(m_rootStateNode);
    188     m_rootStateNode->removeChild(node);
    189 
    190     // ScrollingStateTree::removeNode() will destroy children, so we have to make sure we remove those children
     192    m_rootStateNode->removeDescendant(node);
     193
     194    // ScrollingStateTree::removeDescendant() will destroy children, so we have to make sure we remove those children
    191195    // from the HashMap.
    192     size_t size = m_nodesRemovedSinceLastCommit.size();
    193     for (size_t i = 0; i < size; ++i)
    194         m_stateNodeMap.remove(m_nodesRemovedSinceLastCommit[i]);
    195 }
    196 
    197 void ScrollingStateTree::didRemoveNode(ScrollingNodeID nodeID)
    198 {
    199     m_nodesRemovedSinceLastCommit.append(nodeID);
     196    for (auto removedNodeID : m_nodesRemovedSinceLastCommit)
     197        m_stateNodeMap.remove(removedNodeID);
     198}
     199
     200void ScrollingStateTree::willRemoveNode(ScrollingStateNode* node)
     201{
     202    m_nodesRemovedSinceLastCommit.append(node->scrollingNodeID());
    200203    setHasChangedProperties();
    201204}
  • trunk/Source/WebCore/page/scrolling/ScrollingStateTree.h

    r169063 r170118  
    8080    ScrollingStateTree(AsyncScrollingCoordinator*);
    8181
    82     void setRootStateNode(PassOwnPtr<ScrollingStateFrameScrollingNode> rootStateNode) { m_rootStateNode = rootStateNode; }
     82    void setRootStateNode(PassRefPtr<ScrollingStateFrameScrollingNode> rootStateNode) { m_rootStateNode = rootStateNode; }
    8383    void addNode(ScrollingStateNode*);
    8484    void removeNode(ScrollingStateNode*);
    85     void didRemoveNode(ScrollingNodeID);
     85    void willRemoveNode(ScrollingStateNode*);
    8686
    8787    AsyncScrollingCoordinator* m_scrollingCoordinator;
    8888    StateNodeMap m_stateNodeMap;
    89     OwnPtr<ScrollingStateFrameScrollingNode> m_rootStateNode;
     89    RefPtr<ScrollingStateFrameScrollingNode> m_rootStateNode;
    9090    Vector<ScrollingNodeID> m_nodesRemovedSinceLastCommit;
    9191    bool m_hasChangedProperties;
  • trunk/Source/WebCore/page/scrolling/ScrollingTree.cpp

    r169410 r170118  
    198198
    199199    // Now update the children if we have any.
    200     Vector<OwnPtr<ScrollingStateNode>>* stateNodeChildren = stateNode->children();
    201     if (stateNodeChildren) {
    202         size_t size = stateNodeChildren->size();
    203         for (size_t i = 0; i < size; ++i)
    204             updateTreeFromStateNode(stateNodeChildren->at(i).get());
     200    if (auto children = stateNode->children()) {
     201        for (auto& child : *children)
     202            updateTreeFromStateNode(child.get());
    205203    }
    206204    node->updateAfterChildren(*stateNode);
  • trunk/Source/WebKit2/ChangeLog

    r170116 r170118  
     12014-06-18  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Make ScrollingStateNodes refcounted, and other minor cleanup
     4        https://bugs.webkit.org/show_bug.cgi?id=134040
     5
     6        Reviewed by Beth Dakin.
     7
     8        * Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
     9        (WebKit::encodeNodeAndDescendants):
     10
    1112014-06-18  Benjamin Poulain  <benjamin@webkit.org>
    212
  • trunk/Source/WebKit2/Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp

    r169123 r170118  
    338338        return;
    339339
    340     for (size_t i = 0; i < stateNode.children()->size(); ++i) {
    341         const OwnPtr<ScrollingStateNode>& child = stateNode.children()->at(i);
     340    for (const auto& child : *stateNode.children())
    342341        encodeNodeAndDescendants(encoder, *child.get());
    343     }
    344342}
    345343
Note: See TracChangeset for help on using the changeset viewer.