Changeset 290667 in webkit
- Timestamp:
- Mar 1, 2022, 12:01:25 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt (modified) (2 diffs)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-composition-expected.txt (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-004-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/animation/CSSPropertyAnimation.cpp (modified) (1 diff)
-
Source/WebCore/animation/CSSPropertyBlendingClient.h (modified) (2 diffs)
-
Source/WebCore/animation/KeyframeEffect.cpp (modified) (2 diffs)
-
Source/WebCore/animation/KeyframeEffect.h (modified) (2 diffs)
-
Source/WebCore/platform/graphics/GraphicsLayer.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/GraphicsLayer.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (modified) (5 diffs)
-
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (modified) (1 diff)
-
Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.cpp (modified) (7 diffs)
-
Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.h (modified) (2 diffs)
-
Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (modified) (1 diff)
-
Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp (modified) (3 diffs)
-
Source/WebCore/platform/graphics/transforms/TransformOperations.cpp (modified) (4 diffs)
-
Source/WebCore/platform/graphics/transforms/TransformOperations.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r290662 r290667 1 2022-03-01 Martin Robinson <mrobinson@webkit.org> 2 3 When interpolating between transform lists partial prefix matches should not use matrix interpolation 4 https://bugs.webkit.org/show_bug.cgi?id=235757 5 <rdar://problem/88477922> 6 7 Reviewed by Dean Jackson. 8 9 * web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt: Mark subtests as passing. 10 * web-platform-tests/css/css-transforms/animation/transform-composition-expected.txt: Ditto. 11 * web-platform-tests/css/css-transforms/animation/transform-interpolation-004-expected.txt: Ditto. 12 1 13 2022-03-01 Antoine Quint <graouts@webkit.org> 2 14 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt
r289732 r290667 44 44 PASS CSS Animations: property <transform> from [rotate3d(1, 0, 0, 360deg) translateX(100px)] to [rotate3d(0, 1, 0, -720deg) translateY(200px)] at (0.25) should be [rotate3d(0, 0, 1, 0deg) translate(75px, 50px)] 45 45 PASS Web Animations: property <transform> from [rotate3d(1, 0, 0, 360deg) translateX(100px)] to [rotate3d(0, 1, 0, -720deg) translateY(200px)] at (0.25) should be [rotate3d(0, 0, 1, 0deg) translate(75px, 50px)] 46 FAIL CSS Transitions: property <transform> from [rotate(0deg) translate(100px)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)] assert_equals: expected "matrix ( - 1.25 , 0 , 0 , - 1.25 , - 175 , 0 ) " but got "matrix ( 1.25 , 0 , 0 , 1.25 , 175 , 0 ) " 47 FAIL CSS Transitions with transition: all: property <transform> from [rotate(0deg) translate(100px)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)] assert_equals: expected "matrix ( - 1.25 , 0 , 0 , - 1.25 , - 175 , 0 ) " but got "matrix ( 1.25 , 0 , 0 , 1.25 , 175 , 0 ) " 48 FAIL CSS Animations: property <transform> from [rotate(0deg) translate(100px)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)] assert_equals: expected "matrix ( - 1.25 , 0 , 0 , - 1.25 , - 175 , 0 ) " but got "matrix ( 1.25 , 0 , 0 , 1.25 , 175 , 0 ) " 49 FAIL Web Animations: property <transform> from [rotate(0deg) translate(100px)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)] assert_equals: expected "matrix ( - 1.25 , 0 , 0 , - 1.25 , - 175 , 0 ) " but got "matrix ( 1.25 , 0 , 0 , 1.25 , 175 , 0 ) " 46 PASS CSS Transitions: property <transform> from [rotate(0deg) translate(100px)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)] 47 PASS CSS Transitions with transition: all: property <transform> from [rotate(0deg) translate(100px)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)] 48 PASS CSS Animations: property <transform> from [rotate(0deg) translate(100px)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)] 49 PASS Web Animations: property <transform> from [rotate(0deg) translate(100px)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1.25, 175, 0)] 50 50 PASS CSS Transitions: property <transform> from [scale(2) rotate(0deg) translate(100px)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [matrix(2, 0, 0, 2, 250, 0)] 51 51 PASS CSS Transitions with transition: all: property <transform> from [scale(2) rotate(0deg) translate(100px)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [matrix(2, 0, 0, 2, 250, 0)] … … 56 56 PASS CSS Animations: property <transform> from [scale(2) rotate(0deg)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [matrix(2, 0, 0, 2, 100, 0)] 57 57 PASS Web Animations: property <transform> from [scale(2) rotate(0deg)] to [rotate(720deg) scale(2) translate(200px)] at (0.25) should be [matrix(2, 0, 0, 2, 100, 0)] 58 FAIL CSS Transitions: property <transform> from [rotate(0deg) scaleX(1)] to [rotate(720deg) translateX(0px) scaleX(2)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1, 0, 0)] assert_equals: expected "matrix ( - 1.25 , 0 , 0 , - 1 , 0 , 0 ) " but got "matrix ( 1.25 , 0 , 0 , 1 , 0 , 0 ) " 59 FAIL CSS Transitions with transition: all: property <transform> from [rotate(0deg) scaleX(1)] to [rotate(720deg) translateX(0px) scaleX(2)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1, 0, 0)] assert_equals: expected "matrix ( - 1.25 , 0 , 0 , - 1 , 0 , 0 ) " but got "matrix ( 1.25 , 0 , 0 , 1 , 0 , 0 ) " 60 FAIL CSS Animations: property <transform> from [rotate(0deg) scaleX(1)] to [rotate(720deg) translateX(0px) scaleX(2)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1, 0, 0)] assert_equals: expected "matrix ( - 1.25 , 0 , 0 , - 1 , 0 , 0 ) " but got "matrix ( 1.25 , 0 , 0 , 1 , 0 , 0 ) " 61 FAIL Web Animations: property <transform> from [rotate(0deg) scaleX(1)] to [rotate(720deg) translateX(0px) scaleX(2)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1, 0, 0)] assert_equals: expected "matrix ( - 1.25 , 0 , 0 , - 1 , 0 , 0 ) " but got "matrix ( 1.25 , 0 , 0 , 1 , 0 , 0 ) " 62 FAIL CSS Transitions: property <transform> from [rotate(720deg) translateX(0px) scaleX(2)] to [rotate(0deg) scaleX(1)] at (0.25) should be [rotate(540deg) matrix(1.75, 0, 0, 1, 0, 0)] assert_equals: expected "matrix ( - 1.75 , 0 , 0 , - 1 , 0 , 0 ) " but got "matrix ( 1.75 , 0 , 0 , 1 , 0 , 0 ) " 63 FAIL CSS Transitions with transition: all: property <transform> from [rotate(720deg) translateX(0px) scaleX(2)] to [rotate(0deg) scaleX(1)] at (0.25) should be [rotate(540deg) matrix(1.75, 0, 0, 1, 0, 0)] assert_equals: expected "matrix ( - 1.75 , 0 , 0 , - 1 , 0 , 0 ) " but got "matrix ( 1.75 , 0 , 0 , 1 , 0 , 0 ) " 64 FAIL CSS Animations: property <transform> from [rotate(720deg) translateX(0px) scaleX(2)] to [rotate(0deg) scaleX(1)] at (0.25) should be [rotate(540deg) matrix(1.75, 0, 0, 1, 0, 0)] assert_equals: expected "matrix ( - 1.75 , 0 , 0 , - 1 , 0 , 0 ) " but got "matrix ( 1.75 , 0 , 0 , 1 , 0 , 0 ) " 65 FAIL Web Animations: property <transform> from [rotate(720deg) translateX(0px) scaleX(2)] to [rotate(0deg) scaleX(1)] at (0.25) should be [rotate(540deg) matrix(1.75, 0, 0, 1, 0, 0)] assert_equals: expected "matrix ( - 1.75 , 0 , 0 , - 1 , 0 , 0 ) " but got "matrix ( 1.75 , 0 , 0 , 1 , 0 , 0 ) " 66 FAIL CSS Transitions: property <transform> from [scaleX(-3) scaleY(2)] to [scaleY(-3) translateX(0px) scaleX(2)] at (0.25) should be [scale(-2, 0) matrix(1.25, 0, 0, 1.75, 0, 0)] assert_equals: expected "matrix ( - 2.5 , 0 , 0 , 0 , 0 , 0 ) " but got "matrix ( - 1.94 , - 1.94 , - 1.59 , 1.59 , 0 , 0 ) " 67 FAIL CSS Transitions with transition: all: property <transform> from [scaleX(-3) scaleY(2)] to [scaleY(-3) translateX(0px) scaleX(2)] at (0.25) should be [scale(-2, 0) matrix(1.25, 0, 0, 1.75, 0, 0)] assert_equals: expected "matrix ( - 2.5 , 0 , 0 , 0 , 0 , 0 ) " but got "matrix ( - 1.94 , - 1.94 , - 1.59 , 1.59 , 0 , 0 ) " 68 FAIL CSS Animations: property <transform> from [scaleX(-3) scaleY(2)] to [scaleY(-3) translateX(0px) scaleX(2)] at (0.25) should be [scale(-2, 0) matrix(1.25, 0, 0, 1.75, 0, 0)] assert_equals: expected "matrix ( - 2.5 , 0 , 0 , 0 , 0 , 0 ) " but got "matrix ( - 1.94 , - 1.94 , - 1.59 , 1.59 , 0 , 0 ) " 69 FAIL Web Animations: property <transform> from [scaleX(-3) scaleY(2)] to [scaleY(-3) translateX(0px) scaleX(2)] at (0.25) should be [scale(-2, 0) matrix(1.25, 0, 0, 1.75, 0, 0)] assert_equals: expected "matrix ( - 2.5 , 0 , 0 , 0 , 0 , 0 ) " but got "matrix ( - 1.94 , - 1.94 , - 1.59 , 1.59 , 0 , 0 ) " 70 FAIL CSS Transitions: property <transform> from [scaleY(-3) translateX(0px) scaleX(2)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1.75, 0, 0, 1.25, 0, 0)] assert_equals: expected "matrix ( 0 , 0 , 0 , - 2.5 , 0 , 0 ) " but got "matrix ( 1.59 , 1.59 , 1.94 , - 1.94 , 0 , 0 ) " 71 FAIL CSS Transitions with transition: all: property <transform> from [scaleY(-3) translateX(0px) scaleX(2)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1.75, 0, 0, 1.25, 0, 0)] assert_equals: expected "matrix ( 0 , 0 , 0 , - 2.5 , 0 , 0 ) " but got "matrix ( 1.59 , 1.59 , 1.94 , - 1.94 , 0 , 0 ) " 72 FAIL CSS Animations: property <transform> from [scaleY(-3) translateX(0px) scaleX(2)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1.75, 0, 0, 1.25, 0, 0)] assert_equals: expected "matrix ( 0 , 0 , 0 , - 2.5 , 0 , 0 ) " but got "matrix ( 1.59 , 1.59 , 1.94 , - 1.94 , 0 , 0 ) " 73 FAIL Web Animations: property <transform> from [scaleY(-3) translateX(0px) scaleX(2)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1.75, 0, 0, 1.25, 0, 0)] assert_equals: expected "matrix ( 0 , 0 , 0 , - 2.5 , 0 , 0 ) " but got "matrix ( 1.59 , 1.59 , 1.94 , - 1.94 , 0 , 0 ) " 74 FAIL CSS Transitions: property <transform> from [scaleY(-3) translateX(0px)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1, 0, 0, 1.25, 0, 0)] assert_equals: expected "matrix ( 0 , 0 , 0 , - 2.5 , 0 , 0 ) " but got "matrix ( 1.06 , 1.06 , 1.94 , - 1.94 , 0 , 0 ) " 75 FAIL CSS Transitions with transition: all: property <transform> from [scaleY(-3) translateX(0px)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1, 0, 0, 1.25, 0, 0)] assert_equals: expected "matrix ( 0 , 0 , 0 , - 2.5 , 0 , 0 ) " but got "matrix ( 1.06 , 1.06 , 1.94 , - 1.94 , 0 , 0 ) " 76 FAIL CSS Animations: property <transform> from [scaleY(-3) translateX(0px)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1, 0, 0, 1.25, 0, 0)] assert_equals: expected "matrix ( 0 , 0 , 0 , - 2.5 , 0 , 0 ) " but got "matrix ( 1.06 , 1.06 , 1.94 , - 1.94 , 0 , 0 ) " 77 FAIL Web Animations: property <transform> from [scaleY(-3) translateX(0px)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1, 0, 0, 1.25, 0, 0)] assert_equals: expected "matrix ( 0 , 0 , 0 , - 2.5 , 0 , 0 ) " but got "matrix ( 1.06 , 1.06 , 1.94 , - 1.94 , 0 , 0 ) " 58 PASS CSS Transitions: property <transform> from [rotate(0deg) scaleX(1)] to [rotate(720deg) translateX(0px) scaleX(2)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1, 0, 0)] 59 PASS CSS Transitions with transition: all: property <transform> from [rotate(0deg) scaleX(1)] to [rotate(720deg) translateX(0px) scaleX(2)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1, 0, 0)] 60 PASS CSS Animations: property <transform> from [rotate(0deg) scaleX(1)] to [rotate(720deg) translateX(0px) scaleX(2)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1, 0, 0)] 61 PASS Web Animations: property <transform> from [rotate(0deg) scaleX(1)] to [rotate(720deg) translateX(0px) scaleX(2)] at (0.25) should be [rotate(180deg) matrix(1.25, 0, 0, 1, 0, 0)] 62 PASS CSS Transitions: property <transform> from [rotate(720deg) translateX(0px) scaleX(2)] to [rotate(0deg) scaleX(1)] at (0.25) should be [rotate(540deg) matrix(1.75, 0, 0, 1, 0, 0)] 63 PASS CSS Transitions with transition: all: property <transform> from [rotate(720deg) translateX(0px) scaleX(2)] to [rotate(0deg) scaleX(1)] at (0.25) should be [rotate(540deg) matrix(1.75, 0, 0, 1, 0, 0)] 64 PASS CSS Animations: property <transform> from [rotate(720deg) translateX(0px) scaleX(2)] to [rotate(0deg) scaleX(1)] at (0.25) should be [rotate(540deg) matrix(1.75, 0, 0, 1, 0, 0)] 65 PASS Web Animations: property <transform> from [rotate(720deg) translateX(0px) scaleX(2)] to [rotate(0deg) scaleX(1)] at (0.25) should be [rotate(540deg) matrix(1.75, 0, 0, 1, 0, 0)] 66 PASS CSS Transitions: property <transform> from [scaleX(-3) scaleY(2)] to [scaleY(-3) translateX(0px) scaleX(2)] at (0.25) should be [scale(-2, 0) matrix(1.25, 0, 0, 1.75, 0, 0)] 67 PASS CSS Transitions with transition: all: property <transform> from [scaleX(-3) scaleY(2)] to [scaleY(-3) translateX(0px) scaleX(2)] at (0.25) should be [scale(-2, 0) matrix(1.25, 0, 0, 1.75, 0, 0)] 68 PASS CSS Animations: property <transform> from [scaleX(-3) scaleY(2)] to [scaleY(-3) translateX(0px) scaleX(2)] at (0.25) should be [scale(-2, 0) matrix(1.25, 0, 0, 1.75, 0, 0)] 69 PASS Web Animations: property <transform> from [scaleX(-3) scaleY(2)] to [scaleY(-3) translateX(0px) scaleX(2)] at (0.25) should be [scale(-2, 0) matrix(1.25, 0, 0, 1.75, 0, 0)] 70 PASS CSS Transitions: property <transform> from [scaleY(-3) translateX(0px) scaleX(2)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1.75, 0, 0, 1.25, 0, 0)] 71 PASS CSS Transitions with transition: all: property <transform> from [scaleY(-3) translateX(0px) scaleX(2)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1.75, 0, 0, 1.25, 0, 0)] 72 PASS CSS Animations: property <transform> from [scaleY(-3) translateX(0px) scaleX(2)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1.75, 0, 0, 1.25, 0, 0)] 73 PASS Web Animations: property <transform> from [scaleY(-3) translateX(0px) scaleX(2)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1.75, 0, 0, 1.25, 0, 0)] 74 PASS CSS Transitions: property <transform> from [scaleY(-3) translateX(0px)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1, 0, 0, 1.25, 0, 0)] 75 PASS CSS Transitions with transition: all: property <transform> from [scaleY(-3) translateX(0px)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1, 0, 0, 1.25, 0, 0)] 76 PASS CSS Animations: property <transform> from [scaleY(-3) translateX(0px)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1, 0, 0, 1.25, 0, 0)] 77 PASS Web Animations: property <transform> from [scaleY(-3) translateX(0px)] to [scaleX(-3) scaleY(2)] at (0.25) should be [scale(0, -2) matrix(1, 0, 0, 1.25, 0, 0)] 78 78 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-composition-expected.txt
r285631 r290667 1 1 2 FAIL Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (-0.5) should be [rotateX(50deg) rotateY(50deg) translate(-40px, -80px)] assert_equals: expected "matrix3d ( 0.64 , 0.59 , - 0.49 , 0 , 0 , 0.64 , 0.77 , 0 , 0.77 , - 0.49 , 0.41 , 0 , - 25.71 , - 74.9 , - 41.59 , 1 ) " but got "matrix3d ( 0.18 , 0.86 , - 0.47 , 0 , 0.76 , 0.18 , 0.63 , 0 , 0.63 , - 0.47 , - 0.62 , 0 , 49.08 , 106.27 , 87.41 , 1 ) " 2 PASS Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (-0.5) should be [rotateX(50deg) rotateY(50deg) translate(-40px, -80px)] 3 3 PASS Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (0) should be [rotateX(100deg) rotateY(100deg) translate(10px, 20px)] 4 FAIL Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (0.25) should be [rotateX(125deg) rotateY(125deg) translate(35px, 70px)] assert_equals: expected "matrix3d ( - 0.57 , 0.67 , 0.47 , 0 , 0 , - 0.57 , 0.82 , 0 , 0.82 , 0.47 , 0.33 , 0 , - 20.08 , - 16.66 , 73.79 , 1 ) " but got "matrix3d ( - 0.5 , 0.81 , 0.31 , 0 , - 0.3 , - 0.5 , 0.81 , 0 , 0.81 , 0.31 , 0.49 , 0 , - 27.14 , - 43.8 , - 11.59 , 1 ) " 5 FAIL Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (0.5) should be [rotateX(150deg) rotateY(150deg) translate(60px, 120px)] assert_equals: expected "matrix3d ( - 0.87 , 0.25 , 0.43 , 0 , 0 , - 0.87 , 0.5 , 0 , 0.5 , 0.43 , 0.75 , 0 , - 51.96 , - 88.92 , 85.98 , 1 ) " but got "matrix3d ( - 0.79 , 0.56 , 0.25 , 0 , - 0.42 , - 0.79 , 0.45 , 0 , 0.45 , 0.25 , 0.85 , 0 , - 52.55 , - 93.82 , - 44.6 , 1 ) " 6 FAIL Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (0.75) should be [rotateX(175deg) rotateY(175deg) translate(85px, 170px)] assert_equals: expected "matrix3d ( - 1 , 0.01 , 0.09 , 0 , 0 , - 1 , 0.09 , 0 , 0.09 , 0.09 , 0.99 , 0 , - 84.68 , - 168.71 , 22.2 , 1 ) " but got "matrix3d ( - 0.95 , 0.3 , 0.02 , 0 , - 0.3 , - 0.95 , 0.02 , 0 , 0.02 , 0.02 , 1 , 0 , - 77.96 , - 143.84 , - 77.6 , 1 ) " 4 PASS Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (0.25) should be [rotateX(125deg) rotateY(125deg) translate(35px, 70px)] 5 PASS Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (0.5) should be [rotateX(150deg) rotateY(150deg) translate(60px, 120px)] 6 PASS Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (0.75) should be [rotateX(175deg) rotateY(175deg) translate(85px, 170px)] 7 7 PASS Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (1) should be [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] 8 FAIL Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (1.5) should be [rotateX(250deg) rotateY(250deg) translate(160px, 320px)] assert_equals: expected "matrix3d ( - 0.34 , 0.88 , - 0.32 , 0 , 0 , - 0.34 , - 0.94 , 0 , - 0.94 , - 0.32 , 0.12 , 0 , - 54.72 , 31.84 , - 352.12 , 1 ) " but got "matrix3d ( - 0.45 , 0.16 , - 0.88 , 0 , 0.76 , - 0.45 , - 0.47 , 0 , - 0.47 , - 0.88 , 0.08 , 0 , - 154.18 , - 293.91 , - 176.6 , 1 ) " 8 PASS Compositing: property <transform> underlying [rotateX(100deg) rotateY(100deg)] from add [translate(10px, 20px)] to replace [rotateX(200deg) rotateY(200deg) translate(110px, 220px)] at (1.5) should be [rotateX(250deg) rotateY(250deg) translate(160px, 320px)] 9 9 PASS Compositing: property <transform> underlying [rotateX(45deg)] from add [none] to add [rotateY(360deg)] at (-0.5) should be [rotateX(45deg) rotateY(-180deg)] 10 10 PASS Compositing: property <transform> underlying [rotateX(45deg)] from add [none] to add [rotateY(360deg)] at (0) should be [rotateX(45deg) rotateY(0deg)] -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-004-expected.txt
r267650 r290667 216 216 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [scaleY(2) skewX(2rad) perspective(500px)] at (1) should be [matrix3d(1, 0, 0, 0, -2.185039863261519, 2, 0, 0, 0, 0, 1, -0.002, 0, 0, 0, 1)] 217 217 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [scaleY(2) skewX(2rad) perspective(500px)] at (2) should be [matrix3d(1, 0, 0, 0, -11.227342763749263, 3, 0, 0, 0.021237113402061854, -0.010618556701030927, 1.03, -0.0014653608247422677, -8, 4, -12, 0.9861443298969074)] 218 FAIL CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (-1) should be [translate3d(12px, 4px, 16px) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.003, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.04 , - 0.01 , 0.95 , 0 , 12 , 4 , 16 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.03 , 0 , 0.96 , 0 , 12 , 4 , 16 , 1 ) " 218 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (-1) should be [translate3d(12px, 4px, 16px) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.003, 0, 0, 0, 1)] 219 219 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0) should be [translate3d(8px, -4px, 12px) matrix3d(1, 0, 0, 0, 1.55741, 1, 0, 0, 0, 0, 1, -0.0025, 0, 0, 0, 1)] 220 220 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0.25) should be [translate3d(7px, -6px, 11px) matrix3d(1, 0, 0, 0, 1.46007, 1.25, 0, 0, 0, 0, 1, -0.002375, 0, 0, 0, 1)] 221 221 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0.75) should be [translate3d(5px, -10px, 9px) matrix3d(1, 0, 0, 0, 0.681366, 1.75, 0, 0, 0, 0, 1, -0.002125, 0, 0, 0, 1)] 222 222 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (1) should be [translate3d(4px, -12px, 8px) matrix3d(1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, -0.002, 0, 0, 0, 1)] 223 FAIL CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (2) should be [translate3d(0px, -20px, 4px) matrix3d(1, 0, 0, 0, -4.67222, 3, 0, 0, 0, 0, 1, -0.0015, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.67 , 3 , 0 , 0 , 0 , 0.03 , 0.99 , 0 , 0 , - 20 , 4 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 4.67 , 3 , 0 , 0 , 0 , 0.04 , 1 , 0 , 0 , - 20 , 4 , 1 ) " 224 FAIL CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (-1) should be [translate3d(12px, 4px, 16px) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.003, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.04 , - 0.01 , 0.95 , 0 , 12 , 4 , 16 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.03 , 0 , 0.96 , 0 , 12 , 4 , 16 , 1 ) " 223 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (2) should be [translate3d(0px, -20px, 4px) matrix3d(1, 0, 0, 0, -4.67222, 3, 0, 0, 0, 0, 1, -0.0015, 0, 0, 0, 1)] 224 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (-1) should be [translate3d(12px, 4px, 16px) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.003, 0, 0, 0, 1)] 225 225 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0) should be [translate3d(8px, -4px, 12px) matrix3d(1, 0, 0, 0, 1.55741, 1, 0, 0, 0, 0, 1, -0.0025, 0, 0, 0, 1)] 226 226 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0.25) should be [translate3d(7px, -6px, 11px) matrix3d(1, 0, 0, 0, 1.46007, 1.25, 0, 0, 0, 0, 1, -0.002375, 0, 0, 0, 1)] 227 227 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0.75) should be [translate3d(5px, -10px, 9px) matrix3d(1, 0, 0, 0, 0.681366, 1.75, 0, 0, 0, 0, 1, -0.002125, 0, 0, 0, 1)] 228 228 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (1) should be [translate3d(4px, -12px, 8px) matrix3d(1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, -0.002, 0, 0, 0, 1)] 229 FAIL CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (2) should be [translate3d(0px, -20px, 4px) matrix3d(1, 0, 0, 0, -4.67222, 3, 0, 0, 0, 0, 1, -0.0015, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.67 , 3 , 0 , 0 , 0 , 0.03 , 0.99 , 0 , 0 , - 20 , 4 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 4.67 , 3 , 0 , 0 , 0 , 0.04 , 1 , 0 , 0 , - 20 , 4 , 1 ) " 230 FAIL CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (-1) should be [translate3d(12px, 4px, 16px) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.003, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.04 , - 0.01 , 0.95 , 0 , 12 , 4 , 16 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.03 , 0 , 0.96 , 0 , 12 , 4 , 16 , 1 ) " 229 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (2) should be [translate3d(0px, -20px, 4px) matrix3d(1, 0, 0, 0, -4.67222, 3, 0, 0, 0, 0, 1, -0.0015, 0, 0, 0, 1)] 230 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (-1) should be [translate3d(12px, 4px, 16px) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.003, 0, 0, 0, 1)] 231 231 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0) should be [translate3d(8px, -4px, 12px) matrix3d(1, 0, 0, 0, 1.55741, 1, 0, 0, 0, 0, 1, -0.0025, 0, 0, 0, 1)] 232 232 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0.25) should be [translate3d(7px, -6px, 11px) matrix3d(1, 0, 0, 0, 1.46007, 1.25, 0, 0, 0, 0, 1, -0.002375, 0, 0, 0, 1)] 233 233 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0.75) should be [translate3d(5px, -10px, 9px) matrix3d(1, 0, 0, 0, 0.681366, 1.75, 0, 0, 0, 0, 1, -0.002125, 0, 0, 0, 1)] 234 234 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (1) should be [translate3d(4px, -12px, 8px) matrix3d(1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, -0.002, 0, 0, 0, 1)] 235 FAIL CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (2) should be [translate3d(0px, -20px, 4px) matrix3d(1, 0, 0, 0, -4.67222, 3, 0, 0, 0, 0, 1, -0.0015, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.67 , 3 , 0 , 0 , 0 , 0.03 , 0.99 , 0 , 0 , - 20 , 4 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 4.67 , 3 , 0 , 0 , 0 , 0.04 , 1 , 0 , 0 , - 20 , 4 , 1 ) " 236 FAIL Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (-1) should be [translate3d(12px, 4px, 16px) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.003, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.04 , - 0.01 , 0.95 , 0 , 12 , 4 , 16 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.03 , 0 , 0.96 , 0 , 12 , 4 , 16 , 1 ) " 235 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (2) should be [translate3d(0px, -20px, 4px) matrix3d(1, 0, 0, 0, -4.67222, 3, 0, 0, 0, 0, 1, -0.0015, 0, 0, 0, 1)] 236 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (-1) should be [translate3d(12px, 4px, 16px) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.003, 0, 0, 0, 1)] 237 237 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0) should be [translate3d(8px, -4px, 12px) matrix3d(1, 0, 0, 0, 1.55741, 1, 0, 0, 0, 0, 1, -0.0025, 0, 0, 0, 1)] 238 238 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0.25) should be [translate3d(7px, -6px, 11px) matrix3d(1, 0, 0, 0, 1.46007, 1.25, 0, 0, 0, 0, 1, -0.002375, 0, 0, 0, 1)] 239 239 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (0.75) should be [translate3d(5px, -10px, 9px) matrix3d(1, 0, 0, 0, 0.681366, 1.75, 0, 0, 0, 0, 1, -0.002125, 0, 0, 0, 1)] 240 240 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (1) should be [translate3d(4px, -12px, 8px) matrix3d(1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, -0.002, 0, 0, 0, 1)] 241 FAIL Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (2) should be [translate3d(0px, -20px, 4px) matrix3d(1, 0, 0, 0, -4.67222, 3, 0, 0, 0, 0, 1, -0.0015, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.67 , 3 , 0 , 0 , 0 , 0.03 , 0.99 , 0 , 0 , - 20 , 4 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 4.67 , 3 , 0 , 0 , 0 , 0.04 , 1 , 0 , 0 , - 20 , 4 , 1 ) " 242 FAIL CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (-1) should be [translate3d(12px, 4px, 16px) skewX(0rad) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.005, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.06 , - 0.02 , 0.92 , - 0.01 , 12 , 4 , 16 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.04 , 0.02 , 0.94 , 0 , 12 , 4 , 16 , 0.98 ) " 241 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) scaleY(2) perspective(500px)] at (2) should be [translate3d(0px, -20px, 4px) matrix3d(1, 0, 0, 0, -4.67222, 3, 0, 0, 0, 0, 1, -0.0015, 0, 0, 0, 1)] 242 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (-1) should be [translate3d(12px, 4px, 16px) skewX(0rad) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.005, 0, 0, 0, 1)] 243 243 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0) should be [translate3d(8px, -4px, 12px) skewX(1rad) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.0025, 0, 0, 0, 1)] 244 FAIL CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.25) should be [translate3d(7px, -6px, 11px) skewX(1.25rad) matrix3d(1, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 1, -0.001875, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 3.76 , 1.25 , 0 , 0 , - 0.01 , 0.01 , 0.98 , 0 , 7 , - 6 , 11 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0.78 , 1.25 , 0 , 0 , - 0.02 , 0.01 , 0.98 , 0 , 7 , - 6 , 11 , 1 ) " 245 FAIL CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.75) should be [translate3d(5px, -10px, 9px) skewX(1.75rad) matrix3d(1, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 1, -0.000625, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 9.66 , 1.75 , 0 , 0 , 0 , 0.01 , 0.99 , 0 , 5 , - 10 , 9 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 2.19 , 1.75 , 0 , 0 , - 0.01 , 0 , 0.99 , 0 , 5 , - 10 , 9 , 1 ) " 244 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.25) should be [translate3d(7px, -6px, 11px) skewX(1.25rad) matrix3d(1, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 1, -0.001875, 0, 0, 0, 1)] 245 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.75) should be [translate3d(5px, -10px, 9px) skewX(1.75rad) matrix3d(1, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 1, -0.000625, 0, 0, 0, 1)] 246 246 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (1) should be [translate3d(4px, -12px, 8px) skewX(2rad) matrix(1, 0, 0, 2, 0, 0)] 247 FAIL CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (2) should be [translate3d(0px, -20px, 4px) skewX(3rad) matrix3d(1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0.0025, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.43 , 3 , 0 , 0 , 0 , - 0.05 , 1.01 , 0 , 0 , - 20 , 4 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 17.78 , 3 , 0 , 0 , 0.02 , - 0.01 , 1.03 , 0 , 0 , - 20 , 4 , 0.98 ) " 248 FAIL CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (-1) should be [translate3d(12px, 4px, 16px) skewX(0rad) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.005, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.06 , - 0.02 , 0.92 , - 0.01 , 12 , 4 , 16 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.04 , 0.02 , 0.94 , 0 , 12 , 4 , 16 , 0.98 ) " 247 PASS CSS Transitions: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (2) should be [translate3d(0px, -20px, 4px) skewX(3rad) matrix3d(1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0.0025, 0, 0, 0, 1)] 248 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (-1) should be [translate3d(12px, 4px, 16px) skewX(0rad) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.005, 0, 0, 0, 1)] 249 249 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0) should be [translate3d(8px, -4px, 12px) skewX(1rad) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.0025, 0, 0, 0, 1)] 250 FAIL CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.25) should be [translate3d(7px, -6px, 11px) skewX(1.25rad) matrix3d(1, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 1, -0.001875, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 3.76 , 1.25 , 0 , 0 , - 0.01 , 0.01 , 0.98 , 0 , 7 , - 6 , 11 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0.78 , 1.25 , 0 , 0 , - 0.02 , 0.01 , 0.98 , 0 , 7 , - 6 , 11 , 1 ) " 251 FAIL CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.75) should be [translate3d(5px, -10px, 9px) skewX(1.75rad) matrix3d(1, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 1, -0.000625, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 9.66 , 1.75 , 0 , 0 , 0 , 0.01 , 0.99 , 0 , 5 , - 10 , 9 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 2.19 , 1.75 , 0 , 0 , - 0.01 , 0 , 0.99 , 0 , 5 , - 10 , 9 , 1 ) " 250 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.25) should be [translate3d(7px, -6px, 11px) skewX(1.25rad) matrix3d(1, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 1, -0.001875, 0, 0, 0, 1)] 251 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.75) should be [translate3d(5px, -10px, 9px) skewX(1.75rad) matrix3d(1, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 1, -0.000625, 0, 0, 0, 1)] 252 252 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (1) should be [translate3d(4px, -12px, 8px) skewX(2rad) matrix(1, 0, 0, 2, 0, 0)] 253 FAIL CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (2) should be [translate3d(0px, -20px, 4px) skewX(3rad) matrix3d(1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0.0025, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.43 , 3 , 0 , 0 , 0 , - 0.05 , 1.01 , 0 , 0 , - 20 , 4 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 17.78 , 3 , 0 , 0 , 0.02 , - 0.01 , 1.03 , 0 , 0 , - 20 , 4 , 0.98 ) " 254 FAIL CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (-1) should be [translate3d(12px, 4px, 16px) skewX(0rad) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.005, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.06 , - 0.02 , 0.92 , - 0.01 , 12 , 4 , 16 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.04 , 0.02 , 0.94 , 0 , 12 , 4 , 16 , 0.98 ) " 253 PASS CSS Transitions with transition: all: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (2) should be [translate3d(0px, -20px, 4px) skewX(3rad) matrix3d(1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0.0025, 0, 0, 0, 1)] 254 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (-1) should be [translate3d(12px, 4px, 16px) skewX(0rad) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.005, 0, 0, 0, 1)] 255 255 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0) should be [translate3d(8px, -4px, 12px) skewX(1rad) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.0025, 0, 0, 0, 1)] 256 FAIL CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.25) should be [translate3d(7px, -6px, 11px) skewX(1.25rad) matrix3d(1, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 1, -0.001875, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 3.76 , 1.25 , 0 , 0 , - 0.01 , 0.01 , 0.98 , 0 , 7 , - 6 , 11 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0.78 , 1.25 , 0 , 0 , - 0.02 , 0.01 , 0.98 , 0 , 7 , - 6 , 11 , 1 ) " 257 FAIL CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.75) should be [translate3d(5px, -10px, 9px) skewX(1.75rad) matrix3d(1, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 1, -0.000625, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 9.66 , 1.75 , 0 , 0 , 0 , 0.01 , 0.99 , 0 , 5 , - 10 , 9 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 2.19 , 1.75 , 0 , 0 , - 0.01 , 0 , 0.99 , 0 , 5 , - 10 , 9 , 1 ) " 256 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.25) should be [translate3d(7px, -6px, 11px) skewX(1.25rad) matrix3d(1, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 1, -0.001875, 0, 0, 0, 1)] 257 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.75) should be [translate3d(5px, -10px, 9px) skewX(1.75rad) matrix3d(1, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 1, -0.000625, 0, 0, 0, 1)] 258 258 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (1) should be [translate3d(4px, -12px, 8px) skewX(2rad) matrix(1, 0, 0, 2, 0, 0)] 259 FAIL CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (2) should be [translate3d(0px, -20px, 4px) skewX(3rad) matrix3d(1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0.0025, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.43 , 3 , 0 , 0 , 0 , - 0.05 , 1.01 , 0 , 0 , - 20 , 4 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 17.78 , 3 , 0 , 0 , 0.02 , - 0.01 , 1.03 , 0 , 0 , - 20 , 4 , 0.98 ) " 260 FAIL Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (-1) should be [translate3d(12px, 4px, 16px) skewX(0rad) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.005, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.06 , - 0.02 , 0.92 , - 0.01 , 12 , 4 , 16 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , - 0.04 , 0.02 , 0.94 , 0 , 12 , 4 , 16 , 0.98 ) " 259 PASS CSS Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (2) should be [translate3d(0px, -20px, 4px) skewX(3rad) matrix3d(1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0.0025, 0, 0, 0, 1)] 260 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (-1) should be [translate3d(12px, 4px, 16px) skewX(0rad) matrix3d(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -0.005, 0, 0, 0, 1)] 261 261 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0) should be [translate3d(8px, -4px, 12px) skewX(1rad) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.0025, 0, 0, 0, 1)] 262 FAIL Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.25) should be [translate3d(7px, -6px, 11px) skewX(1.25rad) matrix3d(1, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 1, -0.001875, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 3.76 , 1.25 , 0 , 0 , - 0.01 , 0.01 , 0.98 , 0 , 7 , - 6 , 11 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 0.78 , 1.25 , 0 , 0 , - 0.02 , 0.01 , 0.98 , 0 , 7 , - 6 , 11 , 1 ) " 263 FAIL Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.75) should be [translate3d(5px, -10px, 9px) skewX(1.75rad) matrix3d(1, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 1, -0.000625, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 9.66 , 1.75 , 0 , 0 , 0 , 0.01 , 0.99 , 0 , 5 , - 10 , 9 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 2.19 , 1.75 , 0 , 0 , - 0.01 , 0 , 0.99 , 0 , 5 , - 10 , 9 , 1 ) " 262 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.25) should be [translate3d(7px, -6px, 11px) skewX(1.25rad) matrix3d(1, 0, 0, 0, 0, 1.25, 0, 0, 0, 0, 1, -0.001875, 0, 0, 0, 1)] 263 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (0.75) should be [translate3d(5px, -10px, 9px) skewX(1.75rad) matrix3d(1, 0, 0, 0, 0, 1.75, 0, 0, 0, 0, 1, -0.000625, 0, 0, 0, 1)] 264 264 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (1) should be [translate3d(4px, -12px, 8px) skewX(2rad) matrix(1, 0, 0, 2, 0, 0)] 265 FAIL Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (2) should be [translate3d(0px, -20px, 4px) skewX(3rad) matrix3d(1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0.0025, 0, 0, 0, 1)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.43 , 3 , 0 , 0 , 0 , - 0.05 , 1.01 , 0 , 0 , - 20 , 4 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 17.78 , 3 , 0 , 0 , 0.02 , - 0.01 , 1.03 , 0 , 0 , - 20 , 4 , 0.98 ) " 265 PASS Web Animations: property <transform> from [translate3d(8px, -4px, 12px) skewX(1rad) perspective(400px)] to [translate3d(4px, -12px, 8px) skewX(2rad) scaleY(2)] at (2) should be [translate3d(0px, -20px, 4px) skewX(3rad) matrix3d(1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1, 0.0025, 0, 0, 0, 1)] 266 266 PASS CSS Transitions: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (-1) should be [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 200, 400, 600, 1)] 267 267 PASS CSS Transitions: property <transform> from [translate3D(100px, 200px, 300px)] to [none] at (0) should be [matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 100, 200, 300, 1)] -
trunk/Source/WebCore/ChangeLog
r290663 r290667 1 2022-03-01 Martin Robinson <mrobinson@webkit.org> 2 3 When interpolating between transform lists partial prefix matches should not use matrix interpolation 4 https://bugs.webkit.org/show_bug.cgi?id=235757 5 <rdar://problem/88477922> 6 7 Reviewed by Dean Jackson. 8 9 No new tests. This is covered by existing WPT tests. 10 11 When interpolation between keyframes in transform animations, interpolate prefixes of 12 compatible transform functions directly. For instance if there are three keyframes: 13 14 1. transform: rotateX(...) translateY(...) skew(...) 15 2. transform: rotateY(...) translateY(...) 16 3. transform: rotateZ(...) translateZ(...) matrix3d(...) 17 18 There will be a directly interpolated rotation animation, a directly interpolated 19 translation animation, and finally a matrix animation for the remaining functions. 20 This is important for preserving transforms (such as full rotations) that are lost 21 during matrix decompose and recompose operations. 22 23 This change adds a new helper class SharedPrimitivesPrefix which is used to calculate 24 the prefix of shared primitives that are shared between keyframes. 25 26 Currently, the Core Animation backend only supports animation transformation primitives 27 across the entire animation, so shared primitive prefixes must span the entire animation 28 if an animation is accelerated. In the case that an animation is rendered in software, 29 this prefix can simply be between the current next and previous keyframes. 30 31 TransformOperations::blend is extended to blend any two TransformationOperations, which 32 makes it the only blend function necessary for software animations, computed CSS values, 33 and for the Nicosia backend, simplifying the interpolation code path. 34 35 * animation/CSSPropertyAnimation.cpp: 36 (WebCore::blendFunc): 37 * animation/CSSPropertyBlendingClient.h: 38 * animation/KeyframeEffect.cpp: 39 (WebCore::KeyframeEffect::checkForMatchingTransformFunctionLists): 40 (WebCore::KeyframeEffect::computeExtentOfTransformAnimation const): 41 * animation/KeyframeEffect.h: 42 * platform/graphics/GraphicsLayer.cpp: 43 (WebCore::operationsAt): Deleted. 44 (WebCore::GraphicsLayer::getSharedPrimitivesForTransformKeyframes): Deleted. 45 * platform/graphics/GraphicsLayer.h: 46 * platform/graphics/ca/GraphicsLayerCA.cpp: 47 (WebCore::GraphicsLayerCA::appendToUncommittedAnimations): 48 (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes): 49 (WebCore::GraphicsLayerCA::setTransformAnimationKeyframes): 50 * platform/graphics/ca/GraphicsLayerCA.h: 51 * platform/graphics/nicosia/NicosiaAnimation.cpp: 52 (Nicosia::applyTransformAnimation): 53 (Nicosia::Animation::Animation): 54 (Nicosia::Animation::operator=): 55 (Nicosia::Animation::applyInternal): 56 * platform/graphics/nicosia/NicosiaAnimation.h: 57 * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp: 58 (WebCore::GraphicsLayerTextureMapper::addAnimation): 59 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp: 60 (WebCore::CoordinatedGraphicsLayer::addAnimation): 61 * platform/graphics/transforms/TransformOperations.cpp: 62 (WebCore::SharedPrimitivesPrefix::update): 63 (WebCore::TransformOperations::blend const): 64 (WebCore::TransformOperations::createBlendedMatrixOperationFromOperationsSuffix const): 65 (WebCore::TransformOperations::operationsMatch const): Deleted. 66 (WebCore::TransformOperations::updateSharedPrimitives const): Deleted. 67 (WebCore::TransformOperations::blendByMatchingOperations const): Deleted. 68 (WebCore::TransformOperations::blendByUsingMatrixInterpolation const): Deleted. 69 * platform/graphics/transforms/TransformOperations.h: 70 (WebCore::TransformOperations::apply const): 71 (WebCore::SharedPrimitivesPrefix::hadIncompatibleTransformFunctions): 72 (WebCore::SharedPrimitivesPrefix::primitives): 73 1 74 2022-03-01 Commit Queue <commit-queue@webkit.org> 2 75 -
trunk/Source/WebCore/animation/CSSPropertyAnimation.cpp
r290329 r290667 170 170 } 171 171 auto boxSize = is<RenderBox>(context.client->renderer()) ? downcast<RenderBox>(*context.client->renderer()).borderBoxRect().size() : LayoutSize(); 172 if (context.client->transformFunctionListsMatch()) 173 return to.blendByMatchingOperations(from, context, boxSize); 174 return to.blendByUsingMatrixInterpolation(from, context, boxSize); 172 return to.blend(from, context, boxSize, context.client->transformFunctionListPrefix()); 175 173 } 176 174 -
trunk/Source/WebCore/animation/CSSPropertyBlendingClient.h
r252554 r290667 26 26 #pragma once 27 27 28 #include <optional> 29 28 30 namespace WebCore { 29 31 … … 37 39 virtual const RenderStyle& currentStyle() const = 0; 38 40 virtual bool filterFunctionListsMatch() const = 0; 39 virtual bool transformFunctionListsMatch() const = 0;41 virtual std::optional<unsigned> transformFunctionListPrefix() const = 0; 40 42 #if ENABLE(FILTERS_LEVEL_2) 41 43 virtual bool backdropFilterFunctionListsMatch() const = 0; -
trunk/Source/WebCore/animation/KeyframeEffect.cpp
r290662 r290667 914 914 void KeyframeEffect::checkForMatchingTransformFunctionLists() 915 915 { 916 m_transformFunctionListsMatch = false; 917 918 if (m_blendingKeyframes.size() < 2 || !m_blendingKeyframes.containsProperty(CSSPropertyTransform)) 919 return; 920 921 Vector<TransformOperation::OperationType> sharedPrimitives; 922 sharedPrimitives.reserveInitialCapacity(m_blendingKeyframes[0].style()->transform().operations().size()); 923 924 for (const auto& keyframe : m_blendingKeyframes) { 925 if (!keyframe.style()->transform().updateSharedPrimitives(sharedPrimitives)) 926 return; 927 } 928 929 m_transformFunctionListsMatch = true; 916 if (m_blendingKeyframes.size() < 2 || !m_blendingKeyframes.containsProperty(CSSPropertyTransform)) { 917 m_transformFunctionListsMatchPrefix = 0; 918 return; 919 } 920 921 SharedPrimitivesPrefix prefix; 922 for (const auto& keyframe : m_blendingKeyframes) 923 prefix.update(keyframe.style()->transform()); 924 925 m_transformFunctionListsMatchPrefix = prefix.primitives().size(); 930 926 } 931 927 … … 1942 1938 1943 1939 bool canCompute; 1944 if (transformFunctionList sMatch())1940 if (transformFunctionListPrefix() > 0) 1945 1941 canCompute = computeTransformedExtentViaTransformList(rendererBox, *style, keyframeBounds); 1946 1942 else -
trunk/Source/WebCore/animation/KeyframeEffect.h
r289598 r290667 141 141 142 142 bool filterFunctionListsMatch() const override { return m_filterFunctionListsMatch; } 143 bool transformFunctionListsMatch() const override { return m_transformFunctionListsMatch; } 143 144 // The CoreAnimation animation code can only use direct function interpolation when all keyframes share the same 145 // prefix of shared transform function primitives, whereas software animations simply calls blend(...) which can do 146 // direct interpolation based on the function list of any two particular keyframes. The prefix serves as a way to 147 // make sure that the results of blend(...) can be made to return the same results as rendered by the hardware 148 // animation code. 149 std::optional<unsigned> transformFunctionListPrefix() const override { return (!preventsAcceleration()) ? std::optional<unsigned>(m_transformFunctionListsMatchPrefix) : std::nullopt; } 150 144 151 #if ENABLE(FILTERS_LEVEL_2) 145 152 bool backdropFilterFunctionListsMatch() const override { return m_backdropFilterFunctionListsMatch; } … … 242 249 bool m_needsForcedLayout { false }; 243 250 bool m_triggersStackingContext { false }; 244 bool m_transformFunctionListsMatch { false};251 size_t m_transformFunctionListsMatchPrefix { 0 }; 245 252 bool m_filterFunctionListsMatch { false }; 246 253 #if ENABLE(FILTERS_LEVEL_2) -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r290545 r290667 712 712 } 713 713 714 static inline const TransformOperations& operationsAt(const KeyframeValueList& valueList, size_t index)715 {716 return static_cast<const TransformAnimationValue&>(valueList.at(index)).value();717 }718 719 // A sequence of keyframes with a list of transforms can be represented without matrix interpolation720 // if each transform is compatible with all other transforms at the same index in other keyframes.721 // Two transforms are compatible if they share a primitive defined by the CSS Transforms Level 2722 // specification. For instance, the shared primitive of a translateX and translate3D operation is723 // TransformOperation::TRANSLATE_3D. This function returns true if the TransformOperations in each724 // keyframe share a primitive operation type and stores the compatible OperationTypes in725 // sharedPrimitives. If the keyframes do not share a list of compatible primitives, false is726 // returned.727 bool GraphicsLayer::getSharedPrimitivesForTransformKeyframes(const KeyframeValueList& valueList, Vector<TransformOperation::OperationType>& sharedPrimitives)728 {729 ASSERT(animatedPropertyIsTransformOrRelated(valueList.property()));730 731 if (valueList.size() < 2)732 return false;733 734 sharedPrimitives.clear();735 sharedPrimitives.reserveInitialCapacity(operationsAt(valueList, 0).size());736 737 for (size_t i = 0; i < valueList.size(); ++i) {738 if (!operationsAt(valueList, i).updateSharedPrimitives(sharedPrimitives))739 return false;740 }741 742 return true;743 }744 745 714 double GraphicsLayer::backingStoreMemoryEstimate() const 746 715 { -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r290545 r290667 668 668 static int validateFilterOperations(const KeyframeValueList&); 669 669 670 // Given a list of TransformAnimationValues keyframes, place a list of primitive operations which can671 // represent the transform functions of every keyframe in the sharedPrimitives out parameter and return672 // true. If the keyframes do not share compatible functions, return false.673 static bool getSharedPrimitivesForTransformKeyframes(const KeyframeValueList&, Vector<TransformOperation::OperationType>& sharedPrimitives);674 675 670 virtual bool shouldRepaintOnSizeChange() const { return drawsContent(); } 676 671 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r290575 r290667 3459 3459 } 3460 3460 3461 bool GraphicsLayerCA::appendToUncommittedAnimations(const KeyframeValueList& valueList, const Vector<TransformOperation::OperationType>& operations, const Animation* animation, const String& animationName, const FloatSize& boxSize, unsigned animationIndex, Seconds timeOffset, bool isMatrixAnimation, bool keyframesShouldUseAnimationWideTimingFunction) 3462 { 3463 // If function lists don't match we do a matrix animation, otherwise we do a component hardware animation. 3464 auto transformOp = isMatrixAnimation ? TransformOperation::MATRIX_3D : operations[animationIndex]; 3465 3461 bool GraphicsLayerCA::appendToUncommittedAnimations(const KeyframeValueList& valueList, TransformOperation::OperationType operationType, const Animation* animation, const String& animationName, const FloatSize& boxSize, unsigned animationIndex, Seconds timeOffset, bool isMatrixAnimation, bool keyframesShouldUseAnimationWideTimingFunction) 3462 { 3466 3463 RefPtr<PlatformCAAnimation> caAnimation; 3467 3464 bool validMatrices = true; 3468 3465 if (isKeyframe(valueList)) { 3469 3466 caAnimation = createKeyframeAnimation(animation, propertyIdToString(valueList.property()), false, keyframesShouldUseAnimationWideTimingFunction); 3470 validMatrices = setTransformAnimationKeyframes(valueList, animation, caAnimation.get(), animationIndex, transformOp, isMatrixAnimation, boxSize, keyframesShouldUseAnimationWideTimingFunction);3467 validMatrices = setTransformAnimationKeyframes(valueList, animation, caAnimation.get(), animationIndex, operationType, isMatrixAnimation, boxSize, keyframesShouldUseAnimationWideTimingFunction); 3471 3468 } else { 3472 3469 if (animation->timingFunction()->isSpringTimingFunction()) … … 3474 3471 else 3475 3472 caAnimation = createBasicAnimation(animation, propertyIdToString(valueList.property()), false, keyframesShouldUseAnimationWideTimingFunction); 3476 validMatrices = setTransformAnimationEndpoints(valueList, animation, caAnimation.get(), animationIndex, transformOp, isMatrixAnimation, boxSize);3473 validMatrices = setTransformAnimationEndpoints(valueList, animation, caAnimation.get(), animationIndex, operationType, isMatrixAnimation, boxSize); 3477 3474 } 3478 3475 … … 3488 3485 ASSERT(animatedPropertyIsTransformOrRelated(valueList.property())); 3489 3486 3490 Vector<TransformOperation::OperationType> sharedPrimitives; 3491 bool isMatrixAnimation = !getSharedPrimitivesForTransformKeyframes(valueList, sharedPrimitives); 3492 unsigned numOperations = !isMatrixAnimation ? sharedPrimitives.size() : 1; 3493 3494 bool validMatrices = true; 3495 for (unsigned animationIndex = 0; animationIndex < numOperations; ++animationIndex) { 3496 if (!appendToUncommittedAnimations(valueList, sharedPrimitives, animation, animationName, boxSize, animationIndex, timeOffset, isMatrixAnimation, keyframesShouldUseAnimationWideTimingFunction)) { 3497 validMatrices = false; 3498 break; 3499 } 3500 } 3501 3502 return validMatrices; 3487 // https://www.w3.org/TR/css-transforms-1/#interpolation-of-transforms 3488 // In the CSS Transform Level 1 and 2 Specification some transform functions can share a compatible transform 3489 // function primitive. For instance, the shared primitive of a translateX and translate3D operation is 3490 // TransformOperation::TRANSLATE_3D. When the transform function list of every keyframe in an animation 3491 // shares the same transform function primitive, we should interpolate between them without resorting 3492 // to matrix decomposition. The remaining parts of the transform function list should be interpolated 3493 // using matrix decomposition. The code below finds the shared primitives in this prefix. 3494 // FIXME: Currently, this only supports situations where every keyframe shares the same prefix of shared 3495 // transformation primitives, but the specification says direct interpolation should be determined by 3496 // the primitives shared between any two adjacent keyframes. 3497 SharedPrimitivesPrefix prefix; 3498 for (size_t i = 0; i < valueList.size(); ++i) 3499 prefix.update(static_cast<const TransformAnimationValue&>(valueList.at(i)).value()); 3500 3501 const auto& primitives = prefix.primitives(); 3502 unsigned numberOfSharedPrimitives = valueList.size() > 1 ? primitives.size() : 0; 3503 for (unsigned animationIndex = 0; animationIndex < numberOfSharedPrimitives; ++animationIndex) { 3504 if (!appendToUncommittedAnimations(valueList, primitives[animationIndex], animation, animationName, boxSize, animationIndex, timeOffset, false /* isMatrixAnimation */, keyframesShouldUseAnimationWideTimingFunction)) 3505 return false; 3506 } 3507 3508 if (!prefix.hadIncompatibleTransformFunctions()) 3509 return true; 3510 3511 // If there were any incompatible transform functions, they will be appended to the animation list 3512 // as a single combined transformation matrix animation. 3513 return appendToUncommittedAnimations(valueList, TransformOperation::MATRIX_3D, animation, animationName, boxSize, primitives.size(), timeOffset, true /* isMatrixAnimation */, keyframesShouldUseAnimationWideTimingFunction); 3503 3514 } 3504 3515 … … 3779 3790 keyTimes.append(forwards ? curValue.keyTime() : (1 - curValue.keyTime())); 3780 3791 3781 TransformationMatrix transform;3782 3783 3792 if (isMatrixAnimation) { 3784 curValue.value().apply(boxSize, transform); 3793 TransformationMatrix transform; 3794 curValue.value().apply(functionIndex, boxSize, transform); 3785 3795 3786 3796 // If any matrix is singular, CA won't animate it correctly. So fall back to software animation … … 3804 3814 transformationMatrixValues.append(value); 3805 3815 } 3806 3807 curValue.value().apply(boxSize, transform);3808 3816 } 3809 3817 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r289032 r290667 531 531 } 532 532 533 bool appendToUncommittedAnimations(const KeyframeValueList&, const Vector<TransformOperation::OperationType>& operations, const Animation*, const String& animationName, const FloatSize& boxSize, unsigned animationIndex, Seconds timeOffset, bool isMatrixAnimation, bool keyframesShouldUseAnimationWideTimingFunction);533 bool appendToUncommittedAnimations(const KeyframeValueList&, const TransformOperation::OperationType, const Animation*, const String& animationName, const FloatSize& boxSize, unsigned animationIndex, Seconds timeOffset, bool isMatrixAnimation, bool keyframesShouldUseAnimationWideTimingFunction); 534 534 bool appendToUncommittedAnimations(const KeyframeValueList&, const FilterOperation*, const Animation*, const String& animationName, int animationIndex, Seconds timeOffset, bool keyframesShouldUseAnimationWideTimingFunction); 535 535 -
trunk/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.cpp
r282751 r290667 110 110 } 111 111 112 static TransformationMatrix applyTransformAnimation(const TransformOperations& from, const TransformOperations& to, double progress, const FloatSize& boxSize , bool listsMatch)112 static TransformationMatrix applyTransformAnimation(const TransformOperations& from, const TransformOperations& to, double progress, const FloatSize& boxSize) 113 113 { 114 114 TransformationMatrix matrix; … … 126 126 } 127 127 128 // If we have incompatible operation lists, we blend the resulting matrices. 129 if (!listsMatch) { 130 TransformationMatrix fromMatrix; 131 to.apply(boxSize, matrix); 132 from.apply(boxSize, fromMatrix); 133 matrix.blend(fromMatrix, progress); 134 return matrix; 135 } 136 137 // Animation to "-webkit-transform: none". 138 if (!to.size()) { 139 TransformOperations blended(from); 140 for (auto& operation : blended.operations()) 141 operation->blend(nullptr, progress, true)->apply(matrix, boxSize); 142 return matrix; 143 } 144 145 // Animation from "-webkit-transform: none". 146 if (!from.size()) { 147 TransformOperations blended(to); 148 for (auto& operation : blended.operations()) 149 operation->blend(nullptr, 1 - progress, true)->apply(matrix, boxSize); 150 return matrix; 151 } 152 153 // Normal animation with a matching operation list. 154 TransformOperations blended(to); 155 for (size_t i = 0; i < blended.operations().size(); ++i) 156 blended.operations()[i]->blend(from.at(i), progress, !from.at(i))->apply(matrix, boxSize); 128 to.blend(from, progress, LayoutSize { boxSize }).apply(boxSize, matrix); 157 129 return matrix; 158 130 } … … 167 139 } 168 140 169 Animation::Animation(const String& name, const KeyframeValueList& keyframes, const FloatSize& boxSize, const WebCore::Animation& animation, bool listsMatch,MonotonicTime startTime, Seconds pauseTime, AnimationState state)141 Animation::Animation(const String& name, const KeyframeValueList& keyframes, const FloatSize& boxSize, const WebCore::Animation& animation, MonotonicTime startTime, Seconds pauseTime, AnimationState state) 170 142 : m_name(name.isSafeToSendToAnotherThread() ? name : name.isolatedCopy()) 171 143 , m_keyframes(keyframes) … … 176 148 , m_direction(animation.direction()) 177 149 , m_fillsForwards(animation.fillsForwards()) 178 , m_listsMatch(listsMatch)179 150 , m_startTime(startTime) 180 151 , m_pauseTime(pauseTime) … … 194 165 , m_direction(other.m_direction) 195 166 , m_fillsForwards(other.m_fillsForwards) 196 , m_listsMatch(other.m_listsMatch)197 167 , m_startTime(other.m_startTime) 198 168 , m_pauseTime(other.m_pauseTime) … … 213 183 m_direction = other.m_direction; 214 184 m_fillsForwards = other.m_fillsForwards; 215 m_listsMatch = other.m_listsMatch;216 185 m_startTime = other.m_startTime; 217 186 m_pauseTime = other.m_pauseTime; … … 312 281 switch (m_keyframes.property()) { 313 282 case AnimatedPropertyTransform: 314 applicationResults.transform = applyTransformAnimation(static_cast<const TransformAnimationValue&>(from).value(), static_cast<const TransformAnimationValue&>(to).value(), progress, m_boxSize , m_listsMatch);283 applicationResults.transform = applyTransformAnimation(static_cast<const TransformAnimationValue&>(from).value(), static_cast<const TransformAnimationValue&>(to).value(), progress, m_boxSize); 315 284 return; 316 285 case AnimatedPropertyOpacity: -
trunk/Source/WebCore/platform/graphics/nicosia/NicosiaAnimation.h
r278253 r290667 43 43 : m_keyframes(WebCore::AnimatedPropertyInvalid) 44 44 { } 45 Animation(const String&, const WebCore::KeyframeValueList&, const WebCore::FloatSize&, const WebCore::Animation&, bool,MonotonicTime, Seconds, AnimationState);45 Animation(const String&, const WebCore::KeyframeValueList&, const WebCore::FloatSize&, const WebCore::Animation&, MonotonicTime, Seconds, AnimationState); 46 46 47 47 WEBCORE_EXPORT Animation(const Animation&); … … 72 72 WebCore::Animation::AnimationDirection m_direction; 73 73 bool m_fillsForwards; 74 bool m_listsMatch;75 74 MonotonicTime m_startTime; 76 75 Seconds m_pauseTime; -
trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp
r289032 r290667 612 612 } 613 613 614 bool listsMatch = false;615 if (valueList.property() == AnimatedPropertyTransform) {616 Vector<TransformOperation::OperationType> unusedOperations;617 listsMatch = !!getSharedPrimitivesForTransformKeyframes(valueList, unusedOperations);618 }619 620 614 const MonotonicTime currentTime = MonotonicTime::now(); 621 m_animations.add(Nicosia::Animation(keyframesName, valueList, boxSize, *anim, listsMatch,currentTime - Seconds(timeOffset), 0_s, Nicosia::Animation::AnimationState::Playing));615 m_animations.add(Nicosia::Animation(keyframesName, valueList, boxSize, *anim, currentTime - Seconds(timeOffset), 0_s, Nicosia::Animation::AnimationState::Playing)); 622 616 // m_animationStartTime is the time of the first real frame of animation, now or delayed by a negative offset. 623 617 if (Seconds(timeOffset) > 0_s) -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
r290575 r290667 1400 1400 return false; 1401 1401 1402 bool listsMatch = false;1403 1402 switch (valueList.property()) { 1404 1403 #if ENABLE(FILTERS_LEVEL_2) … … 1415 1414 break; 1416 1415 } 1417 case AnimatedPropertyTransform: {1418 Vector<TransformOperation::OperationType> unusedOperations;1419 listsMatch = !!getSharedPrimitivesForTransformKeyframes(valueList, unusedOperations);1420 break;1421 }1422 1416 case AnimatedPropertyOpacity: 1417 case AnimatedPropertyTransform: 1423 1418 break; 1424 1419 default: … … 1427 1422 1428 1423 m_lastAnimationStartTime = MonotonicTime::now() - Seconds(delayAsNegativeTimeOffset); 1429 m_animations.add(Nicosia::Animation(keyframesName, valueList, boxSize, *anim, listsMatch,m_lastAnimationStartTime, 0_s, Nicosia::Animation::AnimationState::Playing));1424 m_animations.add(Nicosia::Animation(keyframesName, valueList, boxSize, *anim, m_lastAnimationStartTime, 0_s, Nicosia::Animation::AnimationState::Playing)); 1430 1425 m_animationStartedTimer.startOneShot(0_s); 1431 1426 didChangeAnimations(); -
trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.cpp
r289862 r290667 51 51 } 52 52 53 bool TransformOperations::operationsMatch(const TransformOperations& other) const 53 void SharedPrimitivesPrefix::update(const TransformOperations& operations) 54 54 { 55 // If functions at the same index don't share a blending primitive, the lists don't match. 56 // When the lists are different sizes, the missing functions in the shorter list are treated 57 // as identity functions. 58 size_t minimumLength = std::min(operations().size(), other.operations().size()); 59 for (size_t i = 0; i < minimumLength; ++i) { 60 if (!operations()[i]->sharedPrimitiveType(other.operations()[i].get())) 61 return false; 62 } 63 return true; 64 } 55 size_t maxIteration = operations.operations().size(); 56 if (m_indexOfFirstMismatch.has_value()) 57 maxIteration = std::min(*m_indexOfFirstMismatch, maxIteration); 65 58 66 bool TransformOperations::updateSharedPrimitives(Vector<TransformOperation::OperationType>& sharedPrimitives) const 67 { 68 for (size_t i = 0; i < operations().size(); ++i) { 69 const auto* operation = at(i); 59 for (size_t i = 0; i < maxIteration; ++i) { 60 const auto* operation = operations.at(i); 70 61 71 62 // If we haven't seen an operation at this index before, we can simply use our primitive type. 72 if (i >= sharedPrimitives.size()) {73 ASSERT(i == sharedPrimitives.size());74 sharedPrimitives.append(operation->primitiveType());63 if (i >= m_primitives.size()) { 64 ASSERT(i == m_primitives.size()); 65 m_primitives.append(operation->primitiveType()); 75 66 continue; 76 67 } 77 68 78 if (auto sharedPrimitive = operation->sharedPrimitiveType( sharedPrimitives[i]))79 sharedPrimitives[i] = *sharedPrimitive;69 if (auto sharedPrimitive = operation->sharedPrimitiveType(m_primitives[i])) 70 m_primitives[i] = *sharedPrimitive; 80 71 else { 81 // FIXME: This should handle prefix matches and then fall back to matrix interpolation for the rest82 // of the list. See: https://bugs.webkit.org/show_bug.cgi?id=23575783 return false;72 m_indexOfFirstMismatch = i; 73 m_primitives.shrink(i); 74 return; 84 75 } 85 76 } 86 87 return true;88 77 } 89 78 … … 102 91 } 103 92 104 TransformOperations TransformOperations::blend ByMatchingOperations(const TransformOperations& from, const BlendingContext& context, const LayoutSize& boxSize) const93 TransformOperations TransformOperations::blend(const TransformOperations& from, const BlendingContext& context, const LayoutSize& boxSize, std::optional<unsigned> prefixLength) const 105 94 { 106 95 TransformOperations result; … … 109 98 unsigned toOperationCount = operations().size(); 110 99 unsigned maxOperationCount = std::max(fromOperationCount, toOperationCount); 111 112 if (shouldFallBackToDiscreteAnimation(from, boxSize)) 113 return blendByUsingMatrixInterpolation(from, context, boxSize); 114 100 101 if (shouldFallBackToDiscreteAnimation(from, boxSize)) { 102 result.operations().append(createBlendedMatrixOperationFromOperationsSuffix(from, 0, context, boxSize)); 103 return result; 104 } 105 115 106 for (unsigned i = 0; i < maxOperationCount; i++) { 116 107 RefPtr<TransformOperation> fromOperation = (i < fromOperationCount) ? from.operations()[i].get() : nullptr; 117 108 RefPtr<TransformOperation> toOperation = (i < toOperationCount) ? operations()[i].get() : nullptr; 118 if (fromOperation && toOperation && !fromOperation->sharedPrimitiveType(toOperation.get())) 119 return blendByUsingMatrixInterpolation(from, context, boxSize); 109 if ((prefixLength && i >= *prefixLength) || (fromOperation && toOperation && !fromOperation->sharedPrimitiveType(toOperation.get()))) { 110 result.operations().append(createBlendedMatrixOperationFromOperationsSuffix(from, i, context, boxSize)); 111 return result; 112 } 120 113 121 114 RefPtr<TransformOperation> blendedOperation; … … 136 129 } 137 130 138 TransformOperations TransformOperations::blendByUsingMatrixInterpolation(const TransformOperations& from, const BlendingContext& context, const LayoutSize& boxSize) const131 RefPtr<TransformOperation> TransformOperations::createBlendedMatrixOperationFromOperationsSuffix(const TransformOperations& from, unsigned start, const BlendingContext& context, const LayoutSize& referenceBoxSize) const 139 132 { 140 TransformOperations result; 133 TransformationMatrix fromTransform; 134 from.apply(start, referenceBoxSize, fromTransform); 135 TransformationMatrix toTransform; 136 apply(start, referenceBoxSize, toTransform); 141 137 142 // Convert the TransformOperations into matrices143 TransformationMatrix fromTransform;144 TransformationMatrix toTransform;145 from.apply(boxSize, fromTransform);146 apply(boxSize, toTransform);147 148 138 auto progress = context.progress; 149 139 auto compositeOperation = context.compositeOperation; 150 if (shouldFallBackToDiscreteAnimation(from, boxSize)) {140 if (shouldFallBackToDiscreteAnimation(from, referenceBoxSize)) { 151 141 progress = progress < 0.5 ? 0 : 1; 152 142 compositeOperation = CompositeOperation::Replace; 153 143 } 144 154 145 toTransform.blend(fromTransform, progress, compositeOperation); 155 // Append the result 156 result.operations().append(Matrix3DTransformOperation::create(toTransform)); 157 158 return result; 159 } 160 161 TransformOperations TransformOperations::blend(const TransformOperations& from, const BlendingContext& context, const LayoutSize& size) const 162 { 163 if (from == *this) 164 return *this; 165 166 if (from.size() && from.operationsMatch(*this)) 167 return blendByMatchingOperations(from, context, size); 168 169 return blendByUsingMatrixInterpolation(from, context, size); 146 return Matrix3DTransformOperation::create(toTransform); 170 147 } 171 148 -
trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h
r289862 r290667 45 45 } 46 46 47 void apply(const FloatSize& sz, TransformationMatrix& t) const 47 void apply(const FloatSize& size, TransformationMatrix& matrix) const { apply(0, size, matrix); } 48 void apply(unsigned start, const FloatSize& size, TransformationMatrix& matrix) const 48 49 { 49 for (unsigned i = 0; i < m_operations.size(); ++i)50 m_operations[i]->apply( t, sz);50 for (unsigned i = start; i < m_operations.size(); ++i) 51 m_operations[i]->apply(matrix, size); 51 52 } 53 52 54 53 55 // Return true if any of the operation types are 3D operation types (even if the … … 78 80 } 79 81 80 bool operationsMatch(const TransformOperations&) const;81 82 // Find a list of transform primitives for the given TransformOperations which are compatible with the primitives83 // stored in sharedPrimitives. The results are written back into sharedPrimitives. This returns false if any element84 // of TransformOperation does not have a shared primitive, otherwise it returns true.85 bool updateSharedPrimitives(Vector<TransformOperation::OperationType>& sharedPrimitives) const;86 87 82 void clear() 88 83 { … … 106 101 bool shouldFallBackToDiscreteAnimation(const TransformOperations&, const LayoutSize&) const; 107 102 108 TransformOperations blendByMatchingOperations(const TransformOperations& from, const BlendingContext&, const LayoutSize&) const; 109 TransformOperations blendByUsingMatrixInterpolation(const TransformOperations& from, const BlendingContext&, const LayoutSize&) const; 110 TransformOperations blend(const TransformOperations& from, const BlendingContext&, const LayoutSize&) const; 103 RefPtr<TransformOperation> createBlendedMatrixOperationFromOperationsSuffix(const TransformOperations& from, unsigned start, const BlendingContext&, const LayoutSize& referenceBoxSize) const; 104 TransformOperations blend(const TransformOperations& from, const BlendingContext&, const LayoutSize&, std::optional<unsigned> prefixLength = std::nullopt) const; 111 105 112 106 private: 113 107 Vector<RefPtr<TransformOperation>> m_operations; 108 }; 109 110 // SharedPrimitivesPrefix is used to find a shared prefix of transform function primitives (as 111 // defined by CSS Transforms Level 1 & 2). Given a series of TransformOperations in the keyframes 112 // of an animation. After update() is called with the TransformOperations of every keyframe, 113 // primitive() will return the prefix of primitives that are shared by all keyframes passed 114 // to update(). 115 class SharedPrimitivesPrefix { 116 public: 117 SharedPrimitivesPrefix() = default; 118 virtual ~SharedPrimitivesPrefix() = default; 119 void update(const TransformOperations&); 120 bool hadIncompatibleTransformFunctions() { return m_indexOfFirstMismatch.has_value(); } 121 const Vector<TransformOperation::OperationType>& primitives() { return m_primitives; } 122 123 private: 124 std::optional<size_t> m_indexOfFirstMismatch; 125 Vector<TransformOperation::OperationType> m_primitives; 114 126 }; 115 127
Note:
See TracChangeset
for help on using the changeset viewer.