Rename some ScrollingTree/Node-related functions to reduce the number of uses of...
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Nov 2016 19:42:26 +0000 (19:42 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 4 Nov 2016 19:42:26 +0000 (19:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=164420

Reviewed by Tim Horton.

Rename:
    commitNewTreeState -> commitTreeState ("new" was redundant)
    updateBeforeChildren -> commitStateBeforeChildren
    updateAfterChildren -> commitStateAfterChildren

Source/WebCore:

* page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::updateTreeFromStateNode):
(WebCore::ScrollingTree::commitNewTreeState): Deleted.
* page/scrolling/ScrollingTree.h:
* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren): Deleted.
* page/scrolling/ScrollingTreeFrameScrollingNode.h:
* page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::commitStateAfterChildren):
(WebCore::ScrollingTreeNode::updateAfterChildren): Deleted.
* page/scrolling/ScrollingTreeScrollingNode.cpp:
(WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):
(WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): Deleted.
(WebCore::ScrollingTreeScrollingNode::updateAfterChildren): Deleted.
* page/scrolling/ScrollingTreeScrollingNode.h:
* page/scrolling/ThreadedScrollingTree.cpp:
(WebCore::ThreadedScrollingTree::commitTreeState):
(WebCore::ThreadedScrollingTree::commitNewTreeState): Deleted.
* page/scrolling/ThreadedScrollingTree.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
* page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
(WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren): Deleted.
* page/scrolling/ios/ScrollingTreeIOS.cpp:
(WebCore::ScrollingTreeIOS::commitNewTreeState): Deleted.
* page/scrolling/ios/ScrollingTreeIOS.h:
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::commitTreeState):
* page/scrolling/mac/ScrollingTreeFixedNode.h:
* page/scrolling/mac/ScrollingTreeFixedNode.mm:
(WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeFixedNode::updateBeforeChildren): Deleted.
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
* page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Deleted.
(WebCore::ScrollingTreeFrameScrollingNodeMac::updateAfterChildren): Deleted.
* page/scrolling/mac/ScrollingTreeStickyNode.h:
* page/scrolling/mac/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
(WebCore::ScrollingTreeStickyNode::updateBeforeChildren): Deleted.

Source/WebKit2:

* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
(WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Deleted.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren): Deleted.
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Deleted.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208395 268f45cc-cd09-0410-ab3c-d52691b4dbfc

27 files changed:
Source/WebCore/ChangeLog
Source/WebCore/page/scrolling/ScrollingTree.cpp
Source/WebCore/page/scrolling/ScrollingTree.h
Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingTreeFrameScrollingNode.h
Source/WebCore/page/scrolling/ScrollingTreeNode.h
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.cpp
Source/WebCore/page/scrolling/ScrollingTreeScrollingNode.h
Source/WebCore/page/scrolling/ThreadedScrollingTree.cpp
Source/WebCore/page/scrolling/ThreadedScrollingTree.h
Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h
Source/WebCore/page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm
Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.cpp
Source/WebCore/page/scrolling/ios/ScrollingTreeIOS.h
Source/WebCore/page/scrolling/mac/ScrollingCoordinatorMac.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h
Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h
Source/WebCore/page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm
Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.h
Source/WebCore/page/scrolling/mac/ScrollingTreeStickyNode.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp
Source/WebKit2/UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h
Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h
Source/WebKit2/UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm
Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm

index 74f1f48..62b1ff9 100644 (file)
@@ -1,3 +1,63 @@
+2016-11-04  Simon Fraser  <simon.fraser@apple.com>
+
+        Rename some ScrollingTree/Node-related functions to reduce the number of uses of "update"
+        https://bugs.webkit.org/show_bug.cgi?id=164420
+
+        Reviewed by Tim Horton.
+
+        Rename:
+            commitNewTreeState -> commitTreeState ("new" was redundant)
+            updateBeforeChildren -> commitStateBeforeChildren
+            updateAfterChildren -> commitStateAfterChildren
+
+        * page/scrolling/ScrollingTree.cpp:
+        (WebCore::ScrollingTree::commitTreeState):
+        (WebCore::ScrollingTree::updateTreeFromStateNode):
+        (WebCore::ScrollingTree::commitNewTreeState): Deleted.
+        * page/scrolling/ScrollingTree.h:
+        * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
+        (WebCore::ScrollingTreeFrameScrollingNode::commitStateBeforeChildren):
+        (WebCore::ScrollingTreeFrameScrollingNode::updateBeforeChildren): Deleted.
+        * page/scrolling/ScrollingTreeFrameScrollingNode.h:
+        * page/scrolling/ScrollingTreeNode.h:
+        (WebCore::ScrollingTreeNode::commitStateAfterChildren):
+        (WebCore::ScrollingTreeNode::updateAfterChildren): Deleted.
+        * page/scrolling/ScrollingTreeScrollingNode.cpp:
+        (WebCore::ScrollingTreeScrollingNode::commitStateBeforeChildren):
+        (WebCore::ScrollingTreeScrollingNode::commitStateAfterChildren):
+        (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): Deleted.
+        (WebCore::ScrollingTreeScrollingNode::updateAfterChildren): Deleted.
+        * page/scrolling/ScrollingTreeScrollingNode.h:
+        * page/scrolling/ThreadedScrollingTree.cpp:
+        (WebCore::ThreadedScrollingTree::commitTreeState):
+        (WebCore::ThreadedScrollingTree::commitNewTreeState): Deleted.
+        * page/scrolling/ThreadedScrollingTree.h:
+        * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.h:
+        * page/scrolling/ios/ScrollingTreeFrameScrollingNodeIOS.mm:
+        (WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren):
+        (WebCore::ScrollingTreeFrameScrollingNodeIOS::commitStateAfterChildren):
+        (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren): Deleted.
+        (WebCore::ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren): Deleted.
+        * page/scrolling/ios/ScrollingTreeIOS.cpp:
+        (WebCore::ScrollingTreeIOS::commitNewTreeState): Deleted.
+        * page/scrolling/ios/ScrollingTreeIOS.h:
+        * page/scrolling/mac/ScrollingCoordinatorMac.mm:
+        (WebCore::ScrollingCoordinatorMac::commitTreeState):
+        * page/scrolling/mac/ScrollingTreeFixedNode.h:
+        * page/scrolling/mac/ScrollingTreeFixedNode.mm:
+        (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
+        (WebCore::ScrollingTreeFixedNode::updateBeforeChildren): Deleted.
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
+        * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren):
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren):
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Deleted.
+        (WebCore::ScrollingTreeFrameScrollingNodeMac::updateAfterChildren): Deleted.
+        * page/scrolling/mac/ScrollingTreeStickyNode.h:
+        * page/scrolling/mac/ScrollingTreeStickyNode.mm:
+        (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
+        (WebCore::ScrollingTreeStickyNode::updateBeforeChildren): Deleted.
+
 2016-11-03  Anders Carlsson  <andersca@apple.com>
 
         Add new 'other' Apple Pay button style
index d20cde8..f8e9e76 100644 (file)
@@ -115,7 +115,7 @@ void ScrollingTree::scrollPositionChangedViaDelegatedScrolling(ScrollingNodeID n
     scrollingTreeNodeDidScroll(nodeID, scrollPosition, inUserInteration ? SyncScrollingLayerPosition : SetScrollingLayerPosition);
 }
 
-void ScrollingTree::commitNewTreeState(std::unique_ptr<ScrollingStateTree> scrollingStateTree)
+void ScrollingTree::commitTreeState(std::unique_ptr<ScrollingStateTree> scrollingStateTree)
 {
     bool rootStateNodeChanged = scrollingStateTree->hasNewRootStateNode();
     
@@ -178,7 +178,7 @@ void ScrollingTree::updateTreeFromStateNode(const ScrollingStateNode* stateNode,
         }
     }
 
-    node->updateBeforeChildren(*stateNode);
+    node->commitStateBeforeChildren(*stateNode);
     
     // Move all children into the orphanNodes map. Live ones will get added back as we recurse over children.
     if (auto nodeChildren = node->children()) {
@@ -195,7 +195,7 @@ void ScrollingTree::updateTreeFromStateNode(const ScrollingStateNode* stateNode,
             updateTreeFromStateNode(child.get(), orphanNodes);
     }
 
-    node->updateAfterChildren(*stateNode);
+    node->commitStateAfterChildren(*stateNode);
 }
 
 void ScrollingTree::removeDestroyedNodes(const ScrollingStateTree& stateTree)
index 34a14f4..ec1adf3 100644 (file)
@@ -68,7 +68,7 @@ public:
     bool isScrollSnapInProgress();
 
     virtual void invalidate() { }
-    WEBCORE_EXPORT virtual void commitNewTreeState(std::unique_ptr<ScrollingStateTree>);
+    WEBCORE_EXPORT virtual void commitTreeState(std::unique_ptr<ScrollingStateTree>);
 
     void setMainFramePinState(bool pinnedToTheLeft, bool pinnedToTheRight, bool pinnedToTheTop, bool pinnedToTheBottom);
 
index ac3dba0..3748246 100644 (file)
@@ -42,9 +42,9 @@ ScrollingTreeFrameScrollingNode::~ScrollingTreeFrameScrollingNode()
 {
 }
 
-void ScrollingTreeFrameScrollingNode::updateBeforeChildren(const ScrollingStateNode& stateNode)
+void ScrollingTreeFrameScrollingNode::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
 {
-    ScrollingTreeScrollingNode::updateBeforeChildren(stateNode);
+    ScrollingTreeScrollingNode::commitStateBeforeChildren(stateNode);
     
     const ScrollingStateFrameScrollingNode& state = downcast<ScrollingStateFrameScrollingNode>(stateNode);
 
index 56e9749..ffeb04f 100644 (file)
@@ -39,7 +39,7 @@ class ScrollingTreeFrameScrollingNode : public ScrollingTreeScrollingNode {
 public:
     virtual ~ScrollingTreeFrameScrollingNode();
 
-    void updateBeforeChildren(const ScrollingStateNode&) override;
+    void commitStateBeforeChildren(const ScrollingStateNode&) override;
     
     // FIXME: We should implement this when we support ScrollingTreeScrollingNodes as children.
     void updateLayersAfterAncestorChange(const ScrollingTreeNode& /*changedNode*/, const FloatRect& /*fixedPositionRect*/, const FloatSize& /*cumulativeDelta*/) override { }
index 7ae5d76..4b8bf33 100644 (file)
@@ -52,8 +52,8 @@ public:
     bool isFrameScrollingNode() const { return nodeType() == FrameScrollingNode; }
     bool isOverflowScrollingNode() const { return nodeType() == OverflowScrollingNode; }
 
-    virtual void updateBeforeChildren(const ScrollingStateNode&) = 0;
-    virtual void updateAfterChildren(const ScrollingStateNode&) { }
+    virtual void commitStateBeforeChildren(const ScrollingStateNode&) = 0;
+    virtual void commitStateAfterChildren(const ScrollingStateNode&) { }
 
     virtual void updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta) = 0;
 
index 8457e19..09c72c6 100644 (file)
@@ -42,7 +42,7 @@ ScrollingTreeScrollingNode::~ScrollingTreeScrollingNode()
 {
 }
 
-void ScrollingTreeScrollingNode::updateBeforeChildren(const ScrollingStateNode& stateNode)
+void ScrollingTreeScrollingNode::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
 {
     const ScrollingStateScrollingNode& state = downcast<ScrollingStateScrollingNode>(stateNode);
 
@@ -85,7 +85,7 @@ void ScrollingTreeScrollingNode::updateBeforeChildren(const ScrollingStateNode&
         m_scrollableAreaParameters = state.scrollableAreaParameters();
 }
 
-void ScrollingTreeScrollingNode::updateAfterChildren(const ScrollingStateNode& stateNode)
+void ScrollingTreeScrollingNode::commitStateAfterChildren(const ScrollingStateNode& stateNode)
 {
     const ScrollingStateScrollingNode& scrollingStateNode = downcast<ScrollingStateScrollingNode>(stateNode);
     if (scrollingStateNode.hasChangedProperty(ScrollingStateScrollingNode::RequestedScrollPosition))
index d7c5023..5774bbe 100644 (file)
@@ -41,8 +41,8 @@ class ScrollingTreeScrollingNode : public ScrollingTreeNode {
 public:
     virtual ~ScrollingTreeScrollingNode();
 
-    WEBCORE_EXPORT void updateBeforeChildren(const ScrollingStateNode&) override;
-    WEBCORE_EXPORT void updateAfterChildren(const ScrollingStateNode&) override;
+    WEBCORE_EXPORT void commitStateBeforeChildren(const ScrollingStateNode&) override;
+    WEBCORE_EXPORT void commitStateAfterChildren(const ScrollingStateNode&) override;
 
     WEBCORE_EXPORT void updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta) override;
 
index 4cd5efe..08cd075 100644 (file)
@@ -86,10 +86,10 @@ void ThreadedScrollingTree::invalidate()
     });
 }
 
-void ThreadedScrollingTree::commitNewTreeState(std::unique_ptr<ScrollingStateTree> scrollingStateTree)
+void ThreadedScrollingTree::commitTreeState(std::unique_ptr<ScrollingStateTree> scrollingStateTree)
 {
     ASSERT(ScrollingThread::isCurrentThread());
-    ScrollingTree::commitNewTreeState(WTFMove(scrollingStateTree));
+    ScrollingTree::commitTreeState(WTFMove(scrollingStateTree));
 }
 
 void ThreadedScrollingTree::scrollingTreeNodeDidScroll(ScrollingNodeID nodeID, const FloatPoint& scrollPosition, SetOrSyncScrollingLayerPosition scrollingLayerPositionAction)
index 56ed0a2..af6de2d 100644 (file)
@@ -43,7 +43,7 @@ class ThreadedScrollingTree : public ScrollingTree {
 public:
     virtual ~ThreadedScrollingTree();
 
-    void commitNewTreeState(std::unique_ptr<ScrollingStateTree>) override;
+    void commitTreeState(std::unique_ptr<ScrollingStateTree>) override;
 
     void handleWheelEvent(const PlatformWheelEvent&) override;
 
index 21a884c..5b58b80 100644 (file)
@@ -43,8 +43,9 @@ protected:
     ScrollingTreeFrameScrollingNodeIOS(ScrollingTree&, ScrollingNodeID);
 
     // ScrollingTreeNode member functions.
-    void updateBeforeChildren(const ScrollingStateNode&) override;
-    void updateAfterChildren(const ScrollingStateNode&) override;
+    void commitStateBeforeChildren(const ScrollingStateNode&) override;
+    void commitStateAfterChildren(const ScrollingStateNode&) override;
+
     void handleWheelEvent(const PlatformWheelEvent&) override { }
 
     FloatPoint scrollPosition() const override;
index 80c2257..30f1476 100644 (file)
@@ -54,9 +54,9 @@ ScrollingTreeFrameScrollingNodeIOS::~ScrollingTreeFrameScrollingNodeIOS()
 {
 }
 
-void ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren(const ScrollingStateNode& stateNode)
+void ScrollingTreeFrameScrollingNodeIOS::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
 {
-    ScrollingTreeFrameScrollingNode::updateBeforeChildren(stateNode);
+    ScrollingTreeFrameScrollingNode::commitStateBeforeChildren(stateNode);
     
     const auto& scrollingStateNode = downcast<ScrollingStateFrameScrollingNode>(stateNode);
 
@@ -86,9 +86,9 @@ void ScrollingTreeFrameScrollingNodeIOS::updateBeforeChildren(const ScrollingSta
     }
 }
 
-void ScrollingTreeFrameScrollingNodeIOS::updateAfterChildren(const ScrollingStateNode& stateNode)
+void ScrollingTreeFrameScrollingNodeIOS::commitStateAfterChildren(const ScrollingStateNode& stateNode)
 {
-    ScrollingTreeFrameScrollingNode::updateAfterChildren(stateNode);
+    ScrollingTreeFrameScrollingNode::commitStateAfterChildren(stateNode);
 
     const auto& scrollingStateNode = downcast<ScrollingStateFrameScrollingNode>(stateNode);
 
index 811c65f..0744a02 100644 (file)
@@ -70,11 +70,6 @@ void ScrollingTreeIOS::invalidate()
     });
 }
 
-void ScrollingTreeIOS::commitNewTreeState(std::unique_ptr<ScrollingStateTree> scrollingStateTree)
-{
-    ScrollingTree::commitNewTreeState(WTFMove(scrollingStateTree));
-}
-
 void ScrollingTreeIOS::scrollingTreeNodeDidScroll(ScrollingNodeID nodeID, const FloatPoint& scrollPosition, SetOrSyncScrollingLayerPosition scrollingLayerPositionAction)
 {
     if (!m_scrollingCoordinator)
index 3705153..02dc62d 100644 (file)
@@ -41,8 +41,6 @@ public:
     static Ref<ScrollingTreeIOS> create(AsyncScrollingCoordinator*);
     virtual ~ScrollingTreeIOS();
 
-    void commitNewTreeState(std::unique_ptr<ScrollingStateTree>) override;
-
     // No wheel events on iOS
     void handleWheelEvent(const PlatformWheelEvent&) override { }
     EventResult tryToHandleWheelEvent(const PlatformWheelEvent&) override { return DidNotHandleEvent; }
index 9475d9d..d43d94b 100644 (file)
@@ -117,7 +117,7 @@ void ScrollingCoordinatorMac::commitTreeState()
 
     ScrollingThread::dispatch([threadedScrollingTree, unprotectedTreeState] {
         std::unique_ptr<ScrollingStateTree> treeState(unprotectedTreeState);
-        threadedScrollingTree->commitNewTreeState(WTFMove(treeState));
+        threadedScrollingTree->commitTreeState(WTFMove(treeState));
     });
 
     updateTiledScrollingIndicator();
index 8299163..cd27725 100644 (file)
@@ -46,7 +46,7 @@ public:
 private:
     ScrollingTreeFixedNode(ScrollingTree&, ScrollingNodeID);
 
-    void updateBeforeChildren(const ScrollingStateNode&) override;
+    void commitStateBeforeChildren(const ScrollingStateNode&) override;
     void updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta) override;
 
     FixedPositionViewportConstraints m_constraints;
index 380ca17..d71c8cd 100644 (file)
@@ -50,7 +50,7 @@ ScrollingTreeFixedNode::~ScrollingTreeFixedNode()
     scrollingTree().fixedOrStickyNodeRemoved();
 }
 
-void ScrollingTreeFixedNode::updateBeforeChildren(const ScrollingStateNode& stateNode)
+void ScrollingTreeFixedNode::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
 {
     const ScrollingStateFixedNode& fixedStateNode = downcast<ScrollingStateFixedNode>(stateNode);
 
index 02da9ca..78d5292 100644 (file)
@@ -47,8 +47,9 @@ private:
     void releaseReferencesToScrollerImpsOnTheMainThread();
 
     // ScrollingTreeNode member functions.
-    void updateBeforeChildren(const ScrollingStateNode&) override;
-    void updateAfterChildren(const ScrollingStateNode&) override;
+    void commitStateBeforeChildren(const ScrollingStateNode&) override;
+    void commitStateAfterChildren(const ScrollingStateNode&) override;
+
     void handleWheelEvent(const PlatformWheelEvent&) override;
 
     // ScrollController member functions.
index 8b3f1cc..4a58020 100644 (file)
@@ -92,9 +92,9 @@ static inline Vector<LayoutUnit> convertToLayoutUnits(const Vector<float>& snapO
 }
 #endif
 
-void ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren(const ScrollingStateNode& stateNode)
+void ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
 {
-    ScrollingTreeFrameScrollingNode::updateBeforeChildren(stateNode);
+    ScrollingTreeFrameScrollingNode::commitStateBeforeChildren(stateNode);
     const auto& scrollingStateNode = downcast<ScrollingStateFrameScrollingNode>(stateNode);
 
     if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::ScrollLayer))
@@ -165,9 +165,9 @@ void ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren(const ScrollingSta
     m_hadFirstUpdate = true;
 }
 
-void ScrollingTreeFrameScrollingNodeMac::updateAfterChildren(const ScrollingStateNode& stateNode)
+void ScrollingTreeFrameScrollingNodeMac::commitStateAfterChildren(const ScrollingStateNode& stateNode)
 {
-    ScrollingTreeFrameScrollingNode::updateAfterChildren(stateNode);
+    ScrollingTreeFrameScrollingNode::commitStateAfterChildren(stateNode);
 
     const auto& scrollingStateNode = downcast<ScrollingStateScrollingNode>(stateNode);
 
index 12edd0b..d6ba50c 100644 (file)
@@ -46,7 +46,7 @@ public:
 private:
     ScrollingTreeStickyNode(ScrollingTree&, ScrollingNodeID);
 
-    void updateBeforeChildren(const ScrollingStateNode&) override;
+    void commitStateBeforeChildren(const ScrollingStateNode&) override;
     void updateLayersAfterAncestorChange(const ScrollingTreeNode& changedNode, const FloatRect& fixedPositionRect, const FloatSize& cumulativeDelta) override;
 
     StickyPositionViewportConstraints m_constraints;
index 72d1f73..d5169f0 100644 (file)
@@ -52,7 +52,7 @@ ScrollingTreeStickyNode::~ScrollingTreeStickyNode()
     scrollingTree().fixedOrStickyNodeRemoved();
 }
 
-void ScrollingTreeStickyNode::updateBeforeChildren(const ScrollingStateNode& stateNode)
+void ScrollingTreeStickyNode::commitStateBeforeChildren(const ScrollingStateNode& stateNode)
 {
     const ScrollingStateStickyNode& stickyStateNode = downcast<ScrollingStateStickyNode>(stateNode);
 
index 1aaffa2..e8d4438 100644 (file)
@@ -1,3 +1,29 @@
+2016-11-04  Simon Fraser  <simon.fraser@apple.com>
+
+        Rename some ScrollingTree/Node-related functions to reduce the number of uses of "update"
+        https://bugs.webkit.org/show_bug.cgi?id=164420
+
+        Reviewed by Tim Horton.
+
+        Rename:
+            commitNewTreeState -> commitTreeState ("new" was redundant)
+            updateBeforeChildren -> commitStateBeforeChildren
+            updateAfterChildren -> commitStateAfterChildren
+
+
+        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
+        (WebKit::RemoteScrollingCoordinatorProxy::commitScrollingTreeState):
+        (WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Deleted.
+        * UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
+        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
+        * UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
+        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren):
+        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren):
+        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren): Deleted.
+        (WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Deleted.
+        * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+        (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
+
 2016-11-04  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         NetworkSession: Add NetworkDataTask implementation for blobs
index 91b646d..930a110 100644 (file)
@@ -76,7 +76,7 @@ const RemoteLayerTreeHost* RemoteScrollingCoordinatorProxy::layerTreeHost() cons
     return &remoteDrawingArea.remoteLayerTreeHost();
 }
 
-void RemoteScrollingCoordinatorProxy::updateScrollingTree(const RemoteScrollingCoordinatorTransaction& transaction, RequestedScrollInfo& requestedScrollInfo)
+void RemoteScrollingCoordinatorProxy::commitScrollingTreeState(const RemoteScrollingCoordinatorTransaction& transaction, RequestedScrollInfo& requestedScrollInfo)
 {
     m_requestedScrollInfo = &requestedScrollInfo;
 
@@ -90,7 +90,7 @@ void RemoteScrollingCoordinatorProxy::updateScrollingTree(const RemoteScrollingC
     }
 
     connectStateNodeLayers(*stateTree, *layerTreeHost);
-    m_scrollingTree->commitNewTreeState(WTFMove(stateTree));
+    m_scrollingTree->commitTreeState(WTFMove(stateTree));
 
     m_requestedScrollInfo = nullptr;
 }
index cf50dd0..62faef9 100644 (file)
@@ -75,7 +75,7 @@ public:
         bool requestIsProgrammaticScroll { };
         WebCore::FloatPoint requestedScrollPosition;
     };
-    void updateScrollingTree(const RemoteScrollingCoordinatorTransaction&, RequestedScrollInfo&);
+    void commitScrollingTreeState(const RemoteScrollingCoordinatorTransaction&, RequestedScrollInfo&);
 
     void setPropagatesMainFrameScrolls(bool propagatesMainFrameScrolls) { m_propagatesMainFrameScrolls = propagatesMainFrameScrolls; }
     bool propagatesMainFrameScrolls() const { return m_propagatesMainFrameScrolls; }
index 6efe165..23a6082 100644 (file)
@@ -52,8 +52,8 @@ public:
 private:
     ScrollingTreeOverflowScrollingNodeIOS(WebCore::ScrollingTree&, WebCore::ScrollingNodeID);
 
-    void updateBeforeChildren(const WebCore::ScrollingStateNode&) override;
-    void updateAfterChildren(const WebCore::ScrollingStateNode&) override;
+    void commitStateBeforeChildren(const WebCore::ScrollingStateNode&) override;
+    void commitStateAfterChildren(const WebCore::ScrollingStateNode&) override;
     
     WebCore::FloatPoint scrollPosition() const override;
 
index e0ac80e..9323fa1 100644 (file)
@@ -154,7 +154,7 @@ ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS()
     END_BLOCK_OBJC_EXCEPTIONS
 }
 
-void ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren(const WebCore::ScrollingStateNode& stateNode)
+void ScrollingTreeOverflowScrollingNodeIOS::commitStateBeforeChildren(const WebCore::ScrollingStateNode& stateNode)
 {
     if (stateNode.hasChangedProperty(ScrollingStateScrollingNode::ScrollLayer)) {
         BEGIN_BLOCK_OBJC_EXCEPTIONS
@@ -165,7 +165,7 @@ void ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren(const WebCore::
         END_BLOCK_OBJC_EXCEPTIONS
     }
 
-    ScrollingTreeOverflowScrollingNode::updateBeforeChildren(stateNode);
+    ScrollingTreeOverflowScrollingNode::commitStateBeforeChildren(stateNode);
 
     const auto& scrollingStateNode = downcast<ScrollingStateOverflowScrollingNode>(stateNode);
     if (scrollingStateNode.hasChangedProperty(ScrollingStateNode::ScrollLayer))
@@ -175,9 +175,9 @@ void ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren(const WebCore::
         m_scrolledContentsLayer = scrollingStateNode.scrolledContentsLayer();
 }
 
-void ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren(const ScrollingStateNode& stateNode)
+void ScrollingTreeOverflowScrollingNodeIOS::commitStateAfterChildren(const ScrollingStateNode& stateNode)
 {
-    ScrollingTreeOverflowScrollingNode::updateAfterChildren(stateNode);
+    ScrollingTreeOverflowScrollingNode::commitStateAfterChildren(stateNode);
 
     TemporaryChange<bool> updatingChange(m_updatingFromStateNode, true);
 
index 9d94cdb..5c108d1 100644 (file)
@@ -193,7 +193,7 @@ void RemoteLayerTreeDrawingAreaProxy::commitLayerTree(const RemoteLayerTreeTrans
 
 #if ENABLE(ASYNC_SCROLLING)
     RemoteScrollingCoordinatorProxy::RequestedScrollInfo requestedScrollInfo;
-    m_webPageProxy.scrollingCoordinatorProxy()->updateScrollingTree(scrollingTreeTransaction, requestedScrollInfo);
+    m_webPageProxy.scrollingCoordinatorProxy()->commitScrollingTreeState(scrollingTreeTransaction, requestedScrollInfo);
 #endif
 
     m_webPageProxy.didCommitLayerTree(layerTreeTransaction);