Minor refactoring of the scrolling code
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2018 18:20:56 +0000 (18:20 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Dec 2018 18:20:56 +0000 (18:20 +0000)
commit8b76e5a3759d0f31dcacb36cd7f4d77555e27825
tree432b66af7200f483f0520814af63463d92b2ca20
parentaab641faf018b58b362a17b8ea5a190cf6a7fa47
Minor refactoring of the scrolling code
https://bugs.webkit.org/show_bug.cgi?id=192398

Patch by Frederic Wang <fwang@igalia.com> on 2018-12-05
Reviewed by Simon Fraser.

Based on an earlier patch by Simon Fraser.

This patch performs some minor refactoring of the scrolling code:
- Rename ScrollingCoordinator::uniqueScrollLayerID() to uniqueScrollingNodeID() since it
  is really a node id.
- Inline ScrollingStateTree::setRootStateNode() so we only need to forward declare
  ScrollingStateFrameScrollingNode in headers.
- Pass argument to ScrollingStateTree::addNode() as a reference rather than a pointer.
- Initialize ScrollingStateTree::m_changedProperties and ScrollingStateTree::m_parent in
  the header file.
- Remove obsolete comment about ScrollingCoordinatorMac.

No new tests, behavior unchanged.

* page/scrolling/ScrollingCoordinator.cpp:
(WebCore::ScrollingCoordinator::uniqueScrollingNodeID):
(WebCore::ScrollingCoordinator::uniqueScrollLayerID): Deleted.
* page/scrolling/ScrollingCoordinator.h:
* page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::ScrollingStateNode):
* page/scrolling/ScrollingStateNode.h:
* page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachNode):
(WebCore::ScrollingStateTree::setRootStateNode):
(WebCore::ScrollingStateTree::addNode):
* page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::setRootStateNode): Deleted.
* page/scrolling/ScrollingTree.cpp:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::attachScrollingNode):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238898 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingCoordinator.cpp
Source/WebCore/page/scrolling/ScrollingCoordinator.h
Source/WebCore/page/scrolling/ScrollingStateNode.cpp
Source/WebCore/page/scrolling/ScrollingStateNode.h
Source/WebCore/page/scrolling/ScrollingStateTree.cpp
Source/WebCore/page/scrolling/ScrollingStateTree.h
Source/WebCore/page/scrolling/ScrollingTree.cpp
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h
Source/WebCore/rendering/RenderLayerCompositor.cpp