Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 13f0a6cbad3d002f1d970cf7cadd1ccdb57a4f1c
https://github.com/WebKit/WebKit/commit/13f0a6cbad3d002f1d970cf7cadd1ccdb57a4f1c
Author: Aleksei Marchenko <[email protected]>
Date: 2026-10-05 (Mon, 05 Oct 2026)
Changed paths:
M LayoutTests/spatial-css/spatial-portal-anchor-resolution-expected.txt
M LayoutTests/spatial-css/spatial-portal-anchor-resolution.html
M Source/WebCore/Modules/model-element/SpatialPortalController.cpp
M Source/WebCore/Modules/model-element/SpatialPortalController.h
Log Message:
-----------
Duplicate anchor-name among <model>s in a spatial portal resolves
unpredictably
https://bugs.webkit.org/show_bug.cgi?id=326025
rdar://188209540
Reviewed by Mike Wyrzykowski.
When several <model>s in a spatial portal declare the same anchor-name,
position-anchor
picked whichever came first in hash order, so the anchor could change between
reloads
or when unrelated models were added.
Anchor names are now collected from the hosted models in tree order, keeping
every
<model> that declares each name rather than only the first one found. Each
position-anchor
resolves to the last <model> as in 2D anchoring.
* LayoutTests/spatial-css/spatial-portal-anchor-resolution-expected.txt:
* LayoutTests/spatial-css/spatial-portal-anchor-resolution.html:
* Source/WebCore/Modules/model-element/SpatialPortalController.cpp:
(WebCore::SpatialPortalController::collectAnchorNames):
(WebCore::SpatialPortalController::anchorNodeForName):
(WebCore::SpatialPortalController::updateAnchors):
(WebCore::SpatialPortalController::collectAnchorNames const): Deleted.
* Source/WebCore/Modules/model-element/SpatialPortalController.h:
Canonical link: https://commits.webkit.org/322709@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications