Auto merge of #27429 - asajeffrey:webxr-user-intent-pref, r=Manishearth

Add a pref to indicate user intent to enter webxr

<!-- Please describe your changes on the following line: -->

Add a pref to indicate that the user has indicated intent to enter webxr.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it's a command-line pref

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
bors-servo 2020-07-29 18:25:12 -04:00 committed by GitHub
commit c26a803fee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View file

@ -218,6 +218,7 @@ impl ServoThread {
None => Some(webrender_swap_chain),
Some(..) => {
set_pref!(dom.webxr.sessionavailable, true);
set_pref!(dom.webxr.unsafe_assume_user_intent, true);
servo.handle_events(vec![WindowEvent::ChangeBrowserVisibility(id, false)]);
None
},