[webkit-changes] [WebKit/WebKit] 08f814: Prepare RemoteScrollingCoordinatorTransaction piec...

Alex Christensen noreply at github.com
Mon Oct 23 08:45:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 08f8141737e23917c19660c0beaa9ea871e752e0
      https://github.com/WebKit/WebKit/commit/08f8141737e23917c19660c0beaa9ea871e752e0
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-10-23 (Mon, 23 Oct 2023)

  Changed paths:
    M Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateFixedNode.h
    M Source/WebCore/page/scrolling/ScrollingStateFrameHostingNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateFrameHostingNode.h
    M Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h
    M Source/WebCore/page/scrolling/ScrollingStateNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateNode.h
    M Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.h
    M Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h
    M Source/WebCore/page/scrolling/ScrollingStatePositionedNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStatePositionedNode.h
    M Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h
    M Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateStickyNode.h
    M Source/WebCore/page/scrolling/ScrollingStateTree.cpp
    M Source/WebCore/page/scrolling/ScrollingStateTree.h
    M Source/WebCore/page/scrolling/ScrollingTree.cpp
    M Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
    M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm

  Log Message:
  -----------
  Prepare RemoteScrollingCoordinatorTransaction pieces for generated serialization
https://bugs.webkit.org/show_bug.cgi?id=261622
rdar://115573578

Reviewed by Simon Fraser.

This moves the manual C++ serialization code around so that each piece has a symmetric encode
and decode function that only encodes and decodes itself with no additional context.  To do this,
I needed to have the scrolling state nodes deserialize only the values they contain and then
attach to the scrolling state tree after all the nodes are deserialized.

* Source/WebCore/page/scrolling/ScrollingStateFixedNode.cpp:
(WebCore::ScrollingStateFixedNode::create):
(WebCore::ScrollingStateFixedNode::ScrollingStateFixedNode):
* Source/WebCore/page/scrolling/ScrollingStateFixedNode.h:
* Source/WebCore/page/scrolling/ScrollingStateFrameHostingNode.cpp:
(WebCore::ScrollingStateFrameHostingNode::create):
(WebCore::ScrollingStateFrameHostingNode::ScrollingStateFrameHostingNode):
* Source/WebCore/page/scrolling/ScrollingStateFrameHostingNode.h:
* Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::create):
(WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
(WebCore::ScrollingStateFrameScrollingNode::isMainFrame const):
* Source/WebCore/page/scrolling/ScrollingStateFrameScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::ScrollingStateNode):
(WebCore::ScrollingStateNode::attachAfterDeserialization):
(WebCore::ScrollingStateNode::setChildren):
(WebCore::ScrollingStateNode::recurse):
(WebCore::ScrollingStateNode::setLayer):
(WebCore::ScrollingStateNode::parentPointersAreCorrect const):
* Source/WebCore/page/scrolling/ScrollingStateNode.h:
* Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.cpp:
(WebCore::ScrollingStateOverflowScrollProxyNode::create):
(WebCore::ScrollingStateOverflowScrollProxyNode::ScrollingStateOverflowScrollProxyNode):
* Source/WebCore/page/scrolling/ScrollingStateOverflowScrollProxyNode.h:
* Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
(WebCore::ScrollingStateOverflowScrollingNode::create):
(WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
* Source/WebCore/page/scrolling/ScrollingStateOverflowScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingStatePositionedNode.cpp:
(WebCore::ScrollingStatePositionedNode::create):
(WebCore::ScrollingStatePositionedNode::ScrollingStatePositionedNode):
* Source/WebCore/page/scrolling/ScrollingStatePositionedNode.h:
* Source/WebCore/page/scrolling/ScrollingStateScrollingNode.cpp:
(WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
* Source/WebCore/page/scrolling/ScrollingStateScrollingNode.h:
* Source/WebCore/page/scrolling/ScrollingStateStickyNode.cpp:
(WebCore::ScrollingStateStickyNode::create):
(WebCore::ScrollingStateStickyNode::ScrollingStateStickyNode):
* Source/WebCore/page/scrolling/ScrollingStateStickyNode.h:
* Source/WebCore/page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachDeserializedNodes):
(WebCore::ScrollingStateTree::setDeserializedRootStateNode):
(WebCore::ScrollingStateTree::rootStateNode const):
(WebCore::ScrollingStateTree::insertNode):
(WebCore::ScrollingStateTree::clear):
(WebCore::ScrollingStateTree::addNode):
* Source/WebCore/page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::rootStateNode const): Deleted.
* Source/WebCore/page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::commitTreeState):
(WebCore::ScrollingTree::updateTreeFromStateNodeRecursive):
* Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateNode>::encode):
(ArgumentCoder<ScrollingStateNode>::decode):
(encodeNodeShared):
(decodeNodeShared):
(encodeScrollingStateScrollingNodeShared):
(decodeScrollingStateScrollingNodeShared):
(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
(ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
(ArgumentCoder<ScrollingStateFrameHostingNode>::encode):
(ArgumentCoder<ScrollingStateFrameHostingNode>::decode):
(ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
(ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode):
(ArgumentCoder<ScrollingStateOverflowScrollProxyNode>::encode):
(ArgumentCoder<ScrollingStateOverflowScrollProxyNode>::decode):
(ArgumentCoder<ScrollingStateFixedNode>::encode):
(ArgumentCoder<ScrollingStateFixedNode>::decode):
(ArgumentCoder<ScrollingStateStickyNode>::encode):
(ArgumentCoder<ScrollingStateStickyNode>::decode):
(ArgumentCoder<ScrollingStatePositionedNode>::encode):
(ArgumentCoder<ScrollingStatePositionedNode>::decode):
(ArgumentCoder<WebCore::ScrollingStateTree>::encode):
(ArgumentCoder<WebCore::ScrollingStateTree>::decode):
(ArgumentCoder<ScrollingStateScrollingNode>::encode): Deleted.
(ArgumentCoder<ScrollingStateScrollingNode>::decode): Deleted.
(encodeNodeAndDescendants): Deleted.
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxyIOS::connectStateNodeLayers):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm:
(WebKit::RemoteScrollingCoordinatorProxyMac::connectStateNodeLayers):

Canonical link: https://commits.webkit.org/269648@main




More information about the webkit-changes mailing list