aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/script_thread.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-01-04 02:54:16 -0500
committerGitHub <noreply@github.com>2019-01-04 02:54:16 -0500
commitc4a6dcfe4bd5f5613cee3596e68a1eb7a97bd32e (patch)
treeb111aaba4a6168c35a71132254d94f5e4f1ab68e /components/script/script_thread.rs
parentc6f6fb697d09513a51cdba4077c9ea78dba8afa7 (diff)
parente544462b6c4732987c5c8154d4a4e33539e83d13 (diff)
downloadservo-c4a6dcfe4bd5f5613cee3596e68a1eb7a97bd32e.tar.gz
servo-c4a6dcfe4bd5f5613cee3596e68a1eb7a97bd32e.zip
Auto merge of #22528 - Manishearth:webxr, r=jdm,MortimerGoro
Preliminary WebXR support This implements just enough WebXR to display to 3DOF devices in immersive mode only. Couple missing things: - [ ] Handling reference spaces (even if just supporting eye-level spaces) - [x] Spec links - [ ] We enter immersive mode when baseLayer is set, but it seems like we're supposed to do this when requestSession is called (https://github.com/immersive-web/webxr/issues/453) - [ ] VR/XR should block less (https://github.com/servo/servo/issues/22505) - [x] More pref-gating - [x] `views` is a method instead of an attribute because we don't support FrozenArray <s>Once I add spec links and pref gating</s> this can be landed as-is for further experimentation. r? @jdm @MortimerGoro <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22528) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r--components/script/script_thread.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs
index 64cbd0af672..6114e353d97 100644
--- a/components/script/script_thread.rs
+++ b/components/script/script_thread.rs
@@ -24,6 +24,7 @@ use crate::dom::bindings::codegen::Bindings::DocumentBinding::{
DocumentMethods, DocumentReadyState,
};
use crate::dom::bindings::codegen::Bindings::EventBinding::EventInit;
+use crate::dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods;
use crate::dom::bindings::codegen::Bindings::TransitionEventBinding::TransitionEventInit;
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
use crate::dom::bindings::conversions::{
@@ -3320,8 +3321,8 @@ impl ScriptThread {
fn handle_webvr_events(&self, pipeline_id: PipelineId, events: Vec<WebVREvent>) {
let window = self.documents.borrow().find_window(pipeline_id);
if let Some(window) = window {
- let vr = window.Navigator().Vr();
- vr.handle_webvr_events(events);
+ let xr = window.Navigator().Xr();
+ xr.handle_webvr_events(events);
}
}