aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/xrsession.rs
diff options
context:
space:
mode:
authorDaniel Adams <70986246+msub2@users.noreply.github.com>2024-08-12 18:28:40 -1000
committerGitHub <noreply@github.com>2024-08-13 04:28:40 +0000
commit0d137d276a3a2ad3749750c0e34ebbfd91511106 (patch)
tree7ecbd3c11aeee40a5a5a7d02a735f4efab265060 /components/script/dom/xrsession.rs
parent4744debdfd5e829c753c46a7f8088576b79dbd96 (diff)
downloadservo-0d137d276a3a2ad3749750c0e34ebbfd91511106.tar.gz
servo-0d137d276a3a2ad3749750c0e34ebbfd91511106.zip
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>
Diffstat (limited to 'components/script/dom/xrsession.rs')
-rw-r--r--components/script/dom/xrsession.rs10
1 files changed, 9 insertions, 1 deletions
diff --git a/components/script/dom/xrsession.rs b/components/script/dom/xrsession.rs
index 2b189002a80..9b42c146a0f 100644
--- a/components/script/dom/xrsession.rs
+++ b/components/script/dom/xrsession.rs
@@ -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.