mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
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.
This commit is contained in:
parent
c553c43ba1
commit
376426a936
6 changed files with 55 additions and 42 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue