WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
303737
[WebXR Hit Test] imported/w3c/web-platform-tests/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html is failing
https://bugs.webkit.org/show_bug.cgi?id=303737
Summary
[WebXR Hit Test] imported/w3c/web-platform-tests/webxr/hit-test/ar_hittest_su...
Fujii Hironori
Reported
2025-12-08 01:23:08 PST
[WebXR Hit Test] imported/w3c/web-platform-tests/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html is failing FAIL Ensures hit test result returns null pose w/unlocalizable space - viewer space - webgl assert_true: Pose should be null since input source is not localizable expected true got false FAIL Ensures hit test result returns null pose w/unlocalizable space - viewer space - webgl2 assert_true: Pose should be null since input source is not localizable expected true got false
Attachments
Add attachment
proposed patch, testcase, etc.
Fujii Hironori
Comment 1
2025-12-09 19:06:46 PST
This test was added by
https://chromium-review.googlesource.com/c/chromium/src/+/3733395
There was a following change. ~~~ diff --git a/third_party/blink/renderer/modules/xr/xr_hit_test_result.cc b/third_party/blink/renderer/modules/xr/xr_hit_test_result.cc index ab8173eca7473..a367f6608b729 100644 --- a/third_party/blink/renderer/modules/xr/xr_hit_test_result.cc +++ b/third_party/blink/renderer/modules/xr/xr_hit_test_result.cc @@ -25,9 +25,18 @@ XRHitTestResult::XRHitTestResult( } auto maybe_other_space_native_from_mojo = other->NativeFromMojo(); - DCHECK(maybe_other_space_native_from_mojo); + if (!maybe_other_space_native_from_mojo) { + return nullptr; + } auto mojo_from_this = TransformationMatrix(mojo_from_this_.ToTransform()); ~~~ There were a review comments. Alex Cooper: What made this change? Piotr Bialecki: Previous version looked incorrect - I don't see why other->NativeFromMojo() would guarantee that it's non-nullopt in this case. Let me add a WPT to verify. Alex Cooper: Hmm, yeah I'm not seeing any spec text that requires space to be localizable. So this is fine. Piotr Bialecki: WPT added, PTAL. This is the reason the test case was added.
Radar WebKit Bug Importer
Comment 2
2025-12-15 01:24:11 PST
<
rdar://problem/166522898
>
Fujii Hironori
Comment 3
2025-12-16 22:42:26 PST
I built and tested Chromium. If I modified the test case, it fails. diff --git a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html index d1cb1a5a5c444..b113d0fc1331d 100644 --- a/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html +++ b/third_party/blink/web_tests/external/wpt/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html @@ -43,6 +43,7 @@ let testFunctionGenerator = function(ray, refSpaceName) { handedness: "right", targetRayMode: "tracked-pointer", pointerOrigin: IDENTITY_TRANSFORM, + gripOrigin: IDENTITY_TRANSFORM, profiles: [] });
> This is a testharness.js-based test. > [FAIL] Ensures hit test result returns null pose w/unlocalizable space - viewer space - webgl > assert_true: Pose should be null since input source is not localizable expected true got false > [FAIL] Ensures hit test result returns null pose w/unlocalizable space - viewer space - webgl2 > assert_true: Pose should be null since input source is not localizable expected true got false > Harness: the test ran to completion.
Thus, if gripOrigin is null, the input source is unlocalizable.
Fujii Hironori
Comment 4
2025-12-16 23:39:14 PST
Looking into it more. XRTargetRaySpace::MojoFromNative() returns nullopt in the test case because input_source_->MojoFromInput() is nullopt.
https://github.com/chromium/chromium/blob/9ffe3999a201b3d58e05873d438c43f5676afaa6/third_party/blink/renderer/modules/xr/xr_target_ray_space.cc#L38-L42
XRInputSource::MojoFromInput() returns nullopt because mojo_from_input_ is null.
https://github.com/chromium/chromium/blob/9ffe3999a201b3d58e05873d438c43f5676afaa6/third_party/blink/renderer/modules/xr/xr_input_source.cc#L262-L263
mojo_from_input_ is null because state->mojo_from_input is null XRInputSource::CreateOrUpdateFrom.
https://github.com/chromium/chromium/blob/9ffe3999a201b3d58e05873d438c43f5676afaa6/third_party/blink/renderer/modules/xr/xr_input_source.cc#L107
mojo_from_input_ is set in setGripOrigin().
https://github.com/chromium/chromium/blob/868cd2197aceec8d0641c47efcfd865f4adb0537/third_party/blink/web_tests/external/wpt/resources/chromium/webxr-test.js#L2011
setGripOrigin() is called if fakeInputSourceInit.gripOrigin != null.
https://github.com/chromium/chromium/blob/868cd2197aceec8d0641c47efcfd865f4adb0537/third_party/blink/web_tests/external/wpt/resources/chromium/webxr-test.js#L1978-L1979
Sergio Villar Senin
Comment 5
2025-12-17 01:15:52 PST
Looks like a WPT test added for something specific to chromium? If that's the case I think it's safe to skip, as you mentioned there seem to be nothing related to that in the spec. Actually I'd open a bug against the spec, just to ask about that issue.
Fujii Hironori
Comment 6
2025-12-17 02:44:06 PST
This is about the spec of WebXR Test API. It's unclear to me the relationship of pointerOrigin and gripOrigin.
https://immersive-web.github.io/webxr-test-api/
There is a comment in Chromium code <
https://github.com/chromium/chromium/blob/9ffe3999a201b3d58e05873d438c43f5676afaa6/third_party/blink/renderer/modules/xr/xr_target_ray_space.cc#L39
>
> // mojo_from_pointer is just: MojoFromInput*InputFromPointer;
IIUC, this means pointerOrigin is relative to gripOrigin. That's the reason input_source.targetRaySpace is unlocalizable if gripOrigin is null.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug