[webkit-changes] [WebKit/WebKit] 48aa61: [Site Isolation] Properly create scrolling tree fo...

Nikos Mouchtaris noreply at github.com
Thu May 9 15:27:23 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 48aa61d62068efcceb7aebce99d86384e5d2f0f0
      https://github.com/WebKit/WebKit/commit/48aa61d62068efcceb7aebce99d86384e5d2f0f0
  Author: Nikolaos Mouchtaris <nmouchtaris at apple.com>
  Date:   2024-05-09 (Thu, 09 May 2024)

  Changed paths:
    M LayoutTests/http/tests/site-isolation/scrolling/basic-scrolling-tree.html
    A LayoutTests/http/tests/site-isolation/scrolling/multiple-root-frames-expected.txt
    A LayoutTests/http/tests/site-isolation/scrolling/multiple-root-frames.html
    A LayoutTests/http/tests/site-isolation/scrolling/remove-root-frame-expected.txt
    A LayoutTests/http/tests/site-isolation/scrolling/remove-root-frame.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WTF/WTF.xcodeproj/project.pbxproj
    M Source/WTF/wtf/CMakeLists.txt
    A Source/WTF/wtf/SmallMap.h
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/page/LocalFrame.cpp
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/page/LocalFrameView.h
    M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp
    M Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h
    M Source/WebCore/page/scrolling/ScrollingCoordinator.h
    M Source/WebCore/page/scrolling/ScrollingStateTree.h
    M Source/WebCore/page/scrolling/ScrollingTree.cpp
    M Source/WebCore/page/scrolling/ScrollingTree.h
    M Source/WebCore/page/scrolling/ScrollingTreeFrameHostingNode.cpp
    M Source/WebCore/page/scrolling/ScrollingTreeFrameHostingNode.h
    M Source/WebCore/page/scrolling/ThreadedScrollingCoordinator.cpp
    M Source/WebCore/platform/ScrollableArea.h
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderLayerScrollableArea.cpp
    M Source/WebCore/rendering/RenderLayerScrollableArea.h
    M Source/WebCore/rendering/RenderListBox.cpp
    M Source/WebCore/rendering/RenderListBox.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm
    M Tools/TestWebKitAPI/Tests/WTF/SmallSet.cpp

  Log Message:
  -----------
  [Site Isolation] Properly create scrolling tree for web process with multiple root frames
https://bugs.webkit.org/show_bug.cgi?id=272721
rdar://126001790

Reviewed by Simon Fraser.

Adjust AsyncScrollingCoordinator to hold a scrolling state tree per root frame.
Also thanks to Alex who helped take this pr over the finishing line.

* LayoutTests/http/tests/site-isolation/scrolling/basic-scrolling-tree.html:
* LayoutTests/http/tests/site-isolation/scrolling/multiple-root-frames-expected.txt: Added.
* LayoutTests/http/tests/site-isolation/scrolling/multiple-root-frames.html: Copied from LayoutTests/http/tests/site-isolation/scrolling/basic-scrolling-tree.html.
* LayoutTests/http/tests/site-isolation/scrolling/remove-root-frame-expected.txt: Added.
* LayoutTests/http/tests/site-isolation/scrolling/remove-root-frame.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* Source/WTF/WTF.xcodeproj/project.pbxproj:
* Source/WTF/wtf/CMakeLists.txt:
* Source/WTF/wtf/SmallMap.h: Added.
(WTF::SmallMap::ensure):
(WTF::SmallMap::remove):
(WTF::SmallMap::get const):
(WTF::SmallMap::forEach const):
(WTF::SmallMap::size const):
(WTF::SmallMap::rawStorage const):
* Source/WebCore/dom/Document.cpp:
(WebCore::Document::setBackForwardCacheState):
* Source/WebCore/page/LocalFrame.cpp:
(WebCore::LocalFrame::~LocalFrame):
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::rootFrameID const):
* Source/WebCore/page/LocalFrameView.h:
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::AsyncScrollingCoordinator):
(WebCore::AsyncScrollingCoordinator::stateNodeForNodeID const):
(WebCore::AsyncScrollingCoordinator::stateNodeForScrollableArea const):
(WebCore::AsyncScrollingCoordinator::ensureScrollingStateTreeForRootFrameID):
(WebCore::AsyncScrollingCoordinator::existingScrollingStateTreeForRootFrameID const):
(WebCore::AsyncScrollingCoordinator::rootFrameWasRemoved):
(WebCore::AsyncScrollingCoordinator::stateTreeForNodeID const):
(WebCore::AsyncScrollingCoordinator::willCommitTree):
(WebCore::AsyncScrollingCoordinator::updateEventTrackingRegions):
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
(WebCore::AsyncScrollingCoordinator::frameViewEventTrackingRegionsChanged):
(WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode const):
(WebCore::AsyncScrollingCoordinator::createNode):
(WebCore::AsyncScrollingCoordinator::insertNode):
(WebCore::AsyncScrollingCoordinator::unparentNode):
(WebCore::AsyncScrollingCoordinator::unparentChildrenAndDestroyNode):
(WebCore::AsyncScrollingCoordinator::detachAndDestroySubtree):
(WebCore::AsyncScrollingCoordinator::clearAllNodes):
(WebCore::AsyncScrollingCoordinator::reconcileViewportConstrainedLayerPositions):
(WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
(WebCore::AsyncScrollingCoordinator::hasSubscrollers const):
(WebCore::AsyncScrollingCoordinator::scrollingStateTreeAsText const):
(WebCore::AsyncScrollingCoordinator::commitTreeStateForRootFrameID):
* Source/WebCore/page/scrolling/AsyncScrollingCoordinator.h:
(WebCore::AsyncScrollingCoordinator::scrollingStateTrees const):
(WebCore::AsyncScrollingCoordinator::scrollingStateTree): Deleted.
* Source/WebCore/page/scrolling/ScrollingCoordinator.h:
(WebCore::ScrollingCoordinator::rootFrameWasRemoved):
(WebCore::ScrollingCoordinator::createNode):
(WebCore::ScrollingCoordinator::insertNode):
(WebCore::ScrollingCoordinator::clearAllNodes):
(WebCore::ScrollingCoordinator::hasSubscrollers const):
(WebCore::ScrollingCoordinator::willCommitTree):
* Source/WebCore/page/scrolling/ScrollingStateTree.h:
* Source/WebCore/page/scrolling/ScrollingTree.cpp:
(WebCore::ScrollingTree::removeNode):
(WebCore::ScrollingTree::commitTreeStateInternal):
* Source/WebCore/page/scrolling/ScrollingTree.h:
* Source/WebCore/page/scrolling/ScrollingTreeFrameHostingNode.cpp:
(WebCore::ScrollingTreeFrameHostingNode::removeHostedChild):
* Source/WebCore/page/scrolling/ScrollingTreeFrameHostingNode.h:
* Source/WebCore/page/scrolling/ThreadedScrollingCoordinator.cpp:
(WebCore::ThreadedScrollingCoordinator::commitTreeStateIfNeeded):
* Source/WebCore/platform/ScrollableArea.h:
(WebCore::ScrollableArea::rootFrameID const):
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::maintainsEventRegion const):
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::updateCompositingLayers):
(WebCore::RenderLayerCompositor::attachWidgetContentLayersIfNecessary):
(WebCore::RenderLayerCompositor::registerScrollingNodeID):
* Source/WebCore/rendering/RenderLayerScrollableArea.cpp:
(WebCore::RenderLayerScrollableArea::rootFrameID const):
* Source/WebCore/rendering/RenderLayerScrollableArea.h:
* Source/WebCore/rendering/RenderListBox.cpp:
(WebCore::RenderListBox::rootFrameID const):
* Source/WebCore/rendering/RenderListBox.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTreeTransaction):
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm:
(WebKit::PDFPluginBase::rootFrameID const):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::createScrollingNodeIfNecessary):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updateRendering):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::buildTransaction):
* Tools/TestWebKitAPI/Tests/WTF/SmallSet.cpp:
(TestWebKitAPI::TEST(WTF_SmallMap, Basic)):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list