Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 114ad783c3f1c5de848c0832c09d7f698c3257c9
https://github.com/WebKit/WebKit/commit/114ad783c3f1c5de848c0832c09d7f698c3257c9
Author: Dan Glastonbury <[email protected]>
Date: 2026-04-14 (Tue, 14 Apr 2026)
Changed paths:
M Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
M Source/WebKit/Shared/WebPreferencesDefaultValues.h
Log Message:
-----------
[WebXR] Don't expose WebXR Layers API on visionOS
https://bugs.webkit.org/show_bug.cgi?id=312323
rdar://174552608
Reviewed by Cameron McCormack.
310069@main enabled WebXRLayersAPIEnabled by default on all platforms with
ENABLE(WEBXR_LAYERS), which includes visionOS. This exposed XRRenderState.layers
and XRWebGLBinding to web content for the first time on visionOS.
Three.js, and frameworks built on it, checks renderState.layers === undefined to
decide whether to use the XRWebGLLayer fallback path or the layers API
path. With layers exposed, three.js takes the layers path, calling
XRWebGLBinding.createProjectionLayer() and getViewSubImage(), which don't work
correctly on visionOS.
Gate WebXRLayersAPIEnabled on USE(OPENXR) so the layers API is only exposed on
ports that implement it (WPE/GTK). This hides XRRenderState.layers,
XRWebGLBinding, and all layer types from visionOS web content, restoring the
pre-a965fc6b218e behavior where three.js uses the XRWebGLLayer path.
* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebKit/Shared/WebPreferencesDefaultValues.h:
Canonical link: https://commits.webkit.org/311263@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications