Skip to content
Permalink
Browse files

Make next_input_id an InputId

  • Loading branch information
Manishearth committed Jan 8, 2020
1 parent 77d90d6 commit 94e8ce5739677db8bd4c0ffbe50d035b37fafe51
Showing with 4 additions and 4 deletions.
  1. +4 −4 components/script/dom/fakexrdevice.rs
@@ -37,15 +37,16 @@ pub struct FakeXRDevice {
reflector: Reflector,
#[ignore_malloc_size_of = "defined in ipc-channel"]
sender: IpcSender<MockDeviceMsg>,
next_input_id: Cell<u32>,
#[ignore_malloc_size_of = "defined in webxr-api"]
next_input_id: Cell<InputId>,
}

impl FakeXRDevice {
pub fn new_inherited(sender: IpcSender<MockDeviceMsg>) -> FakeXRDevice {
FakeXRDevice {
reflector: Reflector::new(),
sender,
next_input_id: Cell::new(0),
next_input_id: Cell::new(InputId(0)),
}
}

@@ -191,8 +192,7 @@ impl FakeXRDeviceMethods for FakeXRDevice {
init: &FakeXRInputSourceInit,
) -> Fallible<DomRoot<FakeXRInputController>> {
let id = self.next_input_id.get();
self.next_input_id.set(id + 1);
let id = InputId(id);
self.next_input_id.set(InputId(id.0 + 1));

let handedness = init.handedness.into();
let target_ray_mode = init.targetRayMode.into();

0 comments on commit 94e8ce5

Please sign in to comment.
You can’t perform that action at this time.