Move m_stateNodeMap from ScrollingCoordinatorMac to ScrollingStateTree
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Feb 2013 21:28:12 +0000 (21:28 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Feb 2013 21:28:12 +0000 (21:28 +0000)
commit94607e8559aa99f168bcbae6e842e24b40dc1f1b
tree51f2da2605ac12aeb923ceb975cff80a83668e4e
parentc0658d8516494fdf98a910dcc2ea43b09d38eb6e
Move m_stateNodeMap from ScrollingCoordinatorMac to ScrollingStateTree
https://bugs.webkit.org/show_bug.cgi?id=109361

Reviewed by Sam Weinig.

The map of scrolling node IDs to ScollingStateNodes was maintained by
ScrollingCoordinatorMac, rather than ScrollingStateTree. This is different
from the ScrollingTree (which owns its node map), and added some amount
of to-and-fro between ScrollingStateTree and ScrollingCoordinatorMac.

Having ScrollingCoordinatorMac maintain the map of IDs to state nodes
simplifies things.

No behavior change.

* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::detachNode):
(WebCore::ScrollingStateTree::clear):
(WebCore::ScrollingStateTree::removeNode):
(WebCore::ScrollingStateTree::stateNodeForID):
* page/scrolling/ScrollingStateTree.h:
(ScrollingStateTree): Remove some stale comments.
(WebCore::ScrollingStateTree::removedNodes):
* page/scrolling/mac/ScrollingCoordinatorMac.h:
(ScrollingCoordinatorMac):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
(WebCore::ScrollingCoordinatorMac::recomputeWheelEventHandlerCountForFrameView):
(WebCore::ScrollingCoordinatorMac::frameViewRootLayerDidChange):
(WebCore::ScrollingCoordinatorMac::requestScrollPositionUpdate):
(WebCore::ScrollingCoordinatorMac::attachToStateTree):
(WebCore::ScrollingCoordinatorMac::detachFromStateTree):
(WebCore::ScrollingCoordinatorMac::clearStateTree):
(WebCore::ScrollingCoordinatorMac::updateScrollingNode):
(WebCore::ScrollingCoordinatorMac::updateViewportConstrainedNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142504 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingStateTree.cpp
Source/WebCore/page/scrolling/ScrollingStateTree.h
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.h
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm