Changeset 289599 in webkit
- Timestamp:
- Feb 10, 2022 6:27:02 PM (5 months ago)
- Location:
- trunk
- Files:
-
- 15 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-matrix-composition-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-rotate-composition-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-skew-composition-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-translate-composition-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/combining-effects/effect-composition-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/animation/CSSPropertyAnimation.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/transforms/TransformOperations.cpp (modified) (4 diffs)
-
Source/WebCore/platform/graphics/transforms/TransformOperations.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r289558 r289599 1 2022-02-10 Nikolaos Mouchtaris <nmouchtaris@apple.com> 2 3 Web animations- Composite operation accumulation support for transform properties 4 https://bugs.webkit.org/show_bug.cgi?id=236116 5 6 Reviewed by Simon Fraser. 7 8 * web-platform-tests/css/css-transforms/animation/transform-matrix-composition-expected.txt: 9 * web-platform-tests/css/css-transforms/animation/transform-rotate-composition-expected.txt: 10 * web-platform-tests/css/css-transforms/animation/transform-skew-composition-expected.txt: 11 * web-platform-tests/css/css-transforms/animation/transform-translate-composition-expected.txt: 12 * web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt: 13 * web-platform-tests/web-animations/animation-model/combining-effects/effect-composition-expected.txt: 14 1 15 2022-02-10 Chris Dumez <cdumez@apple.com> 2 16 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-matrix-composition-expected.txt
r287909 r289599 28 28 PASS Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from add [matrix(1, 1, 0, 0, 0, 100)] to add [matrix(1, 0, 0, 1, 200, 0)] at (1) should be [matrix(1, 0, 0, 1, 300, 0)] 29 29 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from add [matrix(1, 1, 0, 0, 0, 100)] to add [matrix(1, 0, 0, 1, 200, 0)] at (1.5) should be [matrix(1, 0, 0, 1, 300, 0)] assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 300 , 0 ) " but got "matrix ( 0.99 , - 0.56 , 0.37 , 1.59 , 487.5 , - 137.5 ) " 30 FAIL Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (-0.5) should be [matrix(0, 1, -1, 0, 150, 0)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 150 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 50 , 0 ) " 31 FAIL Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0) should be [matrix(0, 1, -1, 0, 200, 0)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 200 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 100 , 0 ) " 32 FAIL Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.25) should be [matrix(0, 1, -1, 0, 225, 0)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 225 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) " 33 FAIL Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.5) should be [matrix(0, 1, -1, 0, 250, 0)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 250 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 150 , 0 ) " 34 FAIL Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.75) should be [matrix(0, 1, -1, 0, 275, 0)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 275 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 175 , 0 ) " 35 FAIL Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (1) should be [matrix(0, 1, -1, 0, 300, 0)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 300 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 200 , 0 ) " 36 FAIL Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (1.5) should be [matrix(0, 1, -1, 0, 350, 0)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 350 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 250 , 0 ) " 37 FAIL Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (-0.5) should be [translateX(150px) rotate3d(1, 1, 0, 45deg)] assert_equals: expected "matrix3d ( 0.85 , 0.15 , - 0.5 , 0 , 0.15 , 0.85 , 0.5 , 0 , 0.5 , - 0.5 , 0.71 , 0 , 150 , 0 , 0 , 1 ) " but got "matrix ( 1 , 0 , 0 , 1 , 50 , 0 ) " 38 FAIL Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (0) should be [translateX(200px) rotate3d(1, 1, 0, 45deg)] assert_equals: expected "matrix3d ( 0.85 , 0.15 , - 0.5 , 0 , 0.15 , 0.85 , 0.5 , 0 , 0.5 , - 0.5 , 0.71 , 0 , 200 , 0 , 0 , 1 ) " but got "matrix ( 1 , 0 , 0 , 1 , 100 , 0 ) " 39 FAIL Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (0.25) should be [translateX(225px) rotate3d(1, 1, 0, 45deg)] assert_equals: expected "matrix3d ( 0.85 , 0.15 , - 0.5 , 0 , 0.15 , 0.85 , 0.5 , 0 , 0.5 , - 0.5 , 0.71 , 0 , 225 , 0 , 0 , 1 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) " 40 FAIL Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (0.5) should be [translateX(250px) rotate3d(1, 1, 0, 45deg)] assert_equals: expected "matrix3d ( 0.85 , 0.15 , - 0.5 , 0 , 0.15 , 0.85 , 0.5 , 0 , 0.5 , - 0.5 , 0.71 , 0 , 250 , 0 , 0 , 1 ) " but got "matrix ( 1 , 0 , 0 , 1 , 150 , 0 ) " 41 FAIL Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (0.75) should be [translateX(275px) rotate3d(1, 1, 0, 45deg)] assert_equals: expected "matrix3d ( 0.85 , 0.15 , - 0.5 , 0 , 0.15 , 0.85 , 0.5 , 0 , 0.5 , - 0.5 , 0.71 , 0 , 275 , 0 , 0 , 1 ) " but got "matrix ( 1 , 0 , 0 , 1 , 175 , 0 ) " 42 FAIL Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (1) should be [translateX(300px) rotate3d(1, 1, 0, 45deg)] assert_equals: expected "matrix3d ( 0.85 , 0.15 , - 0.5 , 0 , 0.15 , 0.85 , 0.5 , 0 , 0.5 , - 0.5 , 0.71 , 0 , 300 , 0 , 0 , 1 ) " but got "matrix ( 1 , 0 , 0 , 1 , 200 , 0 ) " 43 FAIL Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (1.5) should be [translateX(350px) rotate3d(1, 1, 0, 45deg)] assert_equals: expected "matrix3d ( 0.85 , 0.15 , - 0.5 , 0 , 0.15 , 0.85 , 0.5 , 0 , 0.5 , - 0.5 , 0.71 , 0 , 350 , 0 , 0 , 1 ) " but got "matrix ( 1 , 0 , 0 , 1 , 250 , 0 ) " 30 PASS Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (-0.5) should be [matrix(0, 1, -1, 0, 150, 0)] 31 PASS Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0) should be [matrix(0, 1, -1, 0, 200, 0)] 32 PASS Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.25) should be [matrix(0, 1, -1, 0, 225, 0)] 33 PASS Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.5) should be [matrix(0, 1, -1, 0, 250, 0)] 34 PASS Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.75) should be [matrix(0, 1, -1, 0, 275, 0)] 35 PASS Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (1) should be [matrix(0, 1, -1, 0, 300, 0)] 36 PASS Compositing: property <transform> underlying [matrix(0, 1, -1, 0, 100, 0)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (1.5) should be [matrix(0, 1, -1, 0, 350, 0)] 37 PASS Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (-0.5) should be [translateX(150px) rotate3d(1, 1, 0, 45deg)] 38 PASS Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (0) should be [translateX(200px) rotate3d(1, 1, 0, 45deg)] 39 PASS Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (0.25) should be [translateX(225px) rotate3d(1, 1, 0, 45deg)] 40 PASS Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (0.5) should be [translateX(250px) rotate3d(1, 1, 0, 45deg)] 41 PASS Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (0.75) should be [translateX(275px) rotate3d(1, 1, 0, 45deg)] 42 PASS Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (1) should be [translateX(300px) rotate3d(1, 1, 0, 45deg)] 43 PASS Compositing: property <transform> underlying [matrix3d(0.8535533905932737,0.1464466094067262,-0.5,0,0.1464466094067262,0.8535533905932737,0.5,0,0.5,-0.5,0.7071067811865476,0,100,0,0,1)] from accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 0, 0, 1)] to accumulate [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 0, 0, 1)] at (1.5) should be [translateX(350px) rotate3d(1, 1, 0, 45deg)] 44 44 PASS Compositing: property <transform> underlying [matrix(1, 1, 0, 0, 0, 100)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (-0.5) should be [matrix(1, 0, 0, 1, 50, 0)] 45 45 PASS Compositing: property <transform> underlying [matrix(1, 1, 0, 0, 0, 100)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0) should be [matrix(1, 0, 0, 1, 100, 0)] … … 49 49 PASS Compositing: property <transform> underlying [matrix(1, 1, 0, 0, 0, 100)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (1) should be [matrix(1, 0, 0, 1, 200, 0)] 50 50 PASS Compositing: property <transform> underlying [matrix(1, 1, 0, 0, 0, 100)] from accumulate [matrix(1, 0, 0, 1, 100, 0)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (1.5) should be [matrix(1, 0, 0, 1, 250, 0)] 51 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (-0.5) should be [matrix(1, 1, 0, 0, 0, 100)] assert_equals: expected "matrix ( 1 , 1 , 0 , 0 , 0 , 100 ) " but got "matrix ( 1.28 , 0.84 , - 0.03 , 0.3 , 87.5 , - 37.5 ) "51 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (-0.5) should be [matrix(1, 1, 0, 0, 0, 100)] assert_equals: expected "matrix ( 1 , 1 , 0 , 0 , 0 , 100 ) " but got "matrix ( 1.28 , 0.84 , - 0.03 , 0.3 , 75 , - 75 ) " 52 52 PASS Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0) should be [matrix(1, 1, 0, 0, 0, 100)] 53 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.25) should be [matrix(1, 1, 0, 0, 0, 100)] assert_equals: expected "matrix ( 1 , 1 , 0 , 0 , 0 , 100 ) " but got "matrix ( 0.95 , 0.86 , - 0.01 , 0.08 , 59.38 , 65.63) "54 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.5) should be [matrix(1, 0, 0, 1, 300, 0)] assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 300 , 0 ) " but got "matrix ( 0.95 , 0.63 , - 0.03 , 0.3 , 87.5 , 62.5 ) "55 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.75) should be [matrix(1, 0, 0, 1, 300, 0)] assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 300 , 0 ) " but got "matrix ( 0.97 , 0.32 , - 0.04 , 0.63 , 134.38 , 40.63) "56 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (1) should be [matrix(1, 0, 0, 1, 300, 0)] assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 300 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 200 , 0 ) " 57 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (1.5) should be [matrix(1, 0, 0, 1, 300, 0)] assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 300 , 0 ) " but got "matrix ( 0.99 , - 0.56 , 0.37 , 1.59 , 387.5 , - 137.5 ) "53 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.25) should be [matrix(1, 1, 0, 0, 0, 100)] assert_equals: expected "matrix ( 1 , 1 , 0 , 0 , 0 , 100 ) " but got "matrix ( 0.95 , 0.86 , - 0.01 , 0.08 , 75 , 75 ) " 54 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.5) should be [matrix(1, 0, 0, 1, 300, 0)] assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 300 , 0 ) " but got "matrix ( 0.95 , 0.63 , - 0.03 , 0.3 , 125 , 75 ) " 55 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (0.75) should be [matrix(1, 0, 0, 1, 300, 0)] assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 300 , 0 ) " but got "matrix ( 0.97 , 0.32 , - 0.04 , 0.63 , 200 , 50 ) " 56 PASS Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (1) should be [matrix(1, 0, 0, 1, 300, 0)] 57 FAIL Compositing: property <transform> underlying [matrix(1, 0, 0, 1, 100, 0)] from accumulate [matrix(1, 1, 0, 0, 0, 100)] to accumulate [matrix(1, 0, 0, 1, 200, 0)] at (1.5) should be [matrix(1, 0, 0, 1, 300, 0)] assert_equals: expected "matrix ( 1 , 0 , 0 , 1 , 300 , 0 ) " but got "matrix ( 0.99 , - 0.56 , 0.37 , 1.59 , 575 , - 175 ) " 58 58 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-rotate-composition-expected.txt
r285631 r289599 49 49 PASS Compositing: property <transform> underlying [rotateZ(20deg)] from accumulate [rotateZ(40deg)] to accumulate [rotateZ(60deg)] at (1) should be [rotateZ(80deg)] 50 50 PASS Compositing: property <transform> underlying [rotateZ(20deg)] from accumulate [rotateZ(40deg)] to accumulate [rotateZ(60deg)] at (1.5) should be [rotateZ(90deg)] 51 FAIL Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (-0.5) should be [rotateX(45deg) rotateY(10deg)] assert_equals: expected "matrix3d ( 0.98 , 0.12 , - 0.12 , 0 , 0 , 0.71 , 0.71 , 0 , 0.17 , - 0.7 , 0.7 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 0.98 , 0 , - 0.17 , 0 , 0 , 1 , 0 , 0 , 0.17 , 0 , 0.98 , 0 , 0 , 0 , 0 , 1 ) " 52 FAIL Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (0) should be [rotateX(45deg) rotateY(30deg)] assert_equals: expected "matrix3d ( 0.87 , 0.35 , - 0.35 , 0 , 0 , 0.71 , 0.71 , 0 , 0.5 , - 0.61 , 0.61 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 0.87 , 0 , - 0.5 , 0 , 0 , 1 , 0 , 0 , 0.5 , 0 , 0.87 , 0 , 0 , 0 , 0 , 1 ) " 53 FAIL Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (0.25) should be [rotateX(45deg) rotateY(40deg)] assert_equals: expected "matrix3d ( 0.77 , 0.45 , - 0.45 , 0 , 0 , 0.71 , 0.71 , 0 , 0.64 , - 0.54 , 0.54 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 0.77 , 0 , - 0.64 , 0 , 0 , 1 , 0 , 0 , 0.64 , 0 , 0.77 , 0 , 0 , 0 , 0 , 1 ) " 54 FAIL Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (0.5) should be [rotateX(45deg) rotateY(50deg)] assert_equals: expected "matrix3d ( 0.64 , 0.54 , - 0.54 , 0 , 0 , 0.71 , 0.71 , 0 , 0.77 , - 0.45 , 0.45 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 0.64 , 0 , - 0.77 , 0 , 0 , 1 , 0 , 0 , 0.77 , 0 , 0.64 , 0 , 0 , 0 , 0 , 1 ) " 55 FAIL Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (0.75) should be [rotateX(45deg) rotateY(60deg)] assert_equals: expected "matrix3d ( 0.5 , 0.61 , - 0.61 , 0 , 0 , 0.71 , 0.71 , 0 , 0.87 , - 0.35 , 0.35 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 0.5 , 0 , - 0.87 , 0 , 0 , 1 , 0 , 0 , 0.87 , 0 , 0.5 , 0 , 0 , 0 , 0 , 1 ) " 56 FAIL Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (1) should be [rotateX(45deg) rotateY(70deg)] assert_equals: expected "matrix3d ( 0.34 , 0.66 , - 0.66 , 0 , 0 , 0.71 , 0.71 , 0 , 0.94 , - 0.24 , 0.24 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 0.34 , 0 , - 0.94 , 0 , 0 , 1 , 0 , 0 , 0.94 , 0 , 0.34 , 0 , 0 , 0 , 0 , 1 ) " 57 FAIL Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (1.5) should be [rotateX(45deg) rotateY(90deg)] assert_equals: expected "matrix3d ( 0 , 0.71 , - 0.71 , 0 , 0 , 0.71 , 0.71 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 0 , 0 , - 1 , 0 , 0 , 1 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) " 51 PASS Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (-0.5) should be [rotateX(45deg) rotateY(10deg)] 52 PASS Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (0) should be [rotateX(45deg) rotateY(30deg)] 53 PASS Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (0.25) should be [rotateX(45deg) rotateY(40deg)] 54 PASS Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (0.5) should be [rotateX(45deg) rotateY(50deg)] 55 PASS Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (0.75) should be [rotateX(45deg) rotateY(60deg)] 56 PASS Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (1) should be [rotateX(45deg) rotateY(70deg)] 57 PASS Compositing: property <transform> underlying [rotateX(45deg)] from accumulate [rotateY(30deg)] to accumulate [rotateY(70deg)] at (1.5) should be [rotateX(45deg) rotateY(90deg)] 58 58 PASS Compositing: property <transform> underlying [rotate(45deg) skew(10deg, 20deg)] from accumulate [rotate(45deg)] to accumulate [rotate(225deg)] at (-0.5) should be [rotate(0deg) skew(10deg, 20deg)] 59 59 PASS Compositing: property <transform> underlying [rotate(45deg) skew(10deg, 20deg)] from accumulate [rotate(45deg)] to accumulate [rotate(225deg)] at (0) should be [rotate(90deg) skew(10deg, 20deg)] -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-skew-composition-expected.txt
r285631 r289599 42 42 PASS Compositing: property <transform> underlying [skew(10deg, 45deg)] from accumulate [skew(20deg, 30deg)] to accumulate [skew(40deg, 70deg)] at (1) should be [skew(50deg, 115deg)] 43 43 PASS Compositing: property <transform> underlying [skew(10deg, 45deg)] from accumulate [skew(20deg, 30deg)] to accumulate [skew(40deg, 70deg)] at (1.5) should be [skew(60deg, 135deg)] 44 FAIL Compositing: property <transform> underlying [skewX(45deg)] from accumulate [skewY(45deg)] to accumulate [skewY(45deg)] at (0.5) should be [matrix(1, 1, 0.5, 1.5, 0, 0)] assert_equals: expected "matrix ( 1 , 1 , 0.5 , 1.5 , 0 , 0 ) " but got "matrix ( 1 , 1 , 0 , 1, 0 , 0 ) "44 FAIL Compositing: property <transform> underlying [skewX(45deg)] from accumulate [skewY(45deg)] to accumulate [skewY(45deg)] at (0.5) should be [matrix(1, 1, 0.5, 1.5, 0, 0)] assert_equals: expected "matrix ( 1 , 1 , 0.5 , 1.5 , 0 , 0 ) " but got "matrix ( 1.71 , 0.71 , 0.71 , 1.12 , 0 , 0 ) " 45 45 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-translate-composition-expected.txt
r289032 r289599 49 49 PASS Compositing: property <transform> underlying [translate(100px, 50px)] from accumulate [translateZ(50px)] to accumulate [translateZ(250px)] at (1) should be [translate3d(100px, 50px, 250px)] 50 50 PASS Compositing: property <transform> underlying [translate(100px, 50px)] from accumulate [translateZ(50px)] to accumulate [translateZ(250px)] at (1.5) should be [translate3d(100px, 50px, 350px)] 51 FAIL Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (-0.5) should be [translateX(150px) rotate(90deg)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 150 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 150 , 0 ) " 52 FAIL Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (0) should be [translateX(200px) rotate(90deg)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 200 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 200 , 0 ) " 53 FAIL Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (0.25) should be [translateX(225px) rotate(90deg)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 225 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 225 , 0 ) " 54 FAIL Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (0.5) should be [translateX(250px) rotate(90deg)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 250 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 250 , 0 ) " 55 FAIL Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (0.75) should be [translateX(275px) rotate(90deg)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 275 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 275 , 0 ) " 56 FAIL Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (1) should be [translateX(300px) rotate(90deg)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 300 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 300 , 0 ) " 57 FAIL Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (1.5) should be [translateX(350px) rotate(90deg)] assert_equals: expected "matrix ( 0 , 1 , - 1 , 0 , 350 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 350 , 0 ) " 51 PASS Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (-0.5) should be [translateX(150px) rotate(90deg)] 52 PASS Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (0) should be [translateX(200px) rotate(90deg)] 53 PASS Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (0.25) should be [translateX(225px) rotate(90deg)] 54 PASS Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (0.5) should be [translateX(250px) rotate(90deg)] 55 PASS Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (0.75) should be [translateX(275px) rotate(90deg)] 56 PASS Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (1) should be [translateX(300px) rotate(90deg)] 57 PASS Compositing: property <transform> underlying [translateX(100px) rotate(90deg)] from accumulate [translateX(100px)] to accumulate [translateX(200px)] at (1.5) should be [translateX(350px) rotate(90deg)] 58 58 -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/accumulation-per-property-002-expected.txt
r287924 r289599 179 179 PASS transform: scale 180 180 PASS transform: skew 181 FAIL transform: rotate on translate assert_approx_equals: expected matrix(0, 1, -1, 0, 100, 0) but got matrix(0, 1, -1, 0, 0, 0): The value should be matrix(0, 1, -1, 0, 100, 0) at 0ms but got matrix(0, 1, -1, 0, 0, 0) expected 100 +/- 0.0001 but got 0 182 FAIL transform: translate on rotate assert_approx_equals: expected matrix(0, 1, -1, 0, 100, 0) but got matrix(1, 0, 0, 1, 100, 0): The value should be matrix(0, 1, -1, 0, 100, 0) at 0ms but got matrix(1, 0, 0, 1, 100, 0) expected 0 +/- 0.0001 but got 1 181 PASS transform: rotate on translate 182 PASS transform: translate on rotate 183 183 PASS transform: rotate and translate on rotate 184 184 PASS transform: rotate on rotate and translate 185 FAIL transform: matrix assert_approx_equals: expected matrix(0, 1, -1, 0, 100, 0) but got matrix(1, 0, 0, 1, 100, 0): The value should be matrix(0, 1, -1, 0, 100, 0) at 0ms but got matrix(1, 0, 0, 1, 100, 0) expected 0 +/- 0.0001 but got 1 185 PASS transform: matrix 186 186 PASS transform: rotate3d 187 FAIL transform: matrix3d assert_approx_equals: expected matrix3d(0.853553, 0.146447, 0.5, 0, 0.146447, 0.853553, -0.5, 0, -0.5, 0.5, 0.707107, 0, 0, 0, 0, 1) but got matrix3d(0.5, 0.5, 0.707107, 0, 0.5, 0.5, -0.707107, 0, -0.707107, 0.707107, 0, 0, 0, 0, 0, 1): The value should be matrix3d(0.853553, 0.146447, 0.5, 0, 0.146447, 0.853553, -0.5, 0, -0.5, 0.5, 0.707107, 0, 0, 0, 0, 1) at 0ms but got matrix3d(0.5, 0.5, 0.707107, 0, 0.5, 0.5, -0.707107, 0, -0.707107, 0.707107, 0, 0, 0, 0, 0, 1) expected 0.853553 +/- 0.0001 but got 0.5 188 FAIL transform: none assert_equals: dimension of the matrix: The value should be matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1) at 0ms but got matrix(1, 0, 0, 1, 0, 0) expected 16 but got 6 187 PASS transform: matrix3d 188 PASS transform: none 189 189 PASS transform: non-invertible matrices (non-invertible onto invertible) 190 190 PASS transform: non-invertible matrices (invertible onto non-invertible) 191 FAIL transform: non-invertible matrices in matched transform lists (non-invertible onto invertible) assert_approx_equals: expected matrix(-1, -1, 0, 0, 100, 100) but got matrix(0, 0, 1, 1, 150, 100): The value should be matrix(-1, -1, 0, 0, 100, 100) at 0ms but got matrix(0, 0, 1, 1, 150, 100) expected -1 +/- 0.0001 but got 0 192 FAIL transform: non-invertible matrices in matched transform lists (invertible onto non-invertible) assert_approx_equals: expected matrix(0, -1, 1, 0, 250, 0) but got matrix(0, 1, -1, 0, 350, 0): The value should be matrix(0, -1, 1, 0, 250, 0) at 0ms but got matrix(0, 1, -1, 0, 350, 0) expected -1 +/- 0.0001 but got 1 193 FAIL transform: non-invertible matrices in mismatched transform lists (non-invertible onto invertible) assert_approx_equals: expected matrix(1, 1, 1, 1, 100, 100) but got matrix(1, 1, 1, 1, 150, 100): The value should be matrix(1, 1, 1, 1, 100, 100) at 0ms but got matrix(1, 1, 1, 1, 150, 100) expected 100 +/- 0.0001 but got 150 194 FAIL transform: non-invertible matrices in mismatched transform lists (invertible onto non-invertible) assert_approx_equals: expected matrix(-2, 0, 0, -2, 250, 0) but got matrix(-2, 0, 0, -2, 350, 0): The value should be matrix(-2, 0, 0, -2, 250, 0) at 0ms but got matrix(-2, 0, 0, -2, 350, 0) expected 250 +/- 0.0001 but got 350 191 PASS transform: non-invertible matrices in matched transform lists (non-invertible onto invertible) 192 PASS transform: non-invertible matrices in matched transform lists (invertible onto non-invertible) 193 PASS transform: non-invertible matrices in mismatched transform lists (non-invertible onto invertible) 194 PASS transform: non-invertible matrices in mismatched transform lists (invertible onto non-invertible) 195 195 PASS transform-box (type: discrete) has testAccumulation function 196 196 PASS transform-box: "border-box" onto "fill-box" -
trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/combining-effects/effect-composition-expected.txt
r289454 r289599 2 2 PASS accumulate onto the base value 3 3 PASS accumulate onto an underlying animation value 4 FAIL accumulate onto an underlying animation value with implicit from values assert_equals: Animated style at 50% expected "matrix(1, 0, 0, 1, 50, 50)" but got "matrix(1, 0, 0, 1, 25, 50)" 5 FAIL accumulate onto an underlying animation value with implicit to values assert_equals: Animated style at 50% expected "matrix(1, 0, 0, 1, 50, 50)" but got "matrix(1, 0, 0, 1, 25, 50)" 4 PASS accumulate onto an underlying animation value with implicit from values 5 PASS accumulate onto an underlying animation value with implicit to values 6 6 PASS Composite when mixing accumulate and replace 7 7 PASS accumulate specified on a keyframe overrides the composite mode of the effect -
trunk/Source/WebCore/ChangeLog
r289598 r289599 1 2022-02-10 Nikolaos Mouchtaris <nmouchtaris@apple.com> 2 3 Web animations- Composite operation accumulation support for transform properties 4 https://bugs.webkit.org/show_bug.cgi?id=236116 5 6 Reviewed by Simon Fraser. 7 8 This patch brings further support for accumulation on transform properties. The main aspect being addressed 9 is handling accumulation of TransformationMatrices. This involves accumulating on the decomposed functions, 10 which occurs in blendFloat() and accumulateQuaternion(). Since we need to perform accumulation for one-based 11 values on certain decomposed functions, (scale, diagonals of matrices, etc), we set the operation to accumulate 12 only for these cases. 13 14 A couple of bugs introduced by this additional support are also addressed. For a property with a 15 different transform operation than the keyframes given, transformFunctionListsMatch() would return 16 true when it shouldn't. Addressed by checking in blendByMatchingOperations and falling back on matrix 17 interpolation. Another bug is that we need to pass the composite operation to TransformationMatrix blend(). 18 Another bug is that we should to use Replace behavior if either of the transform matrices are 19 non-invertible. 20 21 * animation/CSSPropertyAnimation.cpp: 22 (WebCore::blendFunc): 23 * platform/graphics/transforms/Matrix3DTransformOperation.cpp: 24 (WebCore::createOperation): 25 * platform/graphics/transforms/MatrixTransformOperation.cpp: 26 (WebCore::MatrixTransformOperation::blend): 27 * platform/graphics/transforms/RotateTransformOperation.cpp: 28 (WebCore::RotateTransformOperation::blend): 29 * platform/graphics/transforms/TransformOperations.cpp: 30 (WebCore::TransformOperations::blendByMatchingOperations const): 31 (WebCore::TransformOperations::blendByUsingMatrixInterpolation const): 32 (WebCore::TransformOperations::blend const): 33 * platform/graphics/transforms/TransformOperations.h: 34 (WebCore::TransformOperations::isInvertible const): 35 * platform/graphics/transforms/TransformationMatrix.cpp: 36 (WebCore::blendFloat): 37 (WebCore::TransformationMatrix::blend2): 38 (WebCore::accumulateQuaternion): 39 (WebCore::TransformationMatrix::blend4): 40 (WebCore::TransformationMatrix::blend): 41 1 42 2022-02-10 Antoine Quint <graouts@webkit.org> 2 43 -
trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp
r288964 r289599 171 171 return resultOperations; 172 172 } 173 173 auto boxSize = is<RenderBox>(context.client->renderer()) ? downcast<RenderBox>(*context.client->renderer()).borderBoxRect().size() : LayoutSize(); 174 174 if (context.client->transformFunctionListsMatch()) 175 return to.blendByMatchingOperations(from, context );176 return to.blendByUsingMatrixInterpolation(from, context, is<RenderBox>(context.client->renderer()) ? downcast<RenderBox>(*context.client->renderer()).borderBoxRect().size() : LayoutSize());175 return to.blendByMatchingOperations(from, context, boxSize); 176 return to.blendByUsingMatrixInterpolation(from, context, boxSize); 177 177 } 178 178 -
trunk/Source/WebCore/platform/graphics/transforms/Matrix3DTransformOperation.cpp
r289032 r289599 40 40 static Ref<TransformOperation> createOperation(TransformationMatrix& to, TransformationMatrix& from, const BlendingContext& context) 41 41 { 42 to.blend(from, context.progress );42 to.blend(from, context.progress, context.compositeOperation); 43 43 return Matrix3DTransformOperation::create(to); 44 44 } -
trunk/Source/WebCore/platform/graphics/transforms/MatrixTransformOperation.cpp
r289032 r289599 40 40 { 41 41 auto createOperation = [] (TransformationMatrix& to, TransformationMatrix& from, const BlendingContext& context) { 42 to.blend(from, context.progress );42 to.blend(from, context.progress, context.compositeOperation); 43 43 return MatrixTransformOperation::create(to); 44 44 }; -
trunk/Source/WebCore/platform/graphics/transforms/RotateTransformOperation.cpp
r289032 r289599 40 40 Ref<TransformOperation> RotateTransformOperation::blend(const TransformOperation* from, const BlendingContext& context, bool blendToIdentity) 41 41 { 42 if (blendToIdentity) 42 if (blendToIdentity) { 43 if (context.compositeOperation == CompositeOperation::Accumulate) 44 return RotateTransformOperation::create(m_x, m_y, m_z, m_angle, type()); 43 45 return RotateTransformOperation::create(m_x, m_y, m_z, m_angle - m_angle * context.progress, type()); 44 46 } 45 47 auto outputType = sharedPrimitiveType(from); 46 48 if (!outputType) -
trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.cpp
r289032 r289599 75 75 } 76 76 77 TransformOperations TransformOperations::blendByMatchingOperations(const TransformOperations& from, const BlendingContext& context ) const77 TransformOperations TransformOperations::blendByMatchingOperations(const TransformOperations& from, const BlendingContext& context, const LayoutSize& boxSize) const 78 78 { 79 79 TransformOperations result; 80 80 81 unsigned fromSize = from.operations().size(); 82 unsigned toSize = operations().size(); 83 unsigned size = std::max(fromSize, toSize); 84 for (unsigned i = 0; i < size; i++) { 85 RefPtr<TransformOperation> fromOperation = (i < fromSize) ? from.operations()[i].get() : nullptr; 86 RefPtr<TransformOperation> toOperation = (i < toSize) ? operations()[i].get() : nullptr; 81 unsigned fromOperationCount = from.operations().size(); 82 unsigned toOperationCount = operations().size(); 83 unsigned maxOperationCount = std::max(fromOperationCount, toOperationCount); 84 85 if (context.compositeOperation == CompositeOperation::Accumulate && (!from.isInvertible(boxSize) || !isInvertible(boxSize))) 86 return blendByUsingMatrixInterpolation(from, context, boxSize); 87 88 for (unsigned i = 0; i < maxOperationCount; i++) { 89 RefPtr<TransformOperation> fromOperation = (i < fromOperationCount) ? from.operations()[i].get() : nullptr; 90 RefPtr<TransformOperation> toOperation = (i < toOperationCount) ? operations()[i].get() : nullptr; 91 if (fromOperation && toOperation && !fromOperation->sharedPrimitiveType(toOperation.get())) 92 return blendByUsingMatrixInterpolation(from, context, boxSize); 87 93 RefPtr<TransformOperation> blendedOperation = toOperation ? toOperation->blend(fromOperation.get(), context) : (fromOperation ? RefPtr<TransformOperation>(fromOperation->blend(nullptr, context, true)) : nullptr); 88 94 if (blendedOperation) … … 100 106 } 101 107 102 TransformOperations TransformOperations::blendByUsingMatrixInterpolation(const TransformOperations& from, const BlendingContext& context, const LayoutSize& size) const108 TransformOperations TransformOperations::blendByUsingMatrixInterpolation(const TransformOperations& from, const BlendingContext& context, const LayoutSize& boxSize) const 103 109 { 104 110 TransformOperations result; … … 107 113 TransformationMatrix fromTransform; 108 114 TransformationMatrix toTransform; 109 from.apply(size, fromTransform); 110 apply(size, toTransform); 111 112 toTransform.blend(fromTransform, context.progress); 113 115 from.apply(boxSize, fromTransform); 116 apply(boxSize, toTransform); 117 toTransform.blend(fromTransform, context.progress, context.compositeOperation); 114 118 // Append the result 115 119 result.operations().append(Matrix3DTransformOperation::create(toTransform)); … … 124 128 125 129 if (from.size() && from.operationsMatch(*this)) 126 return blendByMatchingOperations(from, context );130 return blendByMatchingOperations(from, context, size); 127 131 128 132 return blendByUsingMatrixInterpolation(from, context, size); -
trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h
r276141 r289599 85 85 size_t size() const { return m_operations.size(); } 86 86 const TransformOperation* at(size_t index) const { return index < m_operations.size() ? m_operations.at(index).get() : 0; } 87 88 TransformOperations blendByMatchingOperations(const TransformOperations& from, const BlendingContext&) const; 87 bool isInvertible(const LayoutSize& size) const 88 { 89 TransformationMatrix transform; 90 apply(size, transform); 91 return transform.isInvertible(); 92 } 93 94 TransformOperations blendByMatchingOperations(const TransformOperations& from, const BlendingContext&, const LayoutSize&) const; 89 95 TransformOperations blendByUsingMatrixInterpolation(const TransformOperations& from, const BlendingContext&, const LayoutSize&) const; 90 96 TransformOperations blend(const TransformOperations& from, const BlendingContext&, const LayoutSize&) const; -
trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp
r285397 r289599 1638 1638 static inline void blendFloat(double& from, double to, double progress, CompositeOperation compositeOperation) 1639 1639 { 1640 if (compositeOperation == CompositeOperation::Replace) 1640 switch (compositeOperation) { 1641 case CompositeOperation::Replace: 1641 1642 from = from + (to - from) * progress; 1642 else 1643 break; 1644 case CompositeOperation::Accumulate: 1645 from += from + (to - from - 1) * progress; 1646 break; 1647 case CompositeOperation::Add: 1643 1648 from += from + (to - from) * progress; 1649 break; 1650 } 1644 1651 } 1645 1652 … … 1673 1680 toDecomp.angle -= 360; 1674 1681 } 1675 1682 1683 // When compositeOperation is accumulate, if the decomposed function is a 1-based value (for affine matrix these properties are 1684 // m11, m22, scaleX and scaleY), use one based accumulation. Otherwise, use behavior for add. 1685 auto operationForNonOneBasedValues = compositeOperation == CompositeOperation::Accumulate ? CompositeOperation::Add : compositeOperation; 1676 1686 blendFloat(fromDecomp.m11, toDecomp.m11, progress, compositeOperation); 1677 blendFloat(fromDecomp.m12, toDecomp.m12, progress, compositeOperation);1678 blendFloat(fromDecomp.m21, toDecomp.m21, progress, compositeOperation);1687 blendFloat(fromDecomp.m12, toDecomp.m12, progress, operationForNonOneBasedValues); 1688 blendFloat(fromDecomp.m21, toDecomp.m21, progress, operationForNonOneBasedValues); 1679 1689 blendFloat(fromDecomp.m22, toDecomp.m22, progress, compositeOperation); 1680 blendFloat(fromDecomp.translateX, toDecomp.translateX, progress, compositeOperation);1681 blendFloat(fromDecomp.translateY, toDecomp.translateY, progress, compositeOperation);1690 blendFloat(fromDecomp.translateX, toDecomp.translateX, progress, operationForNonOneBasedValues); 1691 blendFloat(fromDecomp.translateY, toDecomp.translateY, progress, operationForNonOneBasedValues); 1682 1692 blendFloat(fromDecomp.scaleX, toDecomp.scaleX, progress, compositeOperation); 1683 1693 blendFloat(fromDecomp.scaleY, toDecomp.scaleY, progress, compositeOperation); 1684 blendFloat(fromDecomp.angle, toDecomp.angle, progress, compositeOperation); 1685 1694 blendFloat(fromDecomp.angle, toDecomp.angle, progress, operationForNonOneBasedValues); 1686 1695 recompose2(fromDecomp); 1687 1696 } 1688 1697 1698 // Compute quaternion multiplication 1699 static void accumulateQuaternion(double qa[4], const double qb[4]) 1700 { 1701 auto qx = (qb[3] * qa[0]) + (qb[0] * qa[3]) + (qb[1] * qa[2]) - (qb[2] * qa[1]); 1702 auto qy = (qb[3] * qa[1]) + (qb[1] * qa[3]) + (qb[2] * qa[0]) - (qb[0] * qa[2]); 1703 auto qz = (qb[3] * qa[2]) + (qb[2] * qa[3]) + (qb[0] * qa[1]) - (qb[1] * qa[0]); 1704 auto qw = (qb[3] * qa[3]) - (qb[0] * qa[0]) - (qb[1] * qa[1]) - (qb[2] * qa[2]); 1705 qa[0] = qx; qa[1] = qy; qa[2] = qz; qa[3] = qw; 1706 } 1707 1708 static void interpolateQuaternion(TransformationMatrix::Decomposed4Type& fromDecomp, TransformationMatrix::Decomposed4Type& toDecomp, double progress, CompositeOperation compositeOperation) 1709 { 1710 double qa[4] = { fromDecomp.quaternionX, fromDecomp.quaternionY, fromDecomp.quaternionZ, fromDecomp.quaternionW }; 1711 double qb[4] = { toDecomp.quaternionX, toDecomp.quaternionY, toDecomp.quaternionZ, toDecomp.quaternionW }; 1712 if (compositeOperation == CompositeOperation::Accumulate) 1713 accumulateQuaternion(qa, qb); 1714 else 1715 slerp(qa, qb, progress); 1716 fromDecomp.quaternionX = qa[0]; 1717 fromDecomp.quaternionY = qa[1]; 1718 fromDecomp.quaternionZ = qa[2]; 1719 fromDecomp.quaternionW = qa[3]; 1720 1721 } 1689 1722 void TransformationMatrix::blend4(const TransformationMatrix& from, double progress, CompositeOperation compositeOperation) 1690 1723 { … … 1696 1729 return; 1697 1730 } 1731 1732 // When compositeOperation is accumulate, if the decomposed function is a 1-based value (for non-affine matrix these properties are 1733 // scaleX, scaleY, scaleZ, and perspectiveW), use one based accumulation. Otherwise, use behavior for add. 1734 auto operationForNonOneBasedValues = compositeOperation == CompositeOperation::Accumulate ? CompositeOperation::Add : compositeOperation; 1698 1735 1699 1736 blendFloat(fromDecomp.scaleX, toDecomp.scaleX, progress, compositeOperation); 1700 1737 blendFloat(fromDecomp.scaleY, toDecomp.scaleY, progress, compositeOperation); 1701 1738 blendFloat(fromDecomp.scaleZ, toDecomp.scaleZ, progress, compositeOperation); 1702 blendFloat(fromDecomp.skewXY, toDecomp.skewXY, progress, compositeOperation);1703 blendFloat(fromDecomp.skewXZ, toDecomp.skewXZ, progress, compositeOperation);1704 blendFloat(fromDecomp.skewYZ, toDecomp.skewYZ, progress, compositeOperation);1705 blendFloat(fromDecomp.translateX, toDecomp.translateX, progress, compositeOperation);1706 blendFloat(fromDecomp.translateY, toDecomp.translateY, progress, compositeOperation);1707 blendFloat(fromDecomp.translateZ, toDecomp.translateZ, progress, compositeOperation);1708 blendFloat(fromDecomp.perspectiveX, toDecomp.perspectiveX, progress, compositeOperation);1709 blendFloat(fromDecomp.perspectiveY, toDecomp.perspectiveY, progress, compositeOperation);1710 blendFloat(fromDecomp.perspectiveZ, toDecomp.perspectiveZ, progress, compositeOperation);1739 blendFloat(fromDecomp.skewXY, toDecomp.skewXY, progress, operationForNonOneBasedValues); 1740 blendFloat(fromDecomp.skewXZ, toDecomp.skewXZ, progress, operationForNonOneBasedValues); 1741 blendFloat(fromDecomp.skewYZ, toDecomp.skewYZ, progress, operationForNonOneBasedValues); 1742 blendFloat(fromDecomp.translateX, toDecomp.translateX, progress, operationForNonOneBasedValues); 1743 blendFloat(fromDecomp.translateY, toDecomp.translateY, progress, operationForNonOneBasedValues); 1744 blendFloat(fromDecomp.translateZ, toDecomp.translateZ, progress, operationForNonOneBasedValues); 1745 blendFloat(fromDecomp.perspectiveX, toDecomp.perspectiveX, progress, operationForNonOneBasedValues); 1746 blendFloat(fromDecomp.perspectiveY, toDecomp.perspectiveY, progress, operationForNonOneBasedValues); 1747 blendFloat(fromDecomp.perspectiveZ, toDecomp.perspectiveZ, progress, operationForNonOneBasedValues); 1711 1748 blendFloat(fromDecomp.perspectiveW, toDecomp.perspectiveW, progress, compositeOperation); 1712 1713 slerp(&fromDecomp.quaternionX, &toDecomp.quaternionX, progress); 1749 interpolateQuaternion(fromDecomp, toDecomp, progress, compositeOperation); 1714 1750 1715 1751 recompose4(fromDecomp); … … 1718 1754 void TransformationMatrix::blend(const TransformationMatrix& from, double progress, CompositeOperation compositeOperation) 1719 1755 { 1756 if (compositeOperation == CompositeOperation::Accumulate && (!from.isInvertible() || !isInvertible())) 1757 compositeOperation = CompositeOperation::Replace; 1758 1720 1759 if (!progress && compositeOperation == CompositeOperation::Replace) { 1721 1760 *this = from;
Note: See TracChangeset
for help on using the changeset viewer.