Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 647e75bd9c975f8ddf5f69179efc08a52727f141
      
https://github.com/WebKit/WebKit/commit/647e75bd9c975f8ddf5f69179efc08a52727f141
  Author: Yoel Hawa <[email protected]>
  Date:   2026-10-10 (Sat, 10 Oct 2026)

  Changed paths:
    M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h
    M Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm
    M Source/WebKit/Platform/spi/ios/UIKitSPI.h
    M Source/WebKit/UIProcess/Cocoa/WKPortalVolumetricGestureController.h
    M Source/WebKit/UIProcess/Cocoa/WKPortalVolumetricGestureController.swift
    M Source/WebKit/UIProcess/Model/PortalPresentationManagerProxy.h
    M Source/WebKit/UIProcess/Model/PortalPresentationManagerProxy.mm
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/WebPageProxy.messages.in
    M Source/WebKit/UIProcess/ios/WKPortalVolumetricSceneController.h
    M Source/WebKit/UIProcess/ios/WKPortalVolumetricSceneController.mm
    M Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm
    M Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.cpp
    M Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.h
    M Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.messages.in
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h

  Log Message:
  -----------
  [visionOS] Shrink input hit-test volume for orbit in connected volumetric 
scenes
https://bugs.webkit.org/show_bug.cgi?id=326794
<rdar://189229747>

Reviewed by Mike Wyrzykowski and Etienne Segonzac.

The entity that captures drags in a connected volumetric scene fills the
whole volume, so it consumes taps meant for windows behind the volume,
even where no content is in front of them.

Fit it to the content's bounding sphere instead. Whenever the model process
fits the content to the volume, it sends the sphere through the web process
to the UI process, which places the entity there. Orbiting only rotates the
content within that sphere, so nothing needs to be sent while it moves, and
a refit that leaves the sphere unchanged sends nothing either.

The entity is positioned relative to the RealityView's root, which settles
at the center of the volume's depth after the view renders and moves as the
volume resizes. The content is placed at the same point, so the entity
stays on it.

Drive-by fixes:
- Place the content at the center of the volume's depth, read from the
  scene, instead of estimating the depth from the volume's smaller in-plane
  extent.
- Clip the volume to its bounds, keeping both content and input inside it.

* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.h:
* Source/WebKit/ModelProcess/cocoa/ModelProcessModelPlayerProxy.mm:
(WebKit::ModelProcessModelPlayerProxy::applyVolumetricPresentationTransform):
Send the fitted content's bounding sphere when it changes.
(WebKit::ModelProcessModelPlayerProxy::exitVolumetricPresentation):
Forget the last sphere sent, so a reopened volume gets one.

* Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.cpp:
(WebKit::ModelProcessModelPlayer::didUpdateVolumetricHitSphere):
* Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.h:
* Source/WebKit/WebProcess/Model/ModelProcessModelPlayer.messages.in:
* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updateVolumetricSceneHitSphere):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/WebPageProxy.messages.in:
* Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVolumetricSceneHitSphere):
* Source/WebKit/UIProcess/Model/PortalPresentationManagerProxy.h:
* Source/WebKit/UIProcess/Model/PortalPresentationManagerProxy.mm:
(WebKit::PortalPresentationManagerProxy::updateVolumetricSceneHitSphere):
Relay the sphere to the volume's scene.

* Source/WebKit/Platform/spi/ios/UIKitSPI.h:
Declare the scene's 3D size and the RealityKit clip.

* Source/WebKit/UIProcess/ios/WKPortalVolumetricSceneController.h:
* Source/WebKit/UIProcess/ios/WKPortalVolumetricSceneController.mm:
(-[WKPortalVolumetricSceneController _applyContentPlacement]):
Center the content in the volume's depth.
(-[WKPortalVolumetricSceneController setHitSphereCenter:radius:]):
(-[WKPortalVolumetricSceneController _applyInputSurfaceHitSphere]):
(-[WKPortalVolumetricSceneController 
installInputSurfaceWithBegan:changed:ended:]):
(-[WKPortalVolumetricSceneController updateLayoutForVolumeSize]):
(-[WKPortalVolumetricSceneController hostContentWithContext:pid:]):
(-[WKPortalVolumetricSceneController _applyInputSurfaceExtents]): Deleted.
Hand the sphere to the input surface, whether it arrives before or after
the surface is installed.
(-[WKPortalVolumetricSceneController _configureWithScene:]):
Clip the volume to its bounds.

* Source/WebKit/UIProcess/Cocoa/WKPortalVolumetricGestureController.h:
* Source/WebKit/UIProcess/Cocoa/WKPortalVolumetricGestureController.swift:
(WKPortalVolumetricGestureController.setHitSphereCenter(_:radius:)):
(WKPortalVolumetricGestureController.updateProxyExtents(withWidth:height:depth:)):
 Deleted.
Make the collision shape the sphere, positioned relative to the content root.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to