Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 34b37bd8fc5607f6eb809a7fc0ee4a5edd83a688
      
https://github.com/WebKit/WebKit/commit/34b37bd8fc5607f6eb809a7fc0ee4a5edd83a688
  Author: Tim Horton <thor...@apple.com>
  Date:   2023-11-17 (Fri, 17 Nov 2023)

  Changed paths:
    A 
LayoutTests/compositing/plugins/pdf/pdf-scrolling-tree-dynamic-expected.txt
    A LayoutTests/compositing/plugins/pdf/pdf-scrolling-tree-dynamic.html
    A LayoutTests/compositing/plugins/pdf/pdf-scrolling-tree-expected.txt
    A LayoutTests/compositing/plugins/pdf/pdf-scrolling-tree.html
    M Source/WebCore/Sources.txt
    M Source/WebCore/SourcesCocoa.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/page/LocalFrameView.cpp
    M Source/WebCore/page/LocalFrameView.h
    M Source/WebCore/page/scrolling/ScrollingCoordinator.h
    M Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.cpp
    M Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h
    M Source/WebCore/page/scrolling/ScrollingStateNode.h
    A Source/WebCore/page/scrolling/ScrollingStatePluginHostingNode.cpp
    A Source/WebCore/page/scrolling/ScrollingStatePluginHostingNode.h
    A Source/WebCore/page/scrolling/ScrollingStatePluginScrollingNode.cpp
    A Source/WebCore/page/scrolling/ScrollingStatePluginScrollingNode.h
    M Source/WebCore/page/scrolling/ScrollingStateTree.cpp
    M Source/WebCore/page/scrolling/ScrollingTreeNode.h
    A Source/WebCore/page/scrolling/ScrollingTreePluginHostingNode.cpp
    A Source/WebCore/page/scrolling/ScrollingTreePluginHostingNode.h
    A Source/WebCore/page/scrolling/ScrollingTreePluginScrollingNode.cpp
    A Source/WebCore/page/scrolling/ScrollingTreePluginScrollingNode.h
    M Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm
    A Source/WebCore/page/scrolling/mac/ScrollingTreePluginScrollingNodeMac.h
    A Source/WebCore/page/scrolling/mac/ScrollingTreePluginScrollingNodeMac.mm
    M Source/WebCore/page/scrolling/nicosia/ScrollingTreeNicosia.cpp
    M Source/WebCore/plugins/PluginViewBase.h
    M Source/WebCore/rendering/EventRegion.h
    M Source/WebCore/rendering/RenderEmbeddedObject.cpp
    M Source/WebCore/rendering/RenderEmbeddedObject.h
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayer.h
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebCore/rendering/RenderLayerBacking.h
    M Source/WebCore/rendering/RenderLayerCompositor.cpp
    M Source/WebCore/rendering/RenderLayerCompositor.h
    M 
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp
    M 
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.serialization.in
    M Source/WebKit/SourcesCocoa.txt
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp
    M 
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingTreeIOS.cpp
    A 
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreePluginScrollingNodeIOS.h
    A 
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreePluginScrollingNodeIOS.mm
    M 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm
    A 
Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreePluginScrollingNodeRemoteMac.cpp
    A 
Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreePluginScrollingNodeRemoteMac.h
    M Source/WebKit/UIProcess/ios/WKExtendedTextInputTraits.mm
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h
    M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
    M Source/WebKit/WebProcess/Plugins/PluginView.cpp
    M Source/WebKit/WebProcess/Plugins/PluginView.h

  Log Message:
  -----------
  [UnifiedPDF] Use the scrolling tree for UnifiedPDFPlugin
https://bugs.webkit.org/show_bug.cgi?id=265007
rdar://118154855

Reviewed by Simon Fraser.

Adopt async scrolling for Unified PDF plugin, improving scrolling performance,
getting scrolling working for the first time on iOS, and paving the way towards
UI-side scrollbars on macOS.

* Source/WebCore/Sources.txt:
* Source/WebCore/SourcesCocoa.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::scrollableAreaForScrollingNodeID const):
* Source/WebCore/page/LocalFrameView.h:
Make it possible to install a non-RenderLayer-owned ScrollableArea as associated
with a ScrollingNodeID.

* Source/WebCore/plugins/PluginViewBase.h:
(WebCore::PluginViewBase::usesAsyncScrolling):
(WebCore::PluginViewBase::scrollingNodeID):
* Source/WebCore/rendering/RenderEmbeddedObject.cpp:
(WebCore::RenderEmbeddedObject::usesAsyncScrolling):
(WebCore::RenderEmbeddedObject::scrollingNodeID):
* Source/WebCore/rendering/RenderEmbeddedObject.h:
* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::usesAsyncScrolling):
(WebKit::PluginView::scrollingNodeID):
* Source/WebKit/WebProcess/Plugins/PluginView.h:
Make it possible to ask a plugin if it wants to host a coordinated scroller,
and to retrieve the scroller's ScrollingNodeID.

* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::attachWidgetContentLayers):
Connect the plugin scrolling node as a child of the plugin hosting node.

(WebCore::RenderLayerCompositor::isLayerForPluginWithScrollCoordinatedContents 
const):
(WebCore::scrollCoordinationRoleForNodeType):
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
(WebCore::RenderLayerCompositor::coordinatedScrollingRolesForLayer const):
(WebCore::RenderLayerCompositor::updateScrollCoordinationForLayer):
(WebCore::RenderLayerCompositor::updateScrollingNodeForPluginHostingRole):
Create a plugin hosting node if the plugin wants to host a coordinated scroller.

(WebCore::RenderLayerCompositor::updateScrollingNodeLayers):
(WebCore::RenderLayerCompositor::updateScrollingNodeForScrollingRole):
Avoid some irrelevant work which would stomp UnifiedPDFPlugin's scrolling node 
layers and geometry.

* Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
(WebKit::PDFPluginBase::wantsWheelEvents const): Deleted.
De-hoist wantsWheelEvents, since we don't want them in UnifiedPDFPlugin anymore.

* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.mm:
(WebKit::PDFPluginBase::PDFPluginBase):
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.h:
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::UnifiedPDFPlugin):
Turn on rubber-banding.

(WebKit::UnifiedPDFPlugin::teardown):
(WebKit::UnifiedPDFPlugin::updateLayerHierarchy):
Create a plugin scrolling node, which RenderLayerCompositor will plug into the 
hosting node.

(WebKit::UnifiedPDFPlugin::didChangeSettings):
(WebKit::UnifiedPDFPlugin::didChangeScrollOffset):
Use boundsOrigin instead of position to scroll, matching what the UI-side 
scrolling code will do.

(WebKit::UnifiedPDFPlugin::updateScrollbars):
Push plugin geometry changes down to both the scrolling tree and event regions.

(WebKit::UnifiedPDFPlugin::handleWheelEvent): Deleted.

* Source/WebCore/page/scrolling/ScrollingStatePluginHostingNode.cpp: Added.
* Source/WebCore/page/scrolling/ScrollingStatePluginHostingNode.h: Added.
* Source/WebCore/page/scrolling/ScrollingStatePluginScrollingNode.cpp: Added.
* Source/WebCore/page/scrolling/ScrollingStatePluginScrollingNode.h: Added.
* Source/WebCore/page/scrolling/ScrollingTreePluginHostingNode.cpp: Added.
* Source/WebCore/page/scrolling/ScrollingTreePluginHostingNode.h: Added.
* Source/WebCore/page/scrolling/ScrollingTreePluginScrollingNode.cpp: Added.
* Source/WebCore/page/scrolling/ScrollingTreePluginScrollingNode.h: Added.
* Source/WebCore/page/scrolling/mac/ScrollingTreePluginScrollingNodeMac.h: 
Added.
* Source/WebCore/page/scrolling/mac/ScrollingTreePluginScrollingNodeMac.mm: 
Added.
* 
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreePluginScrollingNodeIOS.h:
 Added.
* 
Source/WebKit/UIProcess/RemoteLayerTree/ios/ScrollingTreePluginScrollingNodeIOS.mm:
 Added.
* 
Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreePluginScrollingNodeRemoteMac.cpp:
 Added.
* 
Source/WebKit/UIProcess/RemoteLayerTree/mac/ScrollingTreePluginScrollingNodeRemoteMac.h:
 Added.
Add plugin-scrolling-specific scrolling tree nodes.

* Source/WebCore/page/scrolling/ScrollingCoordinator.h:
* Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.cpp:
(WebCore::operator<<):
* Source/WebCore/page/scrolling/ScrollingCoordinatorTypes.h:
* Source/WebCore/page/scrolling/ScrollingStateNode.h:
(WebCore::ScrollingStateNode::isScrollingNode const):
(WebCore::ScrollingStateNode::isPluginScrollingNode const):
(WebCore::ScrollingStateNode::isPluginHostingNode const):
* Source/WebCore/page/scrolling/ScrollingStateTree.cpp:
(WebCore::ScrollingStateTree::createNode):
(WebCore::ScrollingStateTree::isValid const):
* Source/WebCore/page/scrolling/ScrollingTreeNode.h:
(WebCore::ScrollingTreeNode::isScrollingNode const):
(WebCore::ScrollingTreeNode::isPluginScrollingNode const):
(WebCore::ScrollingTreeNode::isPluginHostingNode const):
* Source/WebCore/page/scrolling/mac/ScrollingTreeMac.mm:
(ScrollingTreeMac::createScrollingTreeNode):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::outputPaintOrderTreeRecursive):
* Source/WebCore/rendering/RenderLayer.h:
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::~RenderLayerBacking):
(WebCore::RenderLayerBacking::detachFromScrollingCoordinator):
(WebCore::RenderLayerBacking::setScrollingNodeIDForRole):
(WebCore::operator<<):
* Source/WebCore/rendering/RenderLayerBacking.h:
* Source/WebCore/rendering/RenderLayerCompositor.h:
(WebCore::allScrollCoordinationRoles):
* 
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::dump):
* 
Source/WebKit/Shared/RemoteLayerTree/RemoteScrollingCoordinatorTransaction.serialization.in:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode):
* 
Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxyIOS::scrollViewForScrollingNodeID 
const):
(WebKit::RemoteScrollingCoordinatorProxyIOS::connectStateNodeLayers):
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteScrollingTreeIOS.cpp:
(WebKit::RemoteScrollingTreeIOS::createScrollingTreeNode):
* 
Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingCoordinatorProxyMac.mm:
(WebKit::RemoteScrollingCoordinatorProxyMac::connectStateNodeLayers):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteScrollingTreeMac.mm:
(WebKit::RemoteScrollingTreeMac::createScrollingTreeNode):
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
Plumbing for plugin-scrolling-specific scrolling tree nodes.

* Source/WebCore/rendering/EventRegion.h:
Extra exports!

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to