Bug 303737

Summary: [WebXR Hit Test] imported/w3c/web-platform-tests/webxr/hit-test/ar_hittest_subscription_unlocalizable.https.html is failing
Product: WebKit Reporter: Fujii Hironori <fujii.hironori>
Component: WebXRAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: djg, kkinnunen, svillar, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 300754    

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
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
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.
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.