Fixed and sticky nodes have no nodeID set
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Feb 2013 21:03:16 +0000 (21:03 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 2 Feb 2013 21:03:16 +0000 (21:03 +0000)
commitb4c99d444ae0bb8642ab87bbd6abef4cd8278410
treebd11d6288db18df0fc526a452f418ad63c5db57b
parent37e20daf65b4cf7fc3f61a895ab46624fc3d8223
Fixed and sticky nodes have no nodeID set
https://bugs.webkit.org/show_bug.cgi?id=108734

Reviewed by Sam Weinig.

Push ScrollingNodeIDs onto scrolling nodes at construction time, and thereafter
treat them as readonly. Previously, only the root scrolling node would have a node ID.

Node IDs aren't actually used by the scrolling tree yet, but are useful for debugging.

Not testable since we only dump the scrolling state tree, not the scrolling
node tree in tests.

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::ScrollingTree): No longer create the root node here;
we can only create it when we know what its ID will be.
(WebCore::ScrollingTree::updateTreeFromStateNode): Create the root node if
necessary. Pass node IDs into create methods.
* page/scrolling/ScrollingTreeNode.cpp:
(WebCore::ScrollingTreeNode::ScrollingTreeNode):
* page/scrolling/ScrollingTreeNode.h:
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::ScrollingTreeScrollingNode):
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::create):
(WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
(WebCore::ScrollingTreeScrollingNode::create):
(WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
* page/scrolling/mac/ScrollingTreeStickyNode.h:
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::create):
(WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@141703 268f45cc-cd09-0410-ab3c-d52691b4dbfc
12 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingTree.cpp
Source/WebCore/page/scrolling/ScrollingTreeNode.cpp
Source/WebCore/page/scrolling/ScrollingTreeNode.h
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h
Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.h
Source/WebCore/page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.h
Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm