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

Issue 833633 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature
Proj-VR
Proj-XR



Sign in to add a comment

Implement WebXR Hit-test API

Project Member Reported by ddorwin@chromium.org, Apr 16 2018

Issue description

Cc: lincolnfrog@chromium.org
 Issue 834564  has been merged into this issue.
Labels: Proj-XR-AR
Labels: M-68
Project Member

Comment 4 by bugdroid1@chromium.org, May 21 2018

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

commit 7853d61132b0c2f7a6d44c7a30e5e8c1919b2c66
Author: David Dorwin <ddorwin@chromium.org>
Date: Mon May 21 05:26:01 2018

Temporarily change WebXRHitTest feature status to "test"

This feature breaks non-exclusive WebXR sessions so it should not be enabled as
part of Experimental Web Platform Features.
We will still need it enabled when running the hit-test Layout Tests.

Bug:  844228 ,  833633 ,  828321 
Change-Id: Id59268fae445f67c01c34f4b2e381988157387ae
Reviewed-on: https://chromium-review.googlesource.com/1066812
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: David Dorwin <ddorwin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560231}
[modify] https://crrev.com/7853d61132b0c2f7a6d44c7a30e5e8c1919b2c66/third_party/blink/renderer/platform/runtime_enabled_features.json5

Project Member

Comment 5 by bugdroid1@chromium.org, May 22 2018

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

commit 748edd19dbbec478f17e97e604bf095bc52581f7
Author: David Dorwin <ddorwin@chromium.org>
Date: Tue May 22 00:09:15 2018

Disable the WebXRHitTest feature in layout tests too

Upcoming changes, such as https://crrev.com/c/1046107, will break non-AR
sessions when this flag is enabled. Disable it until AR selections are
explicitly selectable by the test ( https://crbug.com/828321 ).

Bug:  833633 
Change-Id: Ieee12d94412c972aeca1a5983fab0e8510eaa025
Reviewed-on: https://chromium-review.googlesource.com/1067579
Reviewed-by: Bill Orr <billorr@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Commit-Queue: David Dorwin <ddorwin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560426}
[modify] https://crrev.com/748edd19dbbec478f17e97e604bf095bc52581f7/third_party/blink/renderer/platform/runtime_enabled_features.json5

Labels: -M-68 M-69
Project Member

Comment 7 by bugdroid1@chromium.org, May 29 2018

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

commit 7ae49d95ced461c3f366115d49c8615af7e05bf0
Author: Max Rebuschatis <lincolnfrog@chromium.org>
Date: Tue May 29 19:40:36 2018

Add hit-test API to blink for AR

This change adds the capability to request a hit-test
on an XRSession. The session queries the magic window
provider to get any hits based on the given ray and
then resolves a promise with an array of hit results.

This test is added by https://crrev.com/c/1040880, which
will land immediately after this one.

Bug:  833633 
Test: third_party/WebKit/LayoutTests/xr/ar_hittest.html
Change-Id: I225297bcf052765f156790a588eafb817ed75e08
Reviewed-on: https://chromium-review.googlesource.com/1018524
Commit-Queue: Max Rebuschatis <lincolnfrog@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Reviewed-by: Bill Orr <billorr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#562553}
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/chrome/browser/android/vr/arcore_device/arcore.h
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/chrome/browser/android/vr/arcore_device/arcore_device.cc
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/chrome/browser/android/vr/arcore_device/arcore_device.h
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/chrome/browser/android/vr/arcore_device/arcore_gl.cc
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/chrome/browser/android/vr/arcore_device/arcore_gl.h
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/chrome/browser/android/vr/arcore_device/arcore_impl.cc
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/chrome/browser/android/vr/arcore_device/arcore_impl.h
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/chrome/browser/android/vr/arcore_device/arcore_shim.cc
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/chrome/browser/android/vr/arcore_device/fake_arcore.cc
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/chrome/browser/android/vr/arcore_device/fake_arcore.h
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/device/vr/public/mojom/vr_service.mojom
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/device/vr/vr_device_base.cc
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/device/vr/vr_device_base.h
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/device/vr/vr_display_impl.cc
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/device/vr/vr_display_impl.h
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/third_party/blink/renderer/modules/modules_idl_files.gni
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/third_party/blink/renderer/modules/xr/BUILD.gn
[add] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/third_party/blink/renderer/modules/xr/xr_hit_result.cc
[add] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/third_party/blink/renderer/modules/xr/xr_hit_result.h
[add] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/third_party/blink/renderer/modules/xr/xr_hit_result.idl
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/third_party/blink/renderer/modules/xr/xr_session.cc
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/third_party/blink/renderer/modules/xr/xr_session.h
[modify] https://crrev.com/7ae49d95ced461c3f366115d49c8615af7e05bf0/third_party/blink/renderer/modules/xr/xr_session.idl

Project Member

Comment 8 by bugdroid1@chromium.org, Jun 1 2018

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

commit c36cf6d5c133ba8d28244c5de6c416ad26dbf28c
Author: Bill Orr <billorr@chromium.org>
Date: Fri Jun 01 18:43:24 2018

Add layout test for WebXR HitTest API

Test is now updated so it would pass if we enabled ar_hittest in tests.
Expectations are updated to indicate that we expect to fail because we
don't enable ar_hittest in tests. This will be addressed in
 https://crbug.com/828321 .



Bug:  833633 
Change-Id: I0cbd5818db352ee419cdff7196808342479beee0
Reviewed-on: https://chromium-review.googlesource.com/1040880
Commit-Queue: Bill Orr <billorr@chromium.org>
Reviewed-by: David Dorwin <ddorwin@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#563734}
[add] https://crrev.com/c36cf6d5c133ba8d28244c5de6c416ad26dbf28c/third_party/WebKit/LayoutTests/xr/ar_hittest-expected.txt
[add] https://crrev.com/c36cf6d5c133ba8d28244c5de6c416ad26dbf28c/third_party/WebKit/LayoutTests/xr/ar_hittest.html
[modify] https://crrev.com/c36cf6d5c133ba8d28244c5de6c416ad26dbf28c/third_party/WebKit/LayoutTests/xr/resources/xr-device-mocking.js
[modify] https://crrev.com/c36cf6d5c133ba8d28244c5de6c416ad26dbf28c/third_party/blink/renderer/modules/xr/xr_device.cc

Status: Fixed (was: Assigned)
Components: Blink>WebXR
Not 100% sure this is the best ticket to raise this against - but it's the one listed on the Chrome Platform Status page so raising here.

Our WebXR apps all work fine using chrome://flags #webxr = enabled and #webxr-hit-test = enabled.

But when we turn those flags off and move to using our WebXR origin token then Chrome Dev (5.0 (Linux; Android 8.1.0; Pixel XL Build/OPM4.171019.021.P1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3475.0 Mobile Safari/537.36 - plus tested with same result on several other devices too) no longer shows the camerastream/framebuffer layer. And without that then 6dof tracking doesn't work either.

Here's an example of the HTTP response that includes the header.

    HTTP/1.1 200 OK
    Server: nginx
    Date: Fri, 06 Jul 2018 01:29:14 GMT
    Content-Type: text/html;charset=UTF-8
    Content-Length: 1266653
    Connection: keep-alive
    Vary: Accept-Encoding
    Origin-Trial: Ah/VmqQ+ljwtRyLd3Pl3o0yeShjjJzpml+VXKzA/X1dl0W+DALcOyNsdKJCeNtEzTzBX8VoWVa/3bkEX2aR/wwkAAABeeyJvcmlnaW4iOiJodHRwczovL2F3ZS5pbzo0NDMiLCJmZWF0dXJlIjoiV2ViWFJEZXZpY2UiLCJleHBpcnkiOjE1MzQyOTAyMzIsImlzU3ViZG9tYWluIjp0cnVlfQ==

If we turn just the #webxr-hit-test flag back on then it works - so it looks like there's a silent dependency on hit-test and we have to require users to turn that flag on to use this origin token 8(

This is the same if we try this without the origin token and only have the #webxr flag enabled. This fails in the same way until we then turn on the #webxr-hit-test flag.

NOTE: We don't use the .requestHitTest() or anything else we can see that would make this API/flag required.

Please let us know if you need any additional information.

Sign in to add a comment