mirror of
https://github.com/servo/servo.git
synced 2025-06-25 17:44:33 +01:00
Make next_input_id an InputId
This commit is contained in:
parent
77d90d64fc
commit
94e8ce5739
1 changed files with 4 additions and 4 deletions
|
@ -37,7 +37,8 @@ pub struct FakeXRDevice {
|
||||||
reflector: Reflector,
|
reflector: Reflector,
|
||||||
#[ignore_malloc_size_of = "defined in ipc-channel"]
|
#[ignore_malloc_size_of = "defined in ipc-channel"]
|
||||||
sender: IpcSender<MockDeviceMsg>,
|
sender: IpcSender<MockDeviceMsg>,
|
||||||
next_input_id: Cell<u32>,
|
#[ignore_malloc_size_of = "defined in webxr-api"]
|
||||||
|
next_input_id: Cell<InputId>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl FakeXRDevice {
|
impl FakeXRDevice {
|
||||||
|
@ -45,7 +46,7 @@ impl FakeXRDevice {
|
||||||
FakeXRDevice {
|
FakeXRDevice {
|
||||||
reflector: Reflector::new(),
|
reflector: Reflector::new(),
|
||||||
sender,
|
sender,
|
||||||
next_input_id: Cell::new(0),
|
next_input_id: Cell::new(InputId(0)),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -191,8 +192,7 @@ impl FakeXRDeviceMethods for FakeXRDevice {
|
||||||
init: &FakeXRInputSourceInit,
|
init: &FakeXRInputSourceInit,
|
||||||
) -> Fallible<DomRoot<FakeXRInputController>> {
|
) -> Fallible<DomRoot<FakeXRInputController>> {
|
||||||
let id = self.next_input_id.get();
|
let id = self.next_input_id.get();
|
||||||
self.next_input_id.set(id + 1);
|
self.next_input_id.set(InputId(id.0 + 1));
|
||||||
let id = InputId(id);
|
|
||||||
|
|
||||||
let handedness = init.handedness.into();
|
let handedness = init.handedness.into();
|
||||||
let target_ray_mode = init.targetRayMode.into();
|
let target_ray_mode = init.targetRayMode.into();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue