mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
Support profiles
This commit is contained in:
parent
9c34a6585b
commit
e0135fe783
10 changed files with 40 additions and 17 deletions
|
@ -45,7 +45,7 @@ impl XRInputSourceArray {
|
|||
for info in sess.initial_inputs() {
|
||||
// XXXManishearth we should be able to listen for updates
|
||||
// to the input sources
|
||||
let input = XRInputSource::new(&global, &session, *info);
|
||||
let input = XRInputSource::new(&global, &session, info.clone());
|
||||
input_sources.push(Dom::from_ref(&input));
|
||||
}
|
||||
});
|
||||
|
@ -54,11 +54,11 @@ impl XRInputSourceArray {
|
|||
pub fn add_input_source(&self, session: &XRSession, info: InputSource) {
|
||||
let mut input_sources = self.input_sources.borrow_mut();
|
||||
let global = self.global();
|
||||
let input = XRInputSource::new(&global, &session, info);
|
||||
debug_assert!(
|
||||
input_sources.iter().find(|i| i.id() == info.id).is_none(),
|
||||
"Should never add a duplicate input id!"
|
||||
);
|
||||
let input = XRInputSource::new(&global, &session, info);
|
||||
input_sources.push(Dom::from_ref(&input));
|
||||
|
||||
let added = [input];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue