Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fce7a7280e2c1e0812936efc57be17d806d49591
      
https://github.com/WebKit/WebKit/commit/fce7a7280e2c1e0812936efc57be17d806d49591
  Author: Ada Chan <[email protected]>
  Date:   2024-12-19 (Thu, 19 Dec 2024)

  Changed paths:
    M Source/WebCore/Modules/model-element/HTMLModelElement.cpp
    M Source/WebCore/Modules/model-element/HTMLModelElement.h
    M Source/WebCore/Modules/model-element/ModelPlayerClient.h
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/platform/graphics/GraphicsLayer.h
    A Source/WebCore/platform/graphics/ModelContext.cpp
    A Source/WebCore/platform/graphics/ModelContext.h
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
    M Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
    M Source/WebCore/rendering/RenderLayerBacking.cpp
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/SourcesCocoa.txt
    A Source/WebKit/UIProcess/Model/ModelPresentationManagerProxy.h
    A Source/WebKit/UIProcess/Model/ModelPresentationManagerProxy.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h
    M Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm
    M Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/WebPageProxyInternals.h
    A Source/WebKit/UIProcess/ios/WKPageHostedModelView.h
    A Source/WebKit/UIProcess/ios/WKPageHostedModelView.mm
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.h
    M Source/WebKit/UIProcess/ios/fullscreen/WKFullScreenWindowControllerIOS.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Source/WebKit/WebProcess/Model/ios/ARKitInlinePreviewModelPlayerIOS.mm
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.h
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.mm
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.mm
    M 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.h
    M 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm

  Log Message:
  -----------
  Introduce ModelPresentationManagerProxy that manages the remote model views 
on the page
https://bugs.webkit.org/show_bug.cgi?id=284649
rdar://141450845

Reviewed by Simon Fraser.

Add a new ModelPresentationManagerProxy to manage the presentations of remotely
hosted model contents on the page. ModelPresentationManagerProxy has a map of
model layer identifiers to ModelPresentation objects, which contains info
about the model being hosted (ModelContext), the remote view hosting the model 
layer,
and the new WKPageHostedModelView which is a WKCompositingView subclass used
in the layer tree node for the model contents. ModelContext is passed
down with the LayerCreationProperties. When setting up the view for the model
contents layer tree node, instead of creating a new WKUIRemoteView with the
layer hosting context ID, it’ll ask ModelPresentationManagerProxy for the view.

* Source/WebCore/Modules/model-element/HTMLModelElement.cpp:
(WebCore::HTMLModelElement::graphicsLayer const):
(WebCore::HTMLModelElement::layerID const):
Helper method to get the PlatformLayerID of the primary layer of the model
element.
(WebCore::HTMLModelElement::modelContentsLayerID const):
Renamed from platformLayerID() so it's clear which layer it's for.
(WebCore::HTMLModelElement::modelContext const):
(WebCore::HTMLModelElement::platformLayerID): Deleted.
* Source/WebCore/Modules/model-element/HTMLModelElement.h:
* Source/WebCore/Modules/model-element/ModelPlayerClient.h:
* Source/WebCore/Sources.txt
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::setContentsToModelContext):
Make this a method dedicated for setting model contents which takes in
a ModelContext.
(WebCore::GraphicsLayer::setContentsToRemotePlatformContext): Deleted.
* Source/WebCore/platform/graphics/ModelContext.cpp
* Source/WebCore/platform/graphics/ModelContext.h
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createPlatformCALayer):
(WebCore::GraphicsLayerCA::setContentsToModelContext):
(WebCore::GraphicsLayerCA::setContentsToRemotePlatformContext): Deleted.
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h:
* Source/WebCore/platform/mediarecorder/MediaRecorderPrivateEncoder.cpp
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTree.serialization.in:
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h:
Adding ModelContext in the AdditionalData.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::hostingContextID 
const):
Updated to handle the new ModelContext additional data.
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::modelContext 
const):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/Model/ModelPresentationManagerProxy.h: Added.
* Source/WebKit/UIProcess/Model/ModelPresentationManagerProxy.mm: Added.
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.h:
* Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::layerWillBeRemoved):
If the model element's layer is being removed, remove the corresponding
ModelPresentation from ModelPresentationManagerProxy.
* Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::makeNode):
Instead of always creating a new WKUIRemoteView, get the model view from 
ModelPresentationManagerProxy.
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didAttachToRunningProcess):
Set up ModelPresentationManagerProxy.
(WebKit::WebPageProxy::resetState):
Invalidate all model presentations on that page.
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxyInternals.h:
* Source/WebKit/UIProcess/ios/WKPageHostedModelView.h: Copied from 
Source/WebCore/Modules/model-element/ModelPlayerClient.h.
* Source/WebKit/UIProcess/ios/WKPageHostedModelView.mm: Copied from 
Source/WebCore/Modules/model-element/ModelPlayerClient.h.
(-[WKPage:WKPageHostedModelView setRemoteModelView:]):
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::modelPresentationManagerProxy const):
* Source/WebKit/UIProcess/ios/forms/WKFileUploadPanel.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/GraphicsLayerCARemote.mm:
(WebKit::GraphicsLayerCARemote::createPlatformCALayer):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.mm:
(WebKit::PlatformCALayerRemote::create):
* 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.h:
* 
Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::create):
(WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(WebKit::PlatformCALayerRemoteCustom::populateCreationProperties):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::layerDidEnterContext):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to