webxr: Add missing IDL members from AR Module (#33007)

* Add missing IDL members from AR module

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* Update test expectations

Signed-off-by: Daniel Adams <msub2official@gmail.com>

* ./mach fmt

Signed-off-by: Daniel Adams <msub2official@gmail.com>

---------

Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
Daniel Adams 2024-08-12 18:28:40 -10:00 committed by GitHub
parent 4744debdfd
commit 0d137d276a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 35 additions and 29 deletions

View file

@ -33,7 +33,8 @@ use crate::dom::bindings::codegen::Bindings::XRRenderStateBinding::{
XRRenderStateInit, XRRenderStateMethods,
};
use crate::dom::bindings::codegen::Bindings::XRSessionBinding::{
XREnvironmentBlendMode, XRFrameRequestCallback, XRSessionMethods, XRVisibilityState,
XREnvironmentBlendMode, XRFrameRequestCallback, XRInteractionMode, XRSessionMethods,
XRVisibilityState,
};
use crate::dom::bindings::codegen::Bindings::XRSystemBinding::XRSessionMode;
use crate::dom::bindings::error::{Error, ErrorResult};
@ -873,6 +874,13 @@ impl XRSessionMethods for XRSession {
p
}
/// <https://www.w3.org/TR/webxr-ar-module-1/#dom-xrsession-interactionmode>
fn InteractionMode(&self) -> XRInteractionMode {
// Until Servo supports WebXR sessions on mobile phones or similar non-XR devices,
// this should always be world space
XRInteractionMode::World_space
}
}
// The pose of an object in native-space. Should never be exposed.