Commit d1229197 authored by Brandon Jones's avatar Brandon Jones Committed by Commit Bot

Added isFirstPersonObserver to XRView, always false

Was added to the WebXR AR Module recently, primarily to enable better
app behavior with AR headsets. Since we don't support any in Chrome
directly we can always return false.

Original WebXR AR Module intent to ship: https://groups.google.com/a/chromium.org/g/blink-dev/c/BXxS2U5EaN0/m/cSVmzxSmDQAJ

Bug: 1101838
Change-Id: I09e53a38b79424b6eb15f894ef1cce3228f316fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2289055
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
Reviewed-by: default avatarAlexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#788292}
parent a4f6fb03
......@@ -35,6 +35,13 @@ class MODULES_EXPORT XRView final : public ScriptWrappable {
DOMFloat32Array* projectionMatrix() const;
XRRigidTransform* transform() const;
// isFirstPersonObserver is only true for views that composed with a video
// feed that is not directly displayed on the viewer device. Primarily this is
// used for video streams from optically transparent AR headsets. Since Chrome
// does not directly support any such headset at this time we return false
// unconditionally.
bool isFirstPersonObserver() const { return false; }
void Trace(Visitor*) const override;
private:
......
......@@ -17,4 +17,8 @@ enum XREye {
readonly attribute XREye eye;
readonly attribute Float32Array projectionMatrix;
[SameObject] readonly attribute XRRigidTransform transform;
// Added by the AR module.
// https://immersive-web.github.io/webxr-ar-module/
readonly attribute boolean isFirstPersonObserver;
};
This is a testharness.js-based test.
PASS idl_test setup
PASS idl_test validation
PASS Partial interface XRSession: original interface defined
PASS Partial interface XRSession: member names are unique
PASS Partial interface XRSession[2]: original interface defined
PASS Partial interface XRSession[2]: member names are unique
PASS Partial interface XRView: original interface defined
PASS Partial interface XRView: member names are unique
PASS XRSession interface: attribute environmentBlendMode
PASS XRSession interface: attribute interactionMode
PASS XRSession interface: xrSession must inherit property "environmentBlendMode" with the proper type
PASS XRSession interface: xrSession must inherit property "interactionMode" with the proper type
FAIL XRView interface: attribute isFirstPersonObserver assert_true: The prototype object must have a property "isFirstPersonObserver" expected true got false
Harness: the test ran to completion.
......@@ -9248,6 +9248,7 @@ interface XRTransientInputHitTestSource
interface XRView
attribute @@toStringTag
getter eye
getter isFirstPersonObserver
getter projectionMatrix
getter transform
method constructor
......
......@@ -11501,6 +11501,7 @@ interface XRTransientInputHitTestSource
interface XRView
attribute @@toStringTag
getter eye
getter isFirstPersonObserver
getter projectionMatrix
getter transform
method constructor
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment