Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 58a1b48dcfe4906635ffeb5acd043d5cbe43bca2
https://github.com/WebKit/WebKit/commit/58a1b48dcfe4906635ffeb5acd043d5cbe43bca2
Author: Ada Chan <[email protected]>
Date: 2025-02-05 (Wed, 05 Feb 2025)
Changed paths:
M Source/WebCore/Modules/model-element/HTMLModelElement.cpp
M Source/WebCore/Modules/model-element/HTMLModelElement.h
M Source/WebCore/Modules/model-element/ModelPlayer.cpp
M Source/WebCore/Modules/model-element/ModelPlayer.h
M Source/WebCore/platform/graphics/ModelContext.cpp
M Source/WebCore/platform/graphics/ModelContext.h
M Source/WebCore/rendering/RenderLayerBacking.cpp
M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h
M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.messages.in
M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/UIProcess/Model/ModelPresentationManagerProxy.mm
M Source/WebKit/UIProcess/ios/WKPageHostedModelView.h
M Source/WebKit/UIProcess/ios/WKPageHostedModelView.mm
M Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.cpp
M Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.h
Log Message:
-----------
[Model Element] Move the portal to the UI process
https://bugs.webkit.org/show_bug.cgi?id=287000
rdar://144069542
Reviewed by Mike Wyrzykowski.
By moving the portal entity and the model container entity to the UI
process, the Model process will need to host just the model entity.
This hierarchy change is needed for fixing the model drag preview
in a future patch, where we can pass the _UIRemoteView hosting just
the model (without the portal) to create a UITargetedDragPreview.
This fix changes WKPageHostedModelView such that its layer is now
the separated layer with an entity that represents the portal.
The container entity in the model process that had clipping
enabled has also been moved to WKPageHostedModelView in the UI
process. The container UIView is a subview of WKPageHostedModelView.
This also means we need to handle updates to the background color
and noportal attribute in WKPageHostedModelView. The ModelContext
has been extended to include the background color, whether portal
should be disabled, and the bounds of the element.
* Source/WebCore/Modules/model-element/HTMLModelElement.cpp:
(WebCore::HTMLModelElement::modelContext const):
Fill in the new data members.
(WebCore::HTMLModelElement::updateHasPortal):
Update the renderer so the WKPageHostedModelView can be updated
with the new noportal attribute value.
(WebCore::HTMLModelElement::applyBackgroundColor): Deleted.
* Source/WebCore/Modules/model-element/HTMLModelElement.h:
* Source/WebCore/Modules/model-element/ModelPlayer.cpp:
(WebCore::ModelPlayer::setBackgroundColor): Deleted.
* Source/WebCore/Modules/model-element/ModelPlayer.h:
* Source/WebCore/platform/graphics/ModelContext.cpp:
(WebCore::ModelContext::create):
(WebCore::ModelContext::ModelContext):
* Source/WebCore/platform/graphics/ModelContext.h:
* Source/WebCore/rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateConfiguration):
Set the current background color on the ModelContext before passing it to
m_graphicsLayer.
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h:
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.messages.in:
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm:
(WebKit::ModelProcessModelPlayerProxy::createLayer):
(WebKit::ModelProcessModelPlayerProxy::didFinishLoading):
Now that the root layer no longer represents the portal, the entity should
have tracked rather than separated state. Remove the clipping component
as that is handled on the UI process side.
(WebKit::ModelProcessModelPlayerProxy::setHasPortal):
(WebKit::ModelProcessModelPlayerProxy::updateBackgroundColor): Deleted.
(WebKit::ModelProcessModelPlayerProxy::updatePortalAndClipping): Deleted.
(WebKit::ModelProcessModelPlayerProxy::setBackgroundColor): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/Model/ModelPresentationManagerProxy.mm:
(WebKit::ModelPresentationManagerProxy::setUpModelView): Update the
WKPageHostedModelView's frame, the latest DisablePortal value, and
the latest background color.
* Source/WebKit/UIProcess/ios/WKPageHostedModelView.h:
* Source/WebKit/UIProcess/ios/WKPageHostedModelView.mm:
(-[WKPageHostedModelView init]):
Set up the root (portal) -> container view/entity hierarchy. Moved
the clipping logic from ModelProcessModelPlayerProxy to here.
(-[WKPageHostedModelView dealloc]): Added cleanup code similar to
75ec68cfc5a707e4ec0d559131519403bd5c744c.
(-[WKPageHostedModelView setRemoteModelView:]): Add the remote model
view as its subview. Update its size.
(-[WKPageHostedModelView setShouldDisablePortal:]):
Update a couple of separatedOptions flags related to clipping when
the _shouldDisablePortal changes.
(-[WKPageHostedModelView applyBackgroundColor:]):
* Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.cpp:
(WebKit::ModelProcessModelPlayer::setBackgroundColor): Deleted.
* Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.h:
Canonical link: https://commits.webkit.org/289893@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