Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f9b924f3b1181c07bab2e627ef738777efa791e0
      
https://github.com/WebKit/WebKit/commit/f9b924f3b1181c07bab2e627ef738777efa791e0
  Author: Charlie Wolfe <[email protected]>
  Date:   2026-06-16 (Tue, 16 Jun 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-rotate3d-180deg-near-x-axis-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-rotate3d-180deg-near-x-axis.html
    M Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp

  Log Message:
  -----------
  decompose4() computes the wrong quaternion y component
https://bugs.webkit.org/show_bug.cgi?id=316896
rdar://179334309

Reviewed by Simon Fraser.

When the matrix's X diagonal element is largest, decompose4() knows x and uses 
s = 1 / (4 * x) to
recover the other quaternion components.

CSS Transforms Level 2 defines the relevant rotation matrix entries as
2 * (x * y - z * w) and 2 * (x * y + z * w):
https://www.w3.org/TR/css-transforms-2/#recomposing-to-a-3d-matrix

These entries must be added to recover y, since their sum is 4 * x * y. 
Subtracting them cancels the
xy term and yields the wrong rotation axis for matrices near a 180° rotation 
whose largest axis
component is X.

Test: 
imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-rotate3d-180deg-near-x-axis.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-rotate3d-180deg-near-x-axis-expected.txt:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-rotate3d-180deg-near-x-axis.html:
 Added.
* Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp:
(WebCore::decompose4):

Canonical link: https://commits.webkit.org/315288@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to