WebVR does not properly stop presenting if requestPresent rejects |
||||||||||
Issue descriptionReproducible in Android Canary 57.0.2978.0 on a Pixel Reproduction steps: 1. Access https://webvr.info/samples/03-vr-presentation.html on the Android device 2. Connect the device to a workstation and inspect the tab (F12 -> Remote devices) 3. Run the following Javascript in the console: var disp; var can = document.getElementById("webgl-canvas"); navigator.getVRDisplays().then( (displays) => {disp = displays[0];}); disp.requestPresent([{ source: can}]); << Complete DON flow >> disp.requestPresent([{ source: can, leftBounds: [0, 1]}]); Actual outcome: The page goes back to magic window, except that the VR overlay is still present. Pressing back goes to the previous page. Pressing the X on the VR overlay removes the overlay. Expected outcome: The page goes back to magic window, exactly as if the user had manually exited VR (no overlay).
,
Jan 11 2017
,
Jan 11 2017
Should the second requestPresent() instead be rejected but leave the existing presentation active?
,
Jan 12 2017
No. According to the spec, presentation should immediately stop if requestPresent() rejects. In this case, VRDisplay thinks that it's no longer presenting, but the overlay is not being removed.
,
Jan 12 2017
Doesn't seem like a P1 since the app is behaving in an incorrect manner, but still should be fixed.
,
Jan 14 2017
bajones explained that it is reasonable for an application to requestPresent() multiple times. A rejection means that what the application was trying to present is not being presented, so there isn't really anything to continue displaying. Still, this is an exceptional case, so P2 seems appropriate.
,
Feb 9 2017
,
Feb 13 2017
I would like to work on this issues if nobody has taken it yet. Assigning to myself.
,
Feb 13 2017
@shaobo is currently working on this issue, a potential fixing patch: https://codereview.chromium.org/2689563008/.
,
Feb 14 2017
removing myself then
,
Feb 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/a8725caafe812944aa590f27e8711eab810bf1a1 commit a8725caafe812944aa590f27e8711eab810bf1a1 Author: shaobo.yan <shaobo.yan@intel.com> Date: Mon Feb 20 02:22:17 2017 Fix WebVR does not properly stop presenting if requestPresent rejects. Directly call forceExitPresent won't stop presenting correctly. BUG= 680209 Review-Url: https://codereview.chromium.org/2689563008 Cr-Commit-Position: refs/heads/master@{#451544} [modify] https://crrev.com/a8725caafe812944aa590f27e8711eab810bf1a1/third_party/WebKit/Source/modules/vr/VRDisplay.cpp [modify] https://crrev.com/a8725caafe812944aa590f27e8711eab810bf1a1/third_party/WebKit/Source/modules/vr/VRDisplay.h
,
Feb 22 2017
The fix appears to work on ToT, as calling requestPresent([{source: null}]) while presenting ends presentation. I'll go ahead and close this.
,
Feb 23 2017
Do we have a test?
,
Feb 23 2017
Yes and no - there's a layout test that covers this scenario, but since this particular bug was purely visual (the display was no longer presenting according to WebVR), it wasn't caught. I've filed Issue 695514 to track adding a test for this particular bug.
,
Jul 4
|
||||||||||
►
Sign in to add a comment |
||||||||||
Comment 1 by bsheedy@chromium.org
, Jan 11 2017