DOM Overlay: update API to match current draft spec #20928
Merged
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.
The current draft spec https://immersive-web.github.io/dom-overlays/ has
several API shape changes compared to the currently-implemented
prototype, and this CL updates the implementation to match the new API.
Instead of asking applications to use the Fullscreen API to change
the active DOM overlay element, use a separate initialization dictionary
to configure this at session creation time, and make that unmodifiable
from that point on until the session ends.
Also add a domOverlayState XRSession attribute that shows that the
mode is working (this isn't obvious if it was requested as an optional
feature), and also the type of overlay (screen or floating).
This change is part of a series. The following parts are logically also
part of the API update, but split out to keep the size more manageable.
The next steps include renaming the feature name and implementing the
new event deduplication logic.
Bug: 991747
Change-Id: I032fba53f0180d791b0999ed93393bfb4467b3cd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1974596
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Piotr Bialecki <bialpio@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#731443}