Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a few edge cases for XRRigidTransform
First, for sufficiently large DOMPointInit Values, it was impossible to normalize the quaternion. This now throws an Invalid State error. Second, for sufficiently large Translation values, the DCHECK for IsInvertible, was failing. This triggered tests/debug builds, while on production builds, it simply returned identity. This DCHECK has been removed and replaced with a DLOG(ERROR) and an explicit return of an identity inverse, to match the existing behavior while spec discussions are ongoing as far as what to do in this case. It is worth noting, that the "matrix" attribute that the page receives in cases such as this, contains "invalid" (e.g. Infinity) values (indeed even before reaching this case), due to the type mismatch, where DOMPointInit/the internal representation are doubles, and the "matrix" attribute is a Float32Array. Bug: 1258611 Change-Id: I572ec27a4c176a0a1a7352c8cbdf92070dcf1080 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3257117 Commit-Queue: Alexander Cooper <[email protected]> Commit-Queue: Klaus Weidner <[email protected]> Auto-Submit: Alexander Cooper <[email protected]> Reviewed-by: Klaus Weidner <[email protected]> Cr-Commit-Position: refs/heads/main@{#937665}
- Loading branch information