New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 716571 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug
Proj-XR



Sign in to add a comment

WebVR: remove "cardboard compatible" click event

Project Member Reported by klausw@chromium.org, Apr 28 2017

Issue description

Currently, clicking the Daydream controller's touchpad creates a synthetic click event at viewport (0, 0) for compatibility with Cardboard applications. This is equivalent to how a screen touch gets reported when native WebVR is used with a Cardboard headset. (Cardboard headsets use a capacitive touch button that physically touches the screen, this event is suppressed during GVR presentation and needs to be emulated.)

The current implementation is a bit of a hack. Issues include duplicate event processing in case an application uses both a click handler and gamepad input, and some nasty iframe focus problems such as  crbug.com/710863  .

Going forward, it would be far cleaner if there were an input API usable for WebVR that could replace this in a consistent way, ideally using events that fulfill the "user gesture" requirement. (The Gamepad API is based on polling and doesn't generate events for button presses.)

 
Cc: mscales@chromium.org bajones@chromium.org meganlindsay@chromium.org
Labels: -Pri-3 M-62 Pri-1
Status: Available (was: Untriaged)
This unexpected behavior is causing problems for sites (see  issue 734106 ) and incompatible with most other implementations. Maybe we should require that sites that need a user gesture opt-in to the simulated click behavior (until we identify a permanent solution). The next origin trial would be a good time to change this behavior.
Cc: klausw@chromium.org vollick@chromium.org
Is it possible to detect that the app is using or listening for the simulated click event while WebVR is presenting? If so, we could add a deprecation message* and/or UMA**.

* We would need to figure out what the solution will be and include it in the message.
** Even if we added it in M61, we probably wouldn't have time to act on it for M62. Authors would have time to respond, though.

Perhaps it is simpler and better to just handle it as part of the Origin Trial process. We still need to identify a solution for M62, though.
Cc: ddorwin@chromium.org
 Issue 734106  has been merged into this issue.
Owner: mthiesse@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/09b107130f5c7a4cb377322b879ac2aac67cadbf

commit 09b107130f5c7a4cb377322b879ac2aac67cadbf
Author: Michael Thiessen <mthiesse@chromium.org>
Date: Tue Aug 22 04:58:14 2017

VR: Add gesture token to vrdisplayactivate, remove cardboard compat hack

This CL adds a gesture token to the displayactivate event which can only
be triggered by user action (on Android, placing the phone in a VR
headset and completing controller pairing while on a WebVR site).

This CL also removes the cardboard click event used for compatibility
and supplying user gesture, as a gesture is now supplied with the
displayactivate event.

Note: Once this lands, action will be required on the part of WebVR
Origin Trial participants that were previously relying on the cardboard
compat click events to act as user gestures - they will have to
perform any gesture-requiring actions in the displayactivate handler.

Bug:  716571 ,  756564 
Change-Id: I541c8e181fadaf58710da57b6e9f5e8971451073
Reviewed-on: https://chromium-review.googlesource.com/619170
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#496219}
[modify] https://crrev.com/09b107130f5c7a4cb377322b879ac2aac67cadbf/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/09b107130f5c7a4cb377322b879ac2aac67cadbf/third_party/WebKit/Source/modules/vr/VRDisplay.cpp
[modify] https://crrev.com/09b107130f5c7a4cb377322b879ac2aac67cadbf/third_party/WebKit/Source/modules/vr/VRDisplay.h

For the record, I didn't totally remove the cardboard-compatible click event. It still fires for cardboard headsets, but won't fire for controller events.

If we want I can remove that too.
Status: Started (was: Assigned)
(Also removing cardboard click in https://chromium-review.googlesource.com/c/chromium/src/+/629263)
Project Member

Comment 8 by bugdroid1@chromium.org, Aug 31 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3320340b8edb9bb3e63cadeccf0a9effab3b06c6

commit 3320340b8edb9bb3e63cadeccf0a9effab3b06c6
Author: Michael Thiessen <mthiesse@chromium.org>
Date: Thu Aug 31 18:38:32 2017

VR: Disable cardboard click fallback and add gamepad tests.

TBR=dtrainor@chromium.org

Bug:  716571 
Change-Id: I8505ad125d8883a7a61dc202870d12227ebc3be5
Reviewed-on: https://chromium-review.googlesource.com/629263
Commit-Queue: Michael Thiessen <mthiesse@chromium.org>
Reviewed-by: David Trainor <dtrainor@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#498929}
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/android/BUILD.gn
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellImpl.java
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/EmulatedVrController.java
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/WebVrInputTest.java
[delete] https://crrev.com/66da542bbad774a44e664dd37daba98bc85c40b7/chrome/android/javatests/src/org/chromium/chrome/browser/vr_shell/util/CardboardUtils.java
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/android/shared_preference_files/test/vr_cardboard_skipdon_setupcomplete.json
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/browser/android/vr_shell/vr_shell.cc
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/browser/android/vr_shell/vr_shell.h
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/browser/android/vr_shell/vr_shell_gl.cc
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/browser/android/vr_shell/vr_shell_gl.h
[add] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/test/data/android/webvr_instrumentation/html/test_gamepad_button.html
[rename] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_not_registered.html
[delete] https://crrev.com/66da542bbad774a44e664dd37daba98bc85c40b7/chrome/test/data/android/webvr_instrumentation/html/test_screen_taps_registered.html
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/device/vr/android/gvr/cardboard_gamepad_data_provider.h
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/device/vr/android/gvr/gvr_gamepad_data_fetcher.cc
[modify] https://crrev.com/3320340b8edb9bb3e63cadeccf0a9effab3b06c6/device/vr/android/gvr/gvr_gamepad_data_provider.h

Status: Fixed (was: Started)
Components: Blink>WebXR

Sign in to add a comment