Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a44f41de3de304ea7bedde7a43d1fb93a240b4e1
https://github.com/WebKit/WebKit/commit/a44f41de3de304ea7bedde7a43d1fb93a240b4e1
Author: Aleksei Marchenko <[email protected]>
Date: 2026-09-30 (Wed, 30 Sep 2026)
Changed paths:
M LayoutTests/spatial-css/resources/spatial-portal-utils.js
M LayoutTests/spatial-css/spatial-portal-anchor-resolution.html
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/Modules/model-element/SpatialPortalController.cpp
M Source/WebCore/Modules/model-element/SpatialPortalController.h
M Source/WebCore/testing/Internals.cpp
M Source/WebCore/testing/Internals.h
M Source/WebCore/testing/Internals.idl
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/Scripts/webkit/messages.py
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.cpp
M Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.h
Log Message:
-----------
Dump the RealityKit scene graph of a <model> in LayoutTests
https://bugs.webkit.org/show_bug.cgi?id=325595
rdar://182324109
Reviewed by Etienne Segonzac.
Add internals.modelSceneGraphAsText so tests can check the
entities the Model process builds, not just what WebCore resolved.
WebCore labels each model (#id, or model[N] by tree position) and sends the
labels over a
test-only IPC message. The Model process walks the entities and prints them as
text.
- The call settles first: WebCore updates style and applies pending anchors,
and the Model
process lays out the model's layer, so the dump reflects the latest state
without polling.
The environment map is still applied asynchronously.
- Labels come from WebCore so every <model> pipeline can share them. All model
root entities
have the same name, so they need labels.
- Asset entities are printed only on the way to a WebKit entity, such as an
anchor placement,
unless includeAssetEntities is set.
- Model roots are sorted into tree order, because RealityKit's child order
depends on load timing.
- Transforms are rounded and the quaternion sign is normalized, so dumps are
stable.
* LayoutTests/spatial-css/resources/spatial-portal-utils.js:
* LayoutTests/spatial-css/spatial-portal-anchor-resolution.html:
* Source/WebCore/Modules/model-element/HTMLModelElement.cpp:
(WebCore::HTMLModelElement::sceneGraphAsTextForTesting const):
(WebCore::HTMLModelElement::dumpLabelForTesting const):
* Source/WebCore/Modules/model-element/HTMLModelElement.h:
* Source/WebCore/Modules/model-element/ModelPlayer.cpp:
(WebCore::ModelPlayer::sceneGraphAsTextForTesting):
* Source/WebCore/Modules/model-element/ModelPlayer.h:
* Source/WebCore/Modules/model-element/SpatialPortalController.cpp:
(WebCore::SpatialPortalController::hostedModelsInTreeOrder const):
(WebCore::SpatialPortalController::sceneGraphAsTextForTesting):
* Source/WebCore/Modules/model-element/SpatialPortalController.h:
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::isModelElementIntersectingViewport):
(WebCore::Internals::modelSceneGraphAsText):
* Source/WebCore/testing/Internals.h:
* Source/WebCore/testing/Internals.idl:
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h:
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.messages.in:
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm:
(WebKit::roundedForSceneGraph):
(WebKit::sceneGraphNumbers):
(WebKit::dumpSceneGraphTransform):
(WebKit::collectEntitiesWithWebKitDescendants):
(WebKit::dumpSceneGraphEntity):
(WebKit::ModelProcessModelPlayerProxy::sceneGraphAsTextForTesting):
* Source/WebKit/Scripts/webkit/messages.py:
(headers_for_type):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.cpp:
(WebKit::ModelProcessModelPlayer::sceneGraphAsTextForTesting):
* Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.h:
Canonical link: https://commits.webkit.org/322288@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications