WebXR: experimental DOM Overlay support for immersive-ar mode #19013
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This opt-in mode keeps DOM content visible as a transparent overlay while
in an immersive-ar WebXR session. It is activated by requesting an optional
or required feature on session start:
navigator.xr.requestSession(
'immersive-ar',
{optionalFeatures: ['dom-overlay-for-handheld-ar']});
This functionality is only available if the corresponding feature flag
chrome://flags#webxr-ar-dom-overlay is enabled.
On session start, this fullscreens the <body> element. The application can
use the Fullscreen API to change the visible element. Exiting the session ends
fullscreen mode, and calling document.exitFullscreen() exits the immersive-ar
session if there are no remaining fullscreened elements.
(As of this CL, changing the fullscreen element doesn't fully update layer
visibility, so non-fullscreen content can remain visible unexpectedly.
That's being addressed in a followup.)
Change-Id: I77b767b111436b45e2b584e46a390a68473ab118
Bug: 991747
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1741008
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Reviewed-by: Philip Jägenstedt <foolip@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703074}