Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a pref to indicate user intent to enter webxr #27429

Merged
merged 2 commits into from Jul 29, 2020

Conversation

@asajeffrey
Copy link
Member

asajeffrey commented Jul 28, 2020

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


  • ./mach build -d does not report any errors
  • ./mach test-tidy does not report any errors
  • These changes do not require tests because it's a command-line pref
@highfive
Copy link

highfive commented Jul 28, 2020

Heads up! This PR modifies the following files:

  • @KiChjang: components/script/dom/xrsystem.rs
@highfive
Copy link

highfive commented Jul 28, 2020

warning Warning warning

  • These commits modify script code, but no tests are modified. Please consider adding a test!
@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 28, 2020

This needs thought about a bit, because it's switching off a security feature. It's needed for scenarios where we're launching straight into webxr, for example from the gstreamer plugin, which has no 2d view. With this pref we can enter hubs using

./mach run -r "https://hubs.mozilla.com/$ROOM_ID?no_force_webvr&vr_entry_type=vr_now" --pref dom.gamepad.enabled --pref dom.svg.enabled --pref dom.webrtc.enabled --pref dom.canvas_capture.enabled --pref dom.webrtc.transceiver.enabled --pref dom.webxr.user-intent
@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 28, 2020

@avadacatavra you may have opinions about ^

@Manishearth
Copy link
Member

Manishearth commented Jul 29, 2020

Perhaps we should name the pref something scarier? idk. Implementation seems fine by me.

@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 29, 2020

Yeah, I tried to think of an appropriate dom.webxr.you-really-need-to-know-what-youre-doing-here pref name.

@Manishearth
Copy link
Member

Manishearth commented Jul 29, 2020

override_user_intent?

@Manishearth
Copy link
Member

Manishearth commented Jul 29, 2020

maybe stick an _unsafe in there

@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 29, 2020

assume_user_intent?

@Manishearth
Copy link
Member

Manishearth commented Jul 29, 2020

Yeah, but unsafe_assume_user_intent

@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 29, 2020

We have a winner!

@asajeffrey asajeffrey force-pushed the asajeffrey:webxr-user-intent-pref branch from efaec78 to 89a2c51 Jul 29, 2020
@asajeffrey
Copy link
Member Author

asajeffrey commented Jul 29, 2020

Renamed the pref. @Manishearth ok'd setting the pref in the gstreamer plugin at https://chat.mozilla.org/#/room/#servo:mozilla.org/$3DTiFVKWr85K322xn49tTBoMtEOvScTFtqi4o5okyA4

@bors-servo r=Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Jul 29, 2020

📌 Commit 89a2c51 has been approved by Manishearth

@bors-servo
Copy link
Contributor

bors-servo commented Jul 29, 2020

Testing commit 89a2c51 with merge c26a803...

@bors-servo
Copy link
Contributor

bors-servo commented Jul 29, 2020

☀️ Test successful - status-taskcluster
Approved by: Manishearth
Pushing c26a803 to master...

@bors-servo bors-servo merged commit c26a803 into servo:master Jul 29, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.