[webkit-changes] [WebKit/WebKit] 29bbd2: Re-merge 267109 at main

Alex Christensen noreply at github.com
Wed Sep 13 06:19:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 29bbd2e51d5489a3fbc500300a2c5b1e2e20c6d5
      https://github.com/WebKit/WebKit/commit/29bbd2e51d5489a3fbc500300a2c5b1e2e20c6d5
  Author: Alex Christensen <achristensen at apple.com>
  Date:   2023-09-13 (Wed, 13 Sep 2023)

  Changed paths:
    M Source/WebCore/page/scrolling/ScrollingStateNode.cpp
    M Source/WebCore/page/scrolling/ScrollingStateNode.h
    M Source/WebCore/page/scrolling/ScrollingStateTree.cpp
    M Source/WebCore/page/scrolling/ScrollingStateTree.h
    M Source/WebKit/DerivedSources-input.xcfilelist
    M Source/WebKit/DerivedSources.make
    M Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
    M Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h
    A Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.serialization.in
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj

  Log Message:
  -----------
  Re-merge 267109 at main
https://bugs.webkit.org/show_bug.cgi?id=261466
rdar://115368009

Reviewed by Simon Fraser.

Well, he reviewed the original PR and told me in person that attaching the tree after
deserialization was an ok approach.

267109 at main was reverted for good reason.  I introduced using the move constructor to create a
std::unique_ptr<ScrollingStateTree> from a ScrollingStateTree&&, but I didn't update
ScrollingStateNode.m_scrollingStateTree, so it was pointing to freed memory.  This version
updates that pointer and prepares for the next step, when I'll decode the ScrollingStateNodes
without the context of the tree then attach them all to the tree.

* Source/WebCore/page/scrolling/ScrollingStateNode.cpp:
(WebCore::ScrollingStateNode::ScrollingStateNode):
(WebCore::ScrollingStateNode::attachAfterDeserialization):
(WebCore::ScrollingStateNode::setPropertyChanged):
(WebCore::ScrollingStateNode::setPropertyChangesAfterReattach):
* Source/WebCore/page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::scrollingStateTree const):
* Source/WebCore/page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::attachDeserializedNodes):
* Source/WebCore/page/scrolling/ScrollingStateTree.h:
(WebCore::ScrollingStateTree::scrollingNodeAdded):
* Source/WebKit/DerivedSources-input.xcfilelist:
* Source/WebKit/DerivedSources.make:
* Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(encodeNodeAndDescendants):
(ArgumentCoder<WebCore::ScrollingStateTree>::encode):
(ArgumentCoder<WebCore::ScrollingStateTree>::decode):
(WebKit::RemoteScrollingCoordinatorTransaction::RemoteScrollingCoordinatorTransaction):
(WebKit::encodeNodeAndDescendants): Deleted.
(WebKit::RemoteScrollingCoordinatorTransaction::encode const): Deleted.
(WebKit::RemoteScrollingCoordinatorTransaction::decode): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.h:
(WebKit::RemoteScrollingCoordinatorTransaction::scrollingStateTree const):
* Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.serialization.in: Added.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

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




More information about the webkit-changes mailing list