Closed Bug 1353481 Opened 7 years ago Closed 7 years ago

When vrdisplayactivate is triggered by link traversal, VRDisplay.requestPresent should relax the user gesture requirement

Categories

(Core :: WebVR, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: kip, Assigned: kip)

Details

Attachments

(1 file)

In order to prevent malicious scripts from taking over your VR display, the initial entry into a WebVR session with VRDisplay.requestPresent requires a user gesture.  Once the user is within a VR session, they may follow links to pages that can immediately requestPresent.  The WebVR 1.1 spec defines the vrdisplayactivate event with a "reason" value that can be set to "navigation".  Firefox emits vrdisplayactivate with the "navigation" reason on the destination page after "load", signalling the page to immediately call requestPresent if it wishes to allow the user to seamlessly continue their VR session across the two sites.

The user gesture requirement is blocking VRDisplay.requestPresent within the vrdisplayactivate event triggered during link traversal.  We will relax the user gesture requirement for VRDisplay.requestPresent during this event.  Modeled after the User Gesture Requirement implementation in Firefox, an additional precaution of a timeout (initially set to 1s with a preference), will be implemented.
Blocks: 1353523
No longer blocks: 1353523
Attachment #8854536 - Flags: review?(dmu)
Comment on attachment 8854536 [details]
Bug 1353481 - When vrdisplayactivate is triggered by link traversal, VRDisplay.requestPresent should relax the user gesture requirement

A file was missing from the patch, I'll re-request review once updated
Attachment #8854536 - Flags: review?(dmu)
The missing file has been added to the patch.  I've also re-run the try push for a sanity test.
Comment on attachment 8854536 [details]
Bug 1353481 - When vrdisplayactivate is triggered by link traversal, VRDisplay.requestPresent should relax the user gesture requirement

https://reviewboard.mozilla.org/r/126488/#review129328

LGTM
Attachment #8854536 - Flags: review?(dmu) → review+
Pushed by kgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0bfae319e9ba
When vrdisplayactivate is triggered by link traversal, VRDisplay.requestPresent should relax the user gesture requirement r=daoshengmu
https://hg.mozilla.org/mozilla-central/rev/0bfae319e9ba
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: