Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bd55010ecc7f05c22f0b94a503dd1350b18c8396
      
https://github.com/WebKit/WebKit/commit/bd55010ecc7f05c22f0b94a503dd1350b18c8396
  Author: Ada Chan <adac...@apple.com>
  Date:   2024-01-31 (Wed, 31 Jan 2024)

  Changed paths:
    M Source/WebCore/Modules/webxr/WebXRSystem.cpp
    M Source/WebKit/Shared/XR/XRDeviceProxy.cpp
    M Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp
    M Source/WebKit/UIProcess/XR/PlatformXRSystem.h
    M Source/WebKit/UIProcess/XR/PlatformXRSystem.messages.in
    M Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.cpp
    M Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.h

  Log Message:
  -----------
  [WebXR] Add state checking to WebXR IPC calls
https://bugs.webkit.org/show_bug.cgi?id=268404
rdar://121553978

Reviewed by Dan Glastonbury.

Track internal state in PlatformXRSystem and check that we are
in the expected state when the IPC call is made.

Remove unnecessary parameters in 
PlatformXRSystem::initializeTrackingAndRendering()
as that information can be cached in this class and there's no
need to pass that info over again.

* Source/WebCore/Modules/webxr/WebXRSystem.cpp:
(WebCore::WebXRSystem::resolveFeaturePermissions const):
We should not call into platform code for requesting permissions
for simulated test devices.
* Source/WebKit/Shared/XR/XRDeviceProxy.cpp:
(WebKit::XRDeviceProxy::initializeTrackingAndRendering):
* Source/WebKit/UIProcess/XR/PlatformXRSystem.cpp:
(WebKit::PlatformXRSystem::invalidate):
(WebKit::PlatformXRSystem::ensureImmersiveSessionActivity):
(WebKit::checkFeaturesConsent):
Helper function to check whether all the features in the first
argument are included in the second list of granted features.
(WebKit::PlatformXRSystem::requestPermissionOnSessionFeatures):
For immersive modes, check that we are in the idle state before
requesting permissions via the PlatformXRCoordinator.
When we get the granted permissions back, check whether all the
required features have been granted permission. Update the
immersive session state accordingly based on whether the
session can start.
(WebKit::PlatformXRSystem::initializeTrackingAndRendering):
Remove the parameters and use the cached immersive session
mode and granted features instead.
(WebKit::PlatformXRSystem::shutDownTrackingAndRendering):
(WebKit::PlatformXRSystem::requestFrame):
(WebKit::PlatformXRSystem::submitFrame):
(WebKit::PlatformXRSystem::sessionDidEnd):
(WebKit::PlatformXRSystem::setImmersiveSessionState):
(WebKit::PlatformXRSystem::invalidateImmersiveSessionState):
* Source/WebKit/UIProcess/XR/PlatformXRSystem.h:
* Source/WebKit/UIProcess/XR/PlatformXRSystem.messages.in:
* Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.cpp:
(WebKit::PlatformXRSystemProxy::initializeTrackingAndRendering):
* Source/WebKit/WebProcess/XR/PlatformXRSystemProxy.h:

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


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to