https://bugs.webkit.org/show_bug.cgi?id=98313
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Oct 2012 23:36:17 +0000 (23:36 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Oct 2012 23:36:17 +0000 (23:36 +0000)
commit25398f5169b3e455f3ab92af49198f737f0b838d
tree165ecba11b33b9bf3eec4970625b759e0dff2cab
parentcb81b7a1255b0b9ad24ae50894d7ee20b87ee6bd
https://bugs.webkit.org/show_bug.cgi?id=98313
ScrollingStateNode should keep a Vector of children instead of child
pointers

Reviewed by Simon Fraser.

This patch re-names ScrollingStateNode::cloneNode() to
ScrollingStateNode::cloneAndResetNode(). The new function resets the
change properties of the current node after cloning it, and it also
takes care of cloning children, which the old function did not do.

m_firstChild and m_nextSibling are gone. Use the m_children Vector
instead.
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::cloneAndResetChildNodes):
(WebCore::ScrollingStateNode::appendChild):
* page/scrolling/ScrollingStateNode.h:
(ScrollingStateNode):
(WebCore::ScrollingStateNode::parent):
(WebCore::ScrollingStateNode::setParent):

Reset the change properties and clone children in cloneAndResetNode()
* page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::cloneAndResetNode):
* page/scrolling/ScrollingStateScrollingNode.h:

Yay, this function can be vastly simplified now that we don't have
those messy child and sibling pointers.
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::commit):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130342 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingStateNode.cpp
Source/WebCore/page/scrolling/ScrollingStateNode.h
Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
Source/WebCore/page/scrolling/ScrollingStateTree.cpp