Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c413077ad66c79d54adcc9996656a3336d46dea7
      
https://github.com/WebKit/WebKit/commit/c413077ad66c79d54adcc9996656a3336d46dea7
  Author: Sergio Villar Senin <[email protected]>
  Date:   2026-01-19 (Mon, 19 Jan 2026)

  Changed paths:
    M Source/WebCore/Modules/webxr/WebXRSession.cpp
    M Source/WebCore/Modules/webxr/WebXRSession.h
    M Source/WebCore/Modules/webxr/WebXRSpace.cpp
    M Source/WebCore/Modules/webxr/WebXRSpace.h

  Log Message:
  -----------
  [WebXR] The viewer space must be a reference space
https://bugs.webkit.org/show_bug.cgi?id=305644

Reviewed by Dan Glastonbury.

The current code defines the viewer space as a XRSpace. However the
specs clearly state that it must be a reference space, see
https://immersive-web.github.io/webxr/#xrsession-viewer-reference-space.

There is no need to create a new class, we can just create a reference
space with viewer type. There are no circular dependencies either
because the space just holds a weak pointer to the session.

No new tests required, there is already coverage for the viewer
reference space, we're just replacing the class that will represent it.

* Source/WebCore/Modules/webxr/WebXRSession.cpp:
(WebCore::WebXRSession::WebXRSession):
* Source/WebCore/Modules/webxr/WebXRSession.h:
* Source/WebCore/Modules/webxr/WebXRSpace.cpp:
(WebCore::WebXRViewerSpace::WebXRViewerSpace): Deleted.
(WebCore::WebXRViewerSpace::nativeOrigin const): Deleted.
* Source/WebCore/Modules/webxr/WebXRSpace.h:
(WebCore::WebXRViewerSpace::create): Deleted.

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



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

Reply via email to