Changeset 289732 in webkit


Ignore:
Timestamp:
Feb 14, 2022 6:03:06 AM (5 months ago)
Author:
Martin Robinson
Message:

Animation from "scale()" to "scale() translate()" does not yield the expected result
https://bugs.webkit.org/show_bug.cgi?id=222595
<rdar://problem/74926700>

Reviewed by Simon Fraser.

LayoutTests/imported/w3c:

  • web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt: Mark tests as passing.
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt:
  • web-platform-tests/css/css-transforms/animation/transform-interpolation-003-expected.txt:

Source/WebCore:

No new tests. This is covered by existing WPT tests.

When blending two transform lists, where one list is longer than the other, extending the
shorter list with identity transform functions. This is the behavior specified in the
CSS Transforms Module Level 2 specification.

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::checkForMatchingTransformFunctionLists): Instead of checking each frame
against the first keyframe, collect a list of shared transform primitives and check that each
list has the same number of compatible primitives or a prefix of compatible primitives and is
shorter.

  • platform/graphics/GraphicsLayer.cpp:

(WebCore::GraphicsLayer::getSharedPrimitivesForTransformKeyframes): When the transform operation
lists have different sizes, don't always return false. Instead check that the parts that do exist
have matching primitives.

  • platform/graphics/transforms/TransformOperations.cpp:

(WebCore::TransformOperations::operationsMatch const): Only check the transformations in
the shared list size.
(WebCore::TransformOperations::blendByMatchingOperations const): Properly handle when one of the
two operations is null instead of just the toOperation.

LayoutTests:

  • compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt:
  • compositing/layer-creation/translate-scale-animation-overlap-expected.txt:
Location:
trunk
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r289727 r289732  
     12022-02-14  Martin Robinson  <mrobinson@webkit.org>
     2
     3        Animation from "scale()" to "scale() translate()" does not yield the expected result
     4        https://bugs.webkit.org/show_bug.cgi?id=222595
     5        <rdar://problem/74926700>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt:
     10        * compositing/layer-creation/translate-scale-animation-overlap-expected.txt:
     11
    1122022-02-13  Fujii Hironori  <Hironori.Fujii@sony.com>
    213
  • trunk/LayoutTests/compositing/layer-creation/multiple-keyframes-animation-overlap-expected.txt

    r244800 r289732  
    66      (bounds 800.00 600.00)
    77      (contentsOpaque 1)
    8       (children 783
     8      (children 800
    99        (GraphicsLayer
    1010          (offsetFromRenderer width=-14 height=-14)
     
    1515        )
    1616        (GraphicsLayer
    17           (position 20.00 30.00)
    18           (bounds 4.00 4.00)
    19           (contentsOpaque 1)
    20         )
    21         (GraphicsLayer
    2217          (position 30.00 30.00)
    2318          (bounds 4.00 4.00)
     
    245240        )
    246241        (GraphicsLayer
    247           (position 20.00 40.00)
     242          (position 480.00 30.00)
     243          (bounds 4.00 4.00)
     244          (contentsOpaque 1)
     245        )
     246        (GraphicsLayer
     247          (position 490.00 30.00)
    248248          (bounds 4.00 4.00)
    249249          (contentsOpaque 1)
     
    475475        )
    476476        (GraphicsLayer
    477           (position 20.00 50.00)
     477          (position 480.00 40.00)
     478          (bounds 4.00 4.00)
     479          (contentsOpaque 1)
     480        )
     481        (GraphicsLayer
     482          (position 490.00 40.00)
    478483          (bounds 4.00 4.00)
    479484          (contentsOpaque 1)
     
    705710        )
    706711        (GraphicsLayer
    707           (position 20.00 60.00)
     712          (position 480.00 50.00)
     713          (bounds 4.00 4.00)
     714          (contentsOpaque 1)
     715        )
     716        (GraphicsLayer
     717          (position 490.00 50.00)
    708718          (bounds 4.00 4.00)
    709719          (contentsOpaque 1)
     
    935945        )
    936946        (GraphicsLayer
    937           (position 20.00 70.00)
     947          (position 480.00 60.00)
     948          (bounds 4.00 4.00)
     949          (contentsOpaque 1)
     950        )
     951        (GraphicsLayer
     952          (position 490.00 60.00)
    938953          (bounds 4.00 4.00)
    939954          (contentsOpaque 1)
     
    11651180        )
    11661181        (GraphicsLayer
    1167           (position 20.00 80.00)
     1182          (position 480.00 70.00)
     1183          (bounds 4.00 4.00)
     1184          (contentsOpaque 1)
     1185        )
     1186        (GraphicsLayer
     1187          (position 490.00 70.00)
    11681188          (bounds 4.00 4.00)
    11691189          (contentsOpaque 1)
     
    13951415        )
    13961416        (GraphicsLayer
    1397           (position 20.00 90.00)
     1417          (position 480.00 80.00)
     1418          (bounds 4.00 4.00)
     1419          (contentsOpaque 1)
     1420        )
     1421        (GraphicsLayer
     1422          (position 490.00 80.00)
    13981423          (bounds 4.00 4.00)
    13991424          (contentsOpaque 1)
     
    16251650        )
    16261651        (GraphicsLayer
    1627           (position 20.00 100.00)
     1652          (position 480.00 90.00)
     1653          (bounds 4.00 4.00)
     1654          (contentsOpaque 1)
     1655        )
     1656        (GraphicsLayer
     1657          (position 490.00 90.00)
    16281658          (bounds 4.00 4.00)
    16291659          (contentsOpaque 1)
     
    18551885        )
    18561886        (GraphicsLayer
    1857           (position 20.00 110.00)
     1887          (position 480.00 100.00)
     1888          (bounds 4.00 4.00)
     1889          (contentsOpaque 1)
     1890        )
     1891        (GraphicsLayer
     1892          (position 490.00 100.00)
    18581893          (bounds 4.00 4.00)
    18591894          (contentsOpaque 1)
     
    20852120        )
    20862121        (GraphicsLayer
    2087           (position 20.00 120.00)
     2122          (position 480.00 110.00)
     2123          (bounds 4.00 4.00)
     2124          (contentsOpaque 1)
     2125        )
     2126        (GraphicsLayer
     2127          (position 490.00 110.00)
    20882128          (bounds 4.00 4.00)
    20892129          (contentsOpaque 1)
     
    23152355        )
    23162356        (GraphicsLayer
    2317           (position 20.00 130.00)
     2357          (position 480.00 120.00)
     2358          (bounds 4.00 4.00)
     2359          (contentsOpaque 1)
     2360        )
     2361        (GraphicsLayer
     2362          (position 490.00 120.00)
    23182363          (bounds 4.00 4.00)
    23192364          (contentsOpaque 1)
     
    25452590        )
    25462591        (GraphicsLayer
    2547           (position 20.00 140.00)
     2592          (position 480.00 130.00)
     2593          (bounds 4.00 4.00)
     2594          (contentsOpaque 1)
     2595        )
     2596        (GraphicsLayer
     2597          (position 490.00 130.00)
    25482598          (bounds 4.00 4.00)
    25492599          (contentsOpaque 1)
     
    27752825        )
    27762826        (GraphicsLayer
    2777           (position 20.00 150.00)
     2827          (position 480.00 140.00)
     2828          (bounds 4.00 4.00)
     2829          (contentsOpaque 1)
     2830        )
     2831        (GraphicsLayer
     2832          (position 490.00 140.00)
    27782833          (bounds 4.00 4.00)
    27792834          (contentsOpaque 1)
     
    30053060        )
    30063061        (GraphicsLayer
    3007           (position 20.00 160.00)
     3062          (position 480.00 150.00)
     3063          (bounds 4.00 4.00)
     3064          (contentsOpaque 1)
     3065        )
     3066        (GraphicsLayer
     3067          (position 490.00 150.00)
    30083068          (bounds 4.00 4.00)
    30093069          (contentsOpaque 1)
     
    32353295        )
    32363296        (GraphicsLayer
    3237           (position 20.00 170.00)
     3297          (position 480.00 160.00)
     3298          (bounds 4.00 4.00)
     3299          (contentsOpaque 1)
     3300        )
     3301        (GraphicsLayer
     3302          (position 490.00 160.00)
    32383303          (bounds 4.00 4.00)
    32393304          (contentsOpaque 1)
     
    34653530        )
    34663531        (GraphicsLayer
    3467           (position 20.00 180.00)
     3532          (position 480.00 170.00)
     3533          (bounds 4.00 4.00)
     3534          (contentsOpaque 1)
     3535        )
     3536        (GraphicsLayer
     3537          (position 490.00 170.00)
    34683538          (bounds 4.00 4.00)
    34693539          (contentsOpaque 1)
     
    36953765        )
    36963766        (GraphicsLayer
    3697           (position 20.00 190.00)
     3767          (position 480.00 180.00)
     3768          (bounds 4.00 4.00)
     3769          (contentsOpaque 1)
     3770        )
     3771        (GraphicsLayer
     3772          (position 490.00 180.00)
    36983773          (bounds 4.00 4.00)
    36993774          (contentsOpaque 1)
     
    39213996        (GraphicsLayer
    39223997          (position 470.00 190.00)
     3998          (bounds 4.00 4.00)
     3999          (contentsOpaque 1)
     4000        )
     4001        (GraphicsLayer
     4002          (position 480.00 190.00)
     4003          (bounds 4.00 4.00)
     4004          (contentsOpaque 1)
     4005        )
     4006        (GraphicsLayer
     4007          (position 490.00 190.00)
    39234008          (bounds 4.00 4.00)
    39244009          (contentsOpaque 1)
  • trunk/LayoutTests/compositing/layer-creation/translate-scale-animation-overlap-expected.txt

    r256095 r289732  
    66      (bounds 800.00 600.00)
    77      (contentsOpaque 1)
    8       (children 685
     8      (children 739
    99        (GraphicsLayer
    1010          (offsetFromRenderer width=-14 height=-14)
     
    205205        )
    206206        (GraphicsLayer
     207          (position 420.00 30.00)
     208          (bounds 4.00 4.00)
     209          (contentsOpaque 1)
     210        )
     211        (GraphicsLayer
     212          (position 430.00 30.00)
     213          (bounds 4.00 4.00)
     214          (contentsOpaque 1)
     215        )
     216        (GraphicsLayer
     217          (position 440.00 30.00)
     218          (bounds 4.00 4.00)
     219          (contentsOpaque 1)
     220        )
     221        (GraphicsLayer
    207222          (position 40.00 40.00)
    208223          (bounds 4.00 4.00)
     
    395410        )
    396411        (GraphicsLayer
     412          (position 420.00 40.00)
     413          (bounds 4.00 4.00)
     414          (contentsOpaque 1)
     415        )
     416        (GraphicsLayer
     417          (position 430.00 40.00)
     418          (bounds 4.00 4.00)
     419          (contentsOpaque 1)
     420        )
     421        (GraphicsLayer
     422          (position 440.00 40.00)
     423          (bounds 4.00 4.00)
     424          (contentsOpaque 1)
     425        )
     426        (GraphicsLayer
    397427          (position 40.00 50.00)
    398428          (bounds 4.00 4.00)
     
    585615        )
    586616        (GraphicsLayer
     617          (position 420.00 50.00)
     618          (bounds 4.00 4.00)
     619          (contentsOpaque 1)
     620        )
     621        (GraphicsLayer
     622          (position 430.00 50.00)
     623          (bounds 4.00 4.00)
     624          (contentsOpaque 1)
     625        )
     626        (GraphicsLayer
     627          (position 440.00 50.00)
     628          (bounds 4.00 4.00)
     629          (contentsOpaque 1)
     630        )
     631        (GraphicsLayer
    587632          (position 40.00 60.00)
    588633          (bounds 4.00 4.00)
     
    775820        )
    776821        (GraphicsLayer
     822          (position 420.00 60.00)
     823          (bounds 4.00 4.00)
     824          (contentsOpaque 1)
     825        )
     826        (GraphicsLayer
     827          (position 430.00 60.00)
     828          (bounds 4.00 4.00)
     829          (contentsOpaque 1)
     830        )
     831        (GraphicsLayer
     832          (position 440.00 60.00)
     833          (bounds 4.00 4.00)
     834          (contentsOpaque 1)
     835        )
     836        (GraphicsLayer
    777837          (position 40.00 70.00)
    778838          (bounds 4.00 4.00)
     
    9651025        )
    9661026        (GraphicsLayer
     1027          (position 420.00 70.00)
     1028          (bounds 4.00 4.00)
     1029          (contentsOpaque 1)
     1030        )
     1031        (GraphicsLayer
     1032          (position 430.00 70.00)
     1033          (bounds 4.00 4.00)
     1034          (contentsOpaque 1)
     1035        )
     1036        (GraphicsLayer
     1037          (position 440.00 70.00)
     1038          (bounds 4.00 4.00)
     1039          (contentsOpaque 1)
     1040        )
     1041        (GraphicsLayer
    9671042          (position 40.00 80.00)
    9681043          (bounds 4.00 4.00)
     
    11551230        )
    11561231        (GraphicsLayer
     1232          (position 420.00 80.00)
     1233          (bounds 4.00 4.00)
     1234          (contentsOpaque 1)
     1235        )
     1236        (GraphicsLayer
     1237          (position 430.00 80.00)
     1238          (bounds 4.00 4.00)
     1239          (contentsOpaque 1)
     1240        )
     1241        (GraphicsLayer
     1242          (position 440.00 80.00)
     1243          (bounds 4.00 4.00)
     1244          (contentsOpaque 1)
     1245        )
     1246        (GraphicsLayer
    11571247          (position 40.00 90.00)
    11581248          (bounds 4.00 4.00)
     
    13451435        )
    13461436        (GraphicsLayer
     1437          (position 420.00 90.00)
     1438          (bounds 4.00 4.00)
     1439          (contentsOpaque 1)
     1440        )
     1441        (GraphicsLayer
     1442          (position 430.00 90.00)
     1443          (bounds 4.00 4.00)
     1444          (contentsOpaque 1)
     1445        )
     1446        (GraphicsLayer
     1447          (position 440.00 90.00)
     1448          (bounds 4.00 4.00)
     1449          (contentsOpaque 1)
     1450        )
     1451        (GraphicsLayer
    13471452          (position 40.00 100.00)
    13481453          (bounds 4.00 4.00)
     
    15351640        )
    15361641        (GraphicsLayer
     1642          (position 420.00 100.00)
     1643          (bounds 4.00 4.00)
     1644          (contentsOpaque 1)
     1645        )
     1646        (GraphicsLayer
     1647          (position 430.00 100.00)
     1648          (bounds 4.00 4.00)
     1649          (contentsOpaque 1)
     1650        )
     1651        (GraphicsLayer
     1652          (position 440.00 100.00)
     1653          (bounds 4.00 4.00)
     1654          (contentsOpaque 1)
     1655        )
     1656        (GraphicsLayer
    15371657          (position 40.00 110.00)
    15381658          (bounds 4.00 4.00)
     
    17251845        )
    17261846        (GraphicsLayer
     1847          (position 420.00 110.00)
     1848          (bounds 4.00 4.00)
     1849          (contentsOpaque 1)
     1850        )
     1851        (GraphicsLayer
     1852          (position 430.00 110.00)
     1853          (bounds 4.00 4.00)
     1854          (contentsOpaque 1)
     1855        )
     1856        (GraphicsLayer
     1857          (position 440.00 110.00)
     1858          (bounds 4.00 4.00)
     1859          (contentsOpaque 1)
     1860        )
     1861        (GraphicsLayer
    17271862          (position 40.00 120.00)
    17281863          (bounds 4.00 4.00)
     
    19152050        )
    19162051        (GraphicsLayer
     2052          (position 420.00 120.00)
     2053          (bounds 4.00 4.00)
     2054          (contentsOpaque 1)
     2055        )
     2056        (GraphicsLayer
     2057          (position 430.00 120.00)
     2058          (bounds 4.00 4.00)
     2059          (contentsOpaque 1)
     2060        )
     2061        (GraphicsLayer
     2062          (position 440.00 120.00)
     2063          (bounds 4.00 4.00)
     2064          (contentsOpaque 1)
     2065        )
     2066        (GraphicsLayer
    19172067          (position 40.00 130.00)
    19182068          (bounds 4.00 4.00)
     
    21052255        )
    21062256        (GraphicsLayer
     2257          (position 420.00 130.00)
     2258          (bounds 4.00 4.00)
     2259          (contentsOpaque 1)
     2260        )
     2261        (GraphicsLayer
     2262          (position 430.00 130.00)
     2263          (bounds 4.00 4.00)
     2264          (contentsOpaque 1)
     2265        )
     2266        (GraphicsLayer
     2267          (position 440.00 130.00)
     2268          (bounds 4.00 4.00)
     2269          (contentsOpaque 1)
     2270        )
     2271        (GraphicsLayer
    21072272          (position 40.00 140.00)
    21082273          (bounds 4.00 4.00)
     
    22952460        )
    22962461        (GraphicsLayer
     2462          (position 420.00 140.00)
     2463          (bounds 4.00 4.00)
     2464          (contentsOpaque 1)
     2465        )
     2466        (GraphicsLayer
     2467          (position 430.00 140.00)
     2468          (bounds 4.00 4.00)
     2469          (contentsOpaque 1)
     2470        )
     2471        (GraphicsLayer
     2472          (position 440.00 140.00)
     2473          (bounds 4.00 4.00)
     2474          (contentsOpaque 1)
     2475        )
     2476        (GraphicsLayer
    22972477          (position 40.00 150.00)
    22982478          (bounds 4.00 4.00)
     
    24852665        )
    24862666        (GraphicsLayer
     2667          (position 420.00 150.00)
     2668          (bounds 4.00 4.00)
     2669          (contentsOpaque 1)
     2670        )
     2671        (GraphicsLayer
     2672          (position 430.00 150.00)
     2673          (bounds 4.00 4.00)
     2674          (contentsOpaque 1)
     2675        )
     2676        (GraphicsLayer
     2677          (position 440.00 150.00)
     2678          (bounds 4.00 4.00)
     2679          (contentsOpaque 1)
     2680        )
     2681        (GraphicsLayer
    24872682          (position 40.00 160.00)
    24882683          (bounds 4.00 4.00)
     
    26752870        )
    26762871        (GraphicsLayer
     2872          (position 420.00 160.00)
     2873          (bounds 4.00 4.00)
     2874          (contentsOpaque 1)
     2875        )
     2876        (GraphicsLayer
     2877          (position 430.00 160.00)
     2878          (bounds 4.00 4.00)
     2879          (contentsOpaque 1)
     2880        )
     2881        (GraphicsLayer
     2882          (position 440.00 160.00)
     2883          (bounds 4.00 4.00)
     2884          (contentsOpaque 1)
     2885        )
     2886        (GraphicsLayer
    26772887          (position 40.00 170.00)
    26782888          (bounds 4.00 4.00)
     
    28653075        )
    28663076        (GraphicsLayer
     3077          (position 420.00 170.00)
     3078          (bounds 4.00 4.00)
     3079          (contentsOpaque 1)
     3080        )
     3081        (GraphicsLayer
     3082          (position 430.00 170.00)
     3083          (bounds 4.00 4.00)
     3084          (contentsOpaque 1)
     3085        )
     3086        (GraphicsLayer
     3087          (position 440.00 170.00)
     3088          (bounds 4.00 4.00)
     3089          (contentsOpaque 1)
     3090        )
     3091        (GraphicsLayer
    28673092          (position 40.00 180.00)
    28683093          (bounds 4.00 4.00)
     
    30553280        )
    30563281        (GraphicsLayer
     3282          (position 420.00 180.00)
     3283          (bounds 4.00 4.00)
     3284          (contentsOpaque 1)
     3285        )
     3286        (GraphicsLayer
     3287          (position 430.00 180.00)
     3288          (bounds 4.00 4.00)
     3289          (contentsOpaque 1)
     3290        )
     3291        (GraphicsLayer
     3292          (position 440.00 180.00)
     3293          (bounds 4.00 4.00)
     3294          (contentsOpaque 1)
     3295        )
     3296        (GraphicsLayer
    30573297          (position 40.00 190.00)
    30583298          (bounds 4.00 4.00)
     
    32453485        )
    32463486        (GraphicsLayer
     3487          (position 420.00 190.00)
     3488          (bounds 4.00 4.00)
     3489          (contentsOpaque 1)
     3490        )
     3491        (GraphicsLayer
     3492          (position 430.00 190.00)
     3493          (bounds 4.00 4.00)
     3494          (contentsOpaque 1)
     3495        )
     3496        (GraphicsLayer
     3497          (position 440.00 190.00)
     3498          (bounds 4.00 4.00)
     3499          (contentsOpaque 1)
     3500        )
     3501        (GraphicsLayer
    32473502          (position 40.00 200.00)
    32483503          (bounds 4.00 4.00)
     
    34313686        (GraphicsLayer
    34323687          (position 410.00 200.00)
     3688          (bounds 4.00 4.00)
     3689          (contentsOpaque 1)
     3690        )
     3691        (GraphicsLayer
     3692          (position 420.00 200.00)
     3693          (bounds 4.00 4.00)
     3694          (contentsOpaque 1)
     3695        )
     3696        (GraphicsLayer
     3697          (position 430.00 200.00)
     3698          (bounds 4.00 4.00)
     3699          (contentsOpaque 1)
     3700        )
     3701        (GraphicsLayer
     3702          (position 440.00 200.00)
    34333703          (bounds 4.00 4.00)
    34343704          (contentsOpaque 1)
  • trunk/LayoutTests/imported/w3c/ChangeLog

    r289722 r289732  
     12022-02-14  Martin Robinson  <mrobinson@webkit.org>
     2
     3        Animation from "scale()" to "scale() translate()" does not yield the expected result
     4        https://bugs.webkit.org/show_bug.cgi?id=222595
     5        <rdar://problem/74926700>
     6
     7        Reviewed by Simon Fraser.
     8
     9        * web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt: Mark tests as passing.
     10        * web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt:
     11        * web-platform-tests/css/css-transforms/animation/transform-interpolation-003-expected.txt:
     12
    1132022-02-13  Matt Woodrow  <mattwoodrow@apple.com>
    214
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/list-interpolation-expected.txt

    r289032 r289732  
    1212PASS CSS Animations: property <transform> from [translate(200px) rotate(720deg)] to [none] at (0.25) should be [translate(150px) rotate(540deg)]
    1313PASS Web Animations: property <transform> from [translate(200px) rotate(720deg)] to [none] at (0.25) should be [translate(150px) rotate(540deg)]
    14 FAIL CSS Transitions: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
    15 FAIL CSS Transitions with transition: all: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
    16 FAIL CSS Animations: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
    17 FAIL Web Animations: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
    18 FAIL CSS Transitions: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
    19 FAIL CSS Transitions with transition: all: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
    20 FAIL CSS Animations: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
    21 FAIL Web Animations: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)] assert_equals: expected "matrix ( - 1 , 0 , 0 , - 1 , 125 , 0 ) " but got "matrix ( 1 , 0 , 0 , 1 , 125 , 0 ) "
     14PASS CSS Transitions: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)]
     15PASS CSS Transitions with transition: all: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)]
     16PASS CSS Animations: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)]
     17PASS Web Animations: property <transform> from [translate(100px)] to [translate(200px) rotate(720deg)] at (0.25) should be [translate(125px) rotate(180deg)]
     18PASS CSS Transitions: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)]
     19PASS CSS Transitions with transition: all: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)]
     20PASS CSS Animations: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)]
     21PASS Web Animations: property <transform> from [translate(100px) rotate(720deg)] to [translate(200px)] at (0.25) should be [translate(125px) rotate(540deg)]
    2222PASS CSS Transitions: property <transform> from [scale(2) rotate(360deg) translate(100px) matrix(1, 0, 0, 1, 100, 0) skew(0deg)] to [scale(3) rotate(1080deg) translate(200px) matrix(1, 0, 0, 1, 0, 200) skew(720deg)] at (0.25) should be [scale(2.25) rotate(540deg) translate(125px) matrix(1, 0, 0, 1, 75, 50) skew(180deg)]
    2323PASS CSS Transitions with transition: all: property <transform> from [scale(2) rotate(360deg) translate(100px) matrix(1, 0, 0, 1, 100, 0) skew(0deg)] to [scale(3) rotate(1080deg) translate(200px) matrix(1, 0, 0, 1, 0, 200) skew(720deg)] at (0.25) should be [scale(2.25) rotate(540deg) translate(125px) matrix(1, 0, 0, 1, 75, 50) skew(180deg)]
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-001-expected.txt

    r289032 r289732  
    7272PASS Web Animations: property <transform> from [scaleZ(1) perspective(400px)] to [scaleZ(2) perspective(500px)] at (1) should be [scaleZ(2) perspective(500px)]
    7373PASS Web Animations: property <transform> from [scaleZ(1) perspective(400px)] to [scaleZ(2) perspective(500px)] at (2) should be [scaleZ(3) perspective(666.6666666666666px)]
    74 FAIL CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)] assert_less_than: comparing (at index 11 actual value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0.002, 0, 0, 0, 1)" [0.002] and expected value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)" [0] expected a number less than 0.00001 but got 2000.0000000000002
     74PASS CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)]
    7575PASS CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0) should be [scaleZ(2)]
    7676PASS CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0.5) should be [scaleZ(2) perspective(1000px)]
    7777PASS CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (1) should be [scaleZ(2) perspective(500px)]
    7878PASS CSS Transitions: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (2) should be [scaleZ(2) perspective(250px)]
    79 FAIL CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)] assert_less_than: comparing (at index 11 actual value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0.002, 0, 0, 0, 1)" [0.002] and expected value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)" [0] expected a number less than 0.00001 but got 2000.0000000000002
     79PASS CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)]
    8080PASS CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0) should be [scaleZ(2)]
    8181PASS CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0.5) should be [scaleZ(2) perspective(1000px)]
    8282PASS CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (1) should be [scaleZ(2) perspective(500px)]
    8383PASS CSS Transitions with transition: all: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (2) should be [scaleZ(2) perspective(250px)]
    84 FAIL CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)] assert_less_than: comparing (at index 11 actual value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0.002, 0, 0, 0, 1)" [0.002] and expected value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)" [0] expected a number less than 0.00001 but got 2000.0000000000002
     84PASS CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)]
    8585PASS CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0) should be [scaleZ(2)]
    8686PASS CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0.5) should be [scaleZ(2) perspective(1000px)]
    8787PASS CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (1) should be [scaleZ(2) perspective(500px)]
    8888PASS CSS Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (2) should be [scaleZ(2) perspective(250px)]
    89 FAIL Web Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)] assert_less_than: comparing (at index 11 actual value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0.002, 0, 0, 0, 1)" [0.002] and expected value "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1)" [0] expected a number less than 0.00001 but got 2000.0000000000002
     89PASS Web Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (-1) should be [scaleZ(2)]
    9090PASS Web Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0) should be [scaleZ(2)]
    9191PASS Web Animations: property <transform> from [scaleZ(2)] to [scaleZ(2) perspective(500px)] at (0.5) should be [scaleZ(2) perspective(1000px)]
  • trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-transforms/animation/transform-interpolation-003-expected.txt

    r267650 r289732  
    2424PASS Web Animations: property <transform> from [skewX(10rad) scaleZ(1)] to [skewX(20rad) scaleZ(2)] at (1) should be [skewX(20rad) scaleZ(2)]
    2525PASS Web Animations: property <transform> from [skewX(10rad) scaleZ(1)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)]
    26 FAIL CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 0.94 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) "
     26PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)]
    2727PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0) should be [skewX(10rad) scaleZ(1)]
    28 FAIL CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.07 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.05 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) "
    29 FAIL CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.45 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.84 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) "
     28PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)]
     29PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)]
    3030PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (1) should be [skewX(20rad) scaleZ(2)]
    31 FAIL CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 6.41 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 3.83 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) "
    32 FAIL CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 0.94 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) "
     31PASS CSS Transitions: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)]
     32PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)]
    3333PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0) should be [skewX(10rad) scaleZ(1)]
    34 FAIL CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.07 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.05 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) "
    35 FAIL CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.45 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.84 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) "
     34PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)]
     35PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)]
    3636PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (1) should be [skewX(20rad) scaleZ(2)]
    37 FAIL CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 6.41 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 3.83 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) "
    38 FAIL CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 0.94 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) "
     37PASS CSS Transitions with transition: all: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)]
     38PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)]
    3939PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0) should be [skewX(10rad) scaleZ(1)]
    40 FAIL CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.07 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.05 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) "
    41 FAIL CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.45 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.84 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) "
     40PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)]
     41PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)]
    4242PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (1) should be [skewX(20rad) scaleZ(2)]
    43 FAIL CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 6.41 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 3.83 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) "
    44 FAIL Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , 0 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , - 0.94 , 1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 1 ) "
     43PASS CSS Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)]
     44PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (-1) should be [skewX(0rad) scaleZ(0)]
    4545PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0) should be [skewX(10rad) scaleZ(1)]
    46 FAIL Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 0.07 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.05 , 1 , 0 , 0 , 0 , 0 , 1.25 , 0 , 0 , 0 , 0 , 1 ) "
    47 FAIL Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 4.45 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 1.84 , 1 , 0 , 0 , 0 , 0 , 1.75 , 0 , 0 , 0 , 0 , 1 ) "
     46PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.25) should be [skewX(12.5rad) scaleZ(1.25)]
     47PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (0.75) should be [skewX(17.5rad) scaleZ(1.75)]
    4848PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (1) should be [skewX(20rad) scaleZ(2)]
    49 FAIL Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)] assert_equals: expected "matrix3d ( 1 , 0 , 0 , 0 , - 6.41 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) " but got "matrix3d ( 1 , 0 , 0 , 0 , 3.83 , 1 , 0 , 0 , 0 , 0 , 3 , 0 , 0 , 0 , 0 , 1 ) "
     49PASS Web Animations: property <transform> from [skewX(10rad)] to [skewX(20rad) scaleZ(2)] at (2) should be [skewX(30rad) scaleZ(3)]
    5050PASS CSS Transitions: property <transform> from [scaleZ(3) perspective(400px)] to [scaleZ(4) skewX(1rad) perspective(500px)] at (-1) should be [scaleZ(2) matrix3d(1, 0, 0, 0, -1.55741, 1, 0, 0, 0, 0, 1, -0.003, 0, 0, 0, 1)]
    5151PASS CSS Transitions: property <transform> from [scaleZ(3) perspective(400px)] to [scaleZ(4) skewX(1rad) perspective(500px)] at (0) should be [scaleZ(3) matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, -0.0025, 0, 0, 0, 1)]
  • trunk/LayoutTests/imported/w3c/web-platform-tests/web-animations/animation-model/animation-types/interpolation-per-property-002-expected.txt

    r287924 r289732  
    217217PASS transform: rotate and translate
    218218PASS transform: translate and rotate
    219 FAIL transform: extend shorter list (from) assert_approx_equals: expected matrix(-1, 0, 0, -1, -50, 0) but got matrix(1, 0, 0, 1, 50, 0): The value should be matrix(-1, 0, 0, -1, -50, 0) at 500ms but got matrix(1, 0, 0, 1, 50, 0) expected -1 +/- 0.0001 but got 1
    220 FAIL transform: extend shorter list (to) assert_approx_equals: expected matrix(-1, 0, 0, -1, -50, 0) but got matrix(1, 0, 0, 1, 50, 0): The value should be matrix(-1, 0, 0, -1, -50, 0) at 500ms but got matrix(1, 0, 0, 1, 50, 0) expected -1 +/- 0.0001 but got 1
     219PASS transform: extend shorter list (from)
     220PASS transform: extend shorter list (to)
    221221PASS transform: mismatch order of translate and rotate
    222222PASS transform: matrix
  • trunk/Source/WebCore/ChangeLog

    r289731 r289732  
     12022-02-14  Martin Robinson  <mrobinson@webkit.org>
     2
     3        Animation from "scale()" to "scale() translate()" does not yield the expected result
     4        https://bugs.webkit.org/show_bug.cgi?id=222595
     5        <rdar://problem/74926700>
     6
     7        Reviewed by Simon Fraser.
     8
     9        No new tests. This is covered by existing WPT tests.
     10
     11        When blending two transform lists, where one list is longer than the other, extending the
     12        shorter list with identity transform functions. This is the behavior specified in the
     13        CSS Transforms Module Level 2 specification.
     14
     15        * animation/KeyframeEffect.cpp:
     16        (WebCore::KeyframeEffect::checkForMatchingTransformFunctionLists): Instead of checking each frame
     17        against the first keyframe, collect a list of shared transform primitives and check that each
     18        list has the same number of compatible primitives or a prefix of compatible primitives and is
     19        shorter.
     20        * platform/graphics/GraphicsLayer.cpp:
     21        (WebCore::GraphicsLayer::getSharedPrimitivesForTransformKeyframes): When the transform operation
     22        lists have different sizes, don't always return false. Instead check that the parts that do exist
     23        have matching primitives.
     24        * platform/graphics/transforms/TransformOperations.cpp:
     25        (WebCore::TransformOperations::operationsMatch const):  Only check the transformations in
     26        the shared list size.
     27        (WebCore::TransformOperations::blendByMatchingOperations const): Properly handle when one of the
     28        two operations is null instead of just the toOperation.
     29
    1302022-02-14  Alejandro G. Castro  <alex@igalia.com>
    231
  • trunk/Source/WebCore/animation/KeyframeEffect.cpp

    r289598 r289732  
    939939        return;
    940940
    941     // Empty transforms match anything, so find the first non-empty entry as the reference.
    942     size_t numKeyframes = m_blendingKeyframes.size();
    943     size_t firstNonEmptyTransformKeyframeIndex = numKeyframes;
    944 
    945     for (size_t i = 0; i < numKeyframes; ++i) {
    946         const KeyframeValue& currentKeyframe = m_blendingKeyframes[i];
    947         if (currentKeyframe.style()->transform().operations().size()) {
    948             firstNonEmptyTransformKeyframeIndex = i;
    949             break;
    950         }
    951     }
    952 
    953     // All of the frames have an empty list of transform operations, so they match.
    954     if (firstNonEmptyTransformKeyframeIndex == numKeyframes) {
    955         m_transformFunctionListsMatch = true;
    956         return;
    957     }
    958 
    959     const TransformOperations* firstVal = &m_blendingKeyframes[firstNonEmptyTransformKeyframeIndex].style()->transform();
    960     for (size_t i = firstNonEmptyTransformKeyframeIndex + 1; i < numKeyframes; ++i) {
    961         const KeyframeValue& currentKeyframe = m_blendingKeyframes[i];
    962         const TransformOperations* val = &currentKeyframe.style()->transform();
    963 
    964         // An empty transform list matches anything.
    965         if (val->operations().isEmpty())
    966             continue;
    967 
    968         if (!firstVal->operationsMatch(*val))
     941    Vector<TransformOperation::OperationType> sharedPrimitives;
     942    sharedPrimitives.reserveInitialCapacity(m_blendingKeyframes[0].style()->transform().operations().size());
     943
     944    for (const auto& keyframe : m_blendingKeyframes) {
     945        if (!keyframe.style()->transform().updateSharedPrimitives(sharedPrimitives))
    969946            return;
    970947    }
  • trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp

    r289032 r289732  
    734734    sharedPrimitives.reserveInitialCapacity(operationsAt(valueList, 0).size());
    735735
    736     // Find a list of transform primitives for the given TransformOperations which are compatible with the primitives
    737     // stored in sharedPrimitives. The results are written back into sharedPrimitives. This returns false if any element
    738     // of TransformOperation does not have a shared primitive, otherwise it returns true.
    739     auto updateSharedPrimitives = [&](const TransformOperations& operations) {
    740         // Empty transform lists are implicitly a list of identity transforms.
    741         if (!operations.size())
    742             return true;
    743 
    744         // If we have seen a non-empty list already and this list's size doesn't match, then we can't use shared
    745         // primitives. FIXME: This should handle prefix matches and then fall back to matrix interpolation for the rest
    746         // of the list.
    747         // See: https://bugs.webkit.org/show_bug.cgi?id=235757
    748         if (sharedPrimitives.size() && sharedPrimitives.size() != operations.size())
    749             return false;
    750 
    751         for (size_t i = 0; i < operations.size(); ++i) {
    752             const auto* operation = operations.at(i);
    753 
    754             // If we haven't seen an operation at this index before, we can simply use our primitive type.
    755             if (i >= sharedPrimitives.size()) {
    756                 ASSERT(i == sharedPrimitives.size());
    757                 sharedPrimitives.append(operation->primitiveType());
    758                 continue;
    759             }
    760 
    761             if (auto sharedPrimitive = operation->sharedPrimitiveType(sharedPrimitives[i]))
    762                 sharedPrimitives[i] = *sharedPrimitive;
    763             else
    764                 return false;
    765         }
    766 
    767         return true;
    768     };
    769 
    770736    for (size_t i = 0; i < valueList.size(); ++i) {
    771         const TransformOperations& operations = operationsAt(valueList, i);
    772         if (!updateSharedPrimitives(operations))
     737        if (!operationsAt(valueList, i).updateSharedPrimitives(sharedPrimitives))
    773738            return false;
    774739    }
  • trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.cpp

    r289599 r289732  
    5353bool TransformOperations::operationsMatch(const TransformOperations& other) const
    5454{
    55     size_t numOperations = operations().size();
    56     // If the sizes of the function lists don't match, the lists don't match
    57     if (numOperations != other.operations().size())
    58         return false;
    59    
    60     // If the types of each function are not the same, the lists don't match
    61     for (size_t i = 0; i < numOperations; ++i) {
     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) {
    6260        if (!operations()[i]->sharedPrimitiveType(other.operations()[i].get()))
    6361            return false;
    6462    }
     63    return true;
     64}
     65
     66bool TransformOperations::updateSharedPrimitives(Vector<TransformOperation::OperationType>& sharedPrimitives) const
     67{
     68    for (size_t i = 0; i < operations().size(); ++i) {
     69        const auto* operation = at(i);
     70
     71        // 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());
     75            continue;
     76        }
     77
     78        if (auto sharedPrimitive = operation->sharedPrimitiveType(sharedPrimitives[i]))
     79            sharedPrimitives[i] = *sharedPrimitive;
     80        else {
     81            // FIXME: This should handle prefix matches and then fall back to matrix interpolation for the rest
     82            // of the list. See: https://bugs.webkit.org/show_bug.cgi?id=235757
     83            return false;
     84        }
     85    }
     86
    6587    return true;
    6688}
     
    91113        if (fromOperation && toOperation && !fromOperation->sharedPrimitiveType(toOperation.get()))
    92114            return blendByUsingMatrixInterpolation(from, context, boxSize);
    93         RefPtr<TransformOperation> blendedOperation = toOperation ? toOperation->blend(fromOperation.get(), context) : (fromOperation ? RefPtr<TransformOperation>(fromOperation->blend(nullptr, context, true)) : nullptr);
    94         if (blendedOperation)
    95             result.operations().append(blendedOperation);
    96         else {
    97             auto identityOperation = IdentityTransformOperation::create();
    98             if (context.progress > 0.5)
    99                 result.operations().append(toOperation ? toOperation : WTFMove(identityOperation));
    100             else
    101                 result.operations().append(fromOperation ? fromOperation : WTFMove(identityOperation));
    102         }
     115
     116        RefPtr<TransformOperation> blendedOperation;
     117        if (fromOperation && toOperation)
     118            blendedOperation = toOperation->blend(fromOperation.get(), context);
     119        else if (!fromOperation)
     120            blendedOperation = toOperation->blend(nullptr, 1 - context.progress, true);
     121        else if (!toOperation)
     122            blendedOperation = fromOperation->blend(nullptr, context, true);
     123
     124        // We should have exited early above if the fromOperation and toOperation didn't share a transform
     125        // function primitive, so blending the two operations should always yield a result.
     126        ASSERT(blendedOperation);
     127        result.operations().append(blendedOperation);
    103128    }
    104129
  • trunk/Source/WebCore/platform/graphics/transforms/TransformOperations.h

    r289599 r289732  
    7272
    7373    bool operationsMatch(const TransformOperations&) const;
     74
     75    // Find a list of transform primitives for the given TransformOperations which are compatible with the primitives
     76    // stored in sharedPrimitives. The results are written back into sharedPrimitives. This returns false if any element
     77    // of TransformOperation does not have a shared primitive, otherwise it returns true.
     78    bool updateSharedPrimitives(Vector<TransformOperation::OperationType>& sharedPrimitives) const;
    7479   
    7580    void clear()
Note: See TracChangeset for help on using the changeset viewer.