Title: [278562] trunk
Revision
278562
Author
ifernan...@igalia.com
Date
2021-06-07 08:37:54 -0700 (Mon, 07 Jun 2021)

Log Message

Use 3D points to map the WebXRBoundedReferenceSpace bounds transform
https://bugs.webkit.org/show_bug.cgi?id=224365
<rdar://problem/76754927>

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Update WebXR test expectations.

* web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt:

Source/WebCore:

WebXRBoundedReferenceSpace is currently using Point2D mapping to transfom the bounds geometry.
This is not correct because the originOffset is a 3D transform and it expects the bounds depth
coordinates to be on the z axis instead of the y axis.

Tested by WebXR WPT tests.

* Modules/webxr/WebXRBoundedReferenceSpace.cpp:
(WebCore::WebXRBoundedReferenceSpace::updateIfNeeded):

LayoutTests:

Update WebXR test expectations.

* platform/wpe/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (278561 => 278562)


--- trunk/LayoutTests/ChangeLog	2021-06-07 15:06:49 UTC (rev 278561)
+++ trunk/LayoutTests/ChangeLog	2021-06-07 15:37:54 UTC (rev 278562)
@@ -1,3 +1,15 @@
+2021-06-07  Imanol Fernandez  <ifernan...@igalia.com>
+
+        Use 3D points to map the WebXRBoundedReferenceSpace bounds transform
+        https://bugs.webkit.org/show_bug.cgi?id=224365
+        <rdar://problem/76754927>
+
+        Reviewed by Sergio Villar Senin.
+
+        Update WebXR test expectations.
+
+        * platform/wpe/TestExpectations:
+
 2021-06-07  Aditya Keerthi  <akeer...@apple.com>
 
         [iOS] Unexpected scrolling when switching focus from a text input to a select element

Modified: trunk/LayoutTests/imported/w3c/ChangeLog (278561 => 278562)


--- trunk/LayoutTests/imported/w3c/ChangeLog	2021-06-07 15:06:49 UTC (rev 278561)
+++ trunk/LayoutTests/imported/w3c/ChangeLog	2021-06-07 15:37:54 UTC (rev 278562)
@@ -1,3 +1,15 @@
+2021-06-07  Imanol Fernandez  <ifernan...@igalia.com>
+
+        Use 3D points to map the WebXRBoundedReferenceSpace bounds transform
+        https://bugs.webkit.org/show_bug.cgi?id=224365
+        <rdar://problem/76754927>
+
+        Reviewed by Sergio Villar Senin.
+
+        Update WebXR test expectations.
+
+        * web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt:
+
 2021-06-06  Darin Adler  <da...@apple.com>
 
         Handle custom identifiers and strings separately, so we can quote strings correctly consistently

Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt (278561 => 278562)


--- trunk/LayoutTests/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt	2021-06-07 15:06:49 UTC (rev 278561)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https-expected.txt	2021-06-07 15:37:54 UTC (rev 278562)
@@ -1,3 +1,4 @@
 
-FAIL Updating XRBoundedReferenceSpace origin offset updates view, input matrices, and bounds geometry. The object is in an invalid state.
+PASS Updating XRBoundedReferenceSpace origin offset updates view, input matrices, and bounds geometry. - webgl
+FAIL Updating XRBoundedReferenceSpace origin offset updates view, input matrices, and bounds geometry. - webgl2 assert_implements: webgl2 not supported. undefined
 

Modified: trunk/LayoutTests/platform/wpe/TestExpectations (278561 => 278562)


--- trunk/LayoutTests/platform/wpe/TestExpectations	2021-06-07 15:06:49 UTC (rev 278561)
+++ trunk/LayoutTests/platform/wpe/TestExpectations	2021-06-07 15:37:54 UTC (rev 278562)
@@ -655,6 +655,7 @@
 webkit.org/b/225483 imported/w3c/web-platform-tests/webxr/xrView_oneframeupdate.https.html [ Pass ]
 [ Release ] imported/w3c/web-platform-tests/webxr/navigator_xr_sameObject.https.html [ Pass ]
 imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffset.https.html [ Pass ]
+imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffsetBounded.https.html [ Pass ]
 imported/w3c/web-platform-tests/webxr/xrReferenceSpace_originOffset_viewer.https.html [ Pass ]
 imported/w3c/web-platform-tests/webxr/xrReferenceSpace_relationships.https.html [ Pass ]
 imported/w3c/web-platform-tests/webxr/xrRigidTransform_constructor.https.html [ Pass ]

Modified: trunk/Source/WebCore/ChangeLog (278561 => 278562)


--- trunk/Source/WebCore/ChangeLog	2021-06-07 15:06:49 UTC (rev 278561)
+++ trunk/Source/WebCore/ChangeLog	2021-06-07 15:37:54 UTC (rev 278562)
@@ -1,3 +1,20 @@
+2021-06-07  Imanol Fernandez  <ifernan...@igalia.com>
+
+        Use 3D points to map the WebXRBoundedReferenceSpace bounds transform
+        https://bugs.webkit.org/show_bug.cgi?id=224365
+        <rdar://problem/76754927>
+
+        Reviewed by Sergio Villar Senin.
+
+        WebXRBoundedReferenceSpace is currently using Point2D mapping to transfom the bounds geometry.
+        This is not correct because the originOffset is a 3D transform and it expects the bounds depth
+        coordinates to be on the z axis instead of the y axis.
+
+        Tested by WebXR WPT tests.
+
+        * Modules/webxr/WebXRBoundedReferenceSpace.cpp:
+        (WebCore::WebXRBoundedReferenceSpace::updateIfNeeded):
+
 2021-06-07  Antti Koivisto  <an...@apple.com>
 
         Factor selection state computation out of LegacyInlineTextBox

Modified: trunk/Source/WebCore/Modules/webxr/WebXRBoundedReferenceSpace.cpp (278561 => 278562)


--- trunk/Source/WebCore/Modules/webxr/WebXRBoundedReferenceSpace.cpp	2021-06-07 15:06:49 UTC (rev 278561)
+++ trunk/Source/WebCore/Modules/webxr/WebXRBoundedReferenceSpace.cpp	2021-06-07 15:37:54 UTC (rev 278562)
@@ -101,9 +101,8 @@
         // Each point has to multiplied by the inverse of originOffset.
         auto transform = originOffset().rawTransform().inverse().value_or(TransformationMatrix());
         for (auto& point : frameData.stageParameters.bounds) {
-            auto mappedPoint = transform.mapPoint(point);
-            // The y value of each point MUST be 0.
-            m_boundsGeometry.append(DOMPointReadOnly::create(quantize(mappedPoint.x()), 0.0, quantize(mappedPoint.y()), 1.0));
+            auto mappedPoint = transform.mapPoint(FloatPoint3D(point.x(), 0.0, point.y()));
+            m_boundsGeometry.append(DOMPointReadOnly::create(quantize(mappedPoint.x()), quantize(mappedPoint.y()), quantize(mappedPoint.z()), 1.0));
         }
     }
 }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to