diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2018-12-19 14:17:14 -0800 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2018-12-19 14:33:54 -0800 |
commit | 376426a9362a43d14d79ce838cf9834698bebe2a (patch) | |
tree | 2f779c066042f27ff3f908a25f613dae85253e4a /components/script/script_thread.rs | |
parent | c553c43ba10e11f3436b2b44566d488f9bbc4e52 (diff) | |
download | servo-376426a9362a43d14d79ce838cf9834698bebe2a.tar.gz servo-376426a9362a43d14d79ce838cf9834698bebe2a.zip |
Move VR interface to XR
The WebVR spec no longer has a navigator.vr, but there is a navigator.XR in the XR spec. Instead of duplicating work I've combined the two.
Diffstat (limited to 'components/script/script_thread.rs')
-rw-r--r-- | components/script/script_thread.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/components/script/script_thread.rs b/components/script/script_thread.rs index 50f6135ff52..2da35702834 100644 --- a/components/script/script_thread.rs +++ b/components/script/script_thread.rs @@ -26,6 +26,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::{ @@ -3278,8 +3279,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); } } |