⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 256095 in webkit


Ignore:
Timestamp:
Feb 8, 2020, 5:11:36 PM (7 years ago)
Author:
Simon Fraser
Message:

Extent of a composited animation should not include the untransformed position
https://bugs.webkit.org/show_bug.cgi?id=207434

Reviewed by Sam Weinig.
Source/WebCore:

To determine whether to create ("attach") backing store for layers with transform animations,
we compute the union of all the states of the animation as an "extent", and ask whether it intersects
the coverage rect in GraphicsLayerCA.

The non-Web Animations transition code did this correctly, just unioning the bounds transformed by
the start and end state.

The non-Web Animations keyframe code, and the Web Animations KeyframeEffect code (used for both CSS transitions
and animations) also unioned with the unanimated bounds, which could create overly large extents in some
cases, contributing to jetsams on iOS (rdar://problem/59020443).

Fix KeyframeAnimation and KeyframeEffect to not union with the untransformed bounds.

Tests: compositing/backing/backing-store-attachment-animating-outside-viewport.html

legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport.html

  • animation/KeyframeEffect.cpp:

(WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):

  • page/animation/KeyframeAnimation.cpp:

(WebCore::KeyframeAnimation::computeExtentOfTransformAnimation const):

LayoutTests:

New test that checks backing store attachment and overlap for an element which is positioned in-view,
but is move offscreen by the animation.

New baselines for overlap tests, since overlap no longer considers the unanimated position.

  • compositing/backing/backing-store-attachment-animating-outside-viewport-expected.txt: Added.
  • compositing/backing/backing-store-attachment-animating-outside-viewport.html: Added.
  • compositing/layer-creation/translate-animation-overlap-expected.txt:
  • compositing/layer-creation/translate-scale-animation-overlap-expected.txt:
  • legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport-expected.txt: Added.
  • legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport.html: Added.
  • legacy-animation-engine/compositing/layer-creation/translate-animation-overlap-expected.txt:
  • legacy-animation-engine/compositing/layer-creation/translate-scale-animation-overlap-expected.txt:
  • platform/ios-wk2/compositing/backing/backing-store-attachment-animating-outside-viewport-expected.txt: Added.
  • platform/ios-wk2/legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport-expected.txt: Added.
Location:
trunk
Files:
8 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r256089 r256095  
     12020-02-08  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Extent of a composited animation should not include the untransformed position
     4        https://bugs.webkit.org/show_bug.cgi?id=207434
     5
     6        Reviewed by Sam Weinig.
     7       
     8        New test that checks backing store attachment and overlap for an element which is positioned in-view,
     9        but is move offscreen by the animation.
     10
     11        New baselines for overlap tests, since overlap no longer considers the unanimated position.
     12
     13        * compositing/backing/backing-store-attachment-animating-outside-viewport-expected.txt: Added.
     14        * compositing/backing/backing-store-attachment-animating-outside-viewport.html: Added.
     15        * compositing/layer-creation/translate-animation-overlap-expected.txt:
     16        * compositing/layer-creation/translate-scale-animation-overlap-expected.txt:
     17        * legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport-expected.txt: Added.
     18        * legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport.html: Added.
     19        * legacy-animation-engine/compositing/layer-creation/translate-animation-overlap-expected.txt:
     20        * legacy-animation-engine/compositing/layer-creation/translate-scale-animation-overlap-expected.txt:
     21        * platform/ios-wk2/compositing/backing/backing-store-attachment-animating-outside-viewport-expected.txt: Added.
     22        * platform/ios-wk2/legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport-expected.txt: Added.
     23
    1242020-02-08  Doug Kelly  <dougk@apple.com>
    225
  • trunk/LayoutTests/compositing/layer-creation/translate-animation-overlap-expected.txt

    r244800 r256095  
    66      (bounds 800.00 600.00)
    77      (contentsOpaque 1)
    8       (children 430
     8      (children 417
    99        (GraphicsLayer
    1010          (offsetFromRenderer width=-14 height=-14)
     
    1414        )
    1515        (GraphicsLayer
    16           (position 30.00 40.00)
    17           (bounds 4.00 4.00)
    18           (contentsOpaque 1)
    19         )
    20         (GraphicsLayer
    2116          (position 40.00 40.00)
    2217          (bounds 4.00 4.00)
     
    179174        )
    180175        (GraphicsLayer
    181           (position 30.00 50.00)
    182           (bounds 4.00 4.00)
    183           (contentsOpaque 1)
    184         )
    185         (GraphicsLayer
    186176          (position 40.00 50.00)
    187177          (bounds 4.00 4.00)
     
    344334        )
    345335        (GraphicsLayer
    346           (position 30.00 60.00)
    347           (bounds 4.00 4.00)
    348           (contentsOpaque 1)
    349         )
    350         (GraphicsLayer
    351336          (position 40.00 60.00)
    352337          (bounds 4.00 4.00)
     
    509494        )
    510495        (GraphicsLayer
    511           (position 30.00 70.00)
    512           (bounds 4.00 4.00)
    513           (contentsOpaque 1)
    514         )
    515         (GraphicsLayer
    516496          (position 40.00 70.00)
    517497          (bounds 4.00 4.00)
     
    674654        )
    675655        (GraphicsLayer
    676           (position 30.00 80.00)
    677           (bounds 4.00 4.00)
    678           (contentsOpaque 1)
    679         )
    680         (GraphicsLayer
    681656          (position 40.00 80.00)
    682657          (bounds 4.00 4.00)
     
    839814        )
    840815        (GraphicsLayer
    841           (position 30.00 90.00)
    842           (bounds 4.00 4.00)
    843           (contentsOpaque 1)
    844         )
    845         (GraphicsLayer
    846816          (position 40.00 90.00)
    847817          (bounds 4.00 4.00)
     
    1004974        )
    1005975        (GraphicsLayer
    1006           (position 30.00 100.00)
    1007           (bounds 4.00 4.00)
    1008           (contentsOpaque 1)
    1009         )
    1010         (GraphicsLayer
    1011976          (position 40.00 100.00)
    1012977          (bounds 4.00 4.00)
     
    11691134        )
    11701135        (GraphicsLayer
    1171           (position 30.00 110.00)
    1172           (bounds 4.00 4.00)
    1173           (contentsOpaque 1)
    1174         )
    1175         (GraphicsLayer
    11761136          (position 40.00 110.00)
    11771137          (bounds 4.00 4.00)
     
    13341294        )
    13351295        (GraphicsLayer
    1336           (position 30.00 120.00)
    1337           (bounds 4.00 4.00)
    1338           (contentsOpaque 1)
    1339         )
    1340         (GraphicsLayer
    13411296          (position 40.00 120.00)
    13421297          (bounds 4.00 4.00)
     
    14991454        )
    15001455        (GraphicsLayer
    1501           (position 30.00 130.00)
    1502           (bounds 4.00 4.00)
    1503           (contentsOpaque 1)
    1504         )
    1505         (GraphicsLayer
    15061456          (position 40.00 130.00)
    15071457          (bounds 4.00 4.00)
     
    16641614        )
    16651615        (GraphicsLayer
    1666           (position 30.00 140.00)
    1667           (bounds 4.00 4.00)
    1668           (contentsOpaque 1)
    1669         )
    1670         (GraphicsLayer
    16711616          (position 40.00 140.00)
    16721617          (bounds 4.00 4.00)
     
    18291774        )
    18301775        (GraphicsLayer
    1831           (position 30.00 150.00)
    1832           (bounds 4.00 4.00)
    1833           (contentsOpaque 1)
    1834         )
    1835         (GraphicsLayer
    18361776          (position 40.00 150.00)
    18371777          (bounds 4.00 4.00)
     
    19901930        (GraphicsLayer
    19911931          (position 350.00 150.00)
    1992           (bounds 4.00 4.00)
    1993           (contentsOpaque 1)
    1994         )
    1995         (GraphicsLayer
    1996           (position 30.00 160.00)
    19971932          (bounds 4.00 4.00)
    19981933          (contentsOpaque 1)
  • trunk/LayoutTests/compositing/layer-creation/translate-scale-animation-overlap-expected.txt

    r244800 r256095  
    66      (bounds 800.00 600.00)
    77      (contentsOpaque 1)
    8       (children 703
     8      (children 685
    99        (GraphicsLayer
    1010          (offsetFromRenderer width=-14 height=-14)
     
    1515        )
    1616        (GraphicsLayer
    17           (position 30.00 30.00)
    18           (bounds 4.00 4.00)
    19           (contentsOpaque 1)
    20         )
    21         (GraphicsLayer
    2217          (position 40.00 30.00)
    2318          (bounds 4.00 4.00)
     
    210205        )
    211206        (GraphicsLayer
    212           (position 30.00 40.00)
    213           (bounds 4.00 4.00)
    214           (contentsOpaque 1)
    215         )
    216         (GraphicsLayer
    217207          (position 40.00 40.00)
    218208          (bounds 4.00 4.00)
     
    405395        )
    406396        (GraphicsLayer
    407           (position 30.00 50.00)
    408           (bounds 4.00 4.00)
    409           (contentsOpaque 1)
    410         )
    411         (GraphicsLayer
    412397          (position 40.00 50.00)
    413398          (bounds 4.00 4.00)
     
    600585        )
    601586        (GraphicsLayer
    602           (position 30.00 60.00)
    603           (bounds 4.00 4.00)
    604           (contentsOpaque 1)
    605         )
    606         (GraphicsLayer
    607587          (position 40.00 60.00)
    608588          (bounds 4.00 4.00)
     
    795775        )
    796776        (GraphicsLayer
    797           (position 30.00 70.00)
    798           (bounds 4.00 4.00)
    799           (contentsOpaque 1)
    800         )
    801         (GraphicsLayer
    802777          (position 40.00 70.00)
    803778          (bounds 4.00 4.00)
     
    990965        )
    991966        (GraphicsLayer
    992           (position 30.00 80.00)
    993           (bounds 4.00 4.00)
    994           (contentsOpaque 1)
    995         )
    996         (GraphicsLayer
    997967          (position 40.00 80.00)
    998968          (bounds 4.00 4.00)
     
    11851155        )
    11861156        (GraphicsLayer
    1187           (position 30.00 90.00)
    1188           (bounds 4.00 4.00)
    1189           (contentsOpaque 1)
    1190         )
    1191         (GraphicsLayer
    11921157          (position 40.00 90.00)
    11931158          (bounds 4.00 4.00)
     
    13801345        )
    13811346        (GraphicsLayer
    1382           (position 30.00 100.00)
    1383           (bounds 4.00 4.00)
    1384           (contentsOpaque 1)
    1385         )
    1386         (GraphicsLayer
    13871347          (position 40.00 100.00)
    13881348          (bounds 4.00 4.00)
     
    15751535        )
    15761536        (GraphicsLayer
    1577           (position 30.00 110.00)
    1578           (bounds 4.00 4.00)
    1579           (contentsOpaque 1)
    1580         )
    1581         (GraphicsLayer
    15821537          (position 40.00 110.00)
    15831538          (bounds 4.00 4.00)
     
    17701725        )
    17711726        (GraphicsLayer
    1772           (position 30.00 120.00)
    1773           (bounds 4.00 4.00)
    1774           (contentsOpaque 1)
    1775         )
    1776         (GraphicsLayer
    17771727          (position 40.00 120.00)
    17781728          (bounds 4.00 4.00)
     
    19651915        )
    19661916        (GraphicsLayer
    1967           (position 30.00 130.00)
    1968           (bounds 4.00 4.00)
    1969           (contentsOpaque 1)
    1970         )
    1971         (GraphicsLayer
    19721917          (position 40.00 130.00)
    19731918          (bounds 4.00 4.00)
     
    21602105        )
    21612106        (GraphicsLayer
    2162           (position 30.00 140.00)
    2163           (bounds 4.00 4.00)
    2164           (contentsOpaque 1)
    2165         )
    2166         (GraphicsLayer
    21672107          (position 40.00 140.00)
    21682108          (bounds 4.00 4.00)
     
    23552295        )
    23562296        (GraphicsLayer
    2357           (position 30.00 150.00)
    2358           (bounds 4.00 4.00)
    2359           (contentsOpaque 1)
    2360         )
    2361         (GraphicsLayer
    23622297          (position 40.00 150.00)
    23632298          (bounds 4.00 4.00)
     
    25502485        )
    25512486        (GraphicsLayer
    2552           (position 30.00 160.00)
    2553           (bounds 4.00 4.00)
    2554           (contentsOpaque 1)
    2555         )
    2556         (GraphicsLayer
    25572487          (position 40.00 160.00)
    25582488          (bounds 4.00 4.00)
     
    27452675        )
    27462676        (GraphicsLayer
    2747           (position 30.00 170.00)
    2748           (bounds 4.00 4.00)
    2749           (contentsOpaque 1)
    2750         )
    2751         (GraphicsLayer
    27522677          (position 40.00 170.00)
    27532678          (bounds 4.00 4.00)
     
    29402865        )
    29412866        (GraphicsLayer
    2942           (position 30.00 180.00)
    2943           (bounds 4.00 4.00)
    2944           (contentsOpaque 1)
    2945         )
    2946         (GraphicsLayer
    29472867          (position 40.00 180.00)
    29482868          (bounds 4.00 4.00)
     
    31353055        )
    31363056        (GraphicsLayer
    3137           (position 30.00 190.00)
    3138           (bounds 4.00 4.00)
    3139           (contentsOpaque 1)
    3140         )
    3141         (GraphicsLayer
    31423057          (position 40.00 190.00)
    31433058          (bounds 4.00 4.00)
     
    33263241        (GraphicsLayer
    33273242          (position 410.00 190.00)
    3328           (bounds 4.00 4.00)
    3329           (contentsOpaque 1)
    3330         )
    3331         (GraphicsLayer
    3332           (position 30.00 200.00)
    33333243          (bounds 4.00 4.00)
    33343244          (contentsOpaque 1)
  • trunk/LayoutTests/legacy-animation-engine/compositing/layer-creation/translate-animation-overlap-expected.txt

    r244800 r256095  
    66      (bounds 800.00 600.00)
    77      (contentsOpaque 1)
    8       (children 430
     8      (children 417
    99        (GraphicsLayer
    1010          (offsetFromRenderer width=-14 height=-14)
     
    1414        )
    1515        (GraphicsLayer
    16           (position 30.00 40.00)
    17           (bounds 4.00 4.00)
    18           (contentsOpaque 1)
    19         )
    20         (GraphicsLayer
    2116          (position 40.00 40.00)
    2217          (bounds 4.00 4.00)
     
    179174        )
    180175        (GraphicsLayer
    181           (position 30.00 50.00)
    182           (bounds 4.00 4.00)
    183           (contentsOpaque 1)
    184         )
    185         (GraphicsLayer
    186176          (position 40.00 50.00)
    187177          (bounds 4.00 4.00)
     
    344334        )
    345335        (GraphicsLayer
    346           (position 30.00 60.00)
    347           (bounds 4.00 4.00)
    348           (contentsOpaque 1)
    349         )
    350         (GraphicsLayer
    351336          (position 40.00 60.00)
    352337          (bounds 4.00 4.00)
     
    509494        )
    510495        (GraphicsLayer
    511           (position 30.00 70.00)
    512           (bounds 4.00 4.00)
    513           (contentsOpaque 1)
    514         )
    515         (GraphicsLayer
    516496          (position 40.00 70.00)
    517497          (bounds 4.00 4.00)
     
    674654        )
    675655        (GraphicsLayer
    676           (position 30.00 80.00)
    677           (bounds 4.00 4.00)
    678           (contentsOpaque 1)
    679         )
    680         (GraphicsLayer
    681656          (position 40.00 80.00)
    682657          (bounds 4.00 4.00)
     
    839814        )
    840815        (GraphicsLayer
    841           (position 30.00 90.00)
    842           (bounds 4.00 4.00)
    843           (contentsOpaque 1)
    844         )
    845         (GraphicsLayer
    846816          (position 40.00 90.00)
    847817          (bounds 4.00 4.00)
     
    1004974        )
    1005975        (GraphicsLayer
    1006           (position 30.00 100.00)
    1007           (bounds 4.00 4.00)
    1008           (contentsOpaque 1)
    1009         )
    1010         (GraphicsLayer
    1011976          (position 40.00 100.00)
    1012977          (bounds 4.00 4.00)
     
    11691134        )
    11701135        (GraphicsLayer
    1171           (position 30.00 110.00)
    1172           (bounds 4.00 4.00)
    1173           (contentsOpaque 1)
    1174         )
    1175         (GraphicsLayer
    11761136          (position 40.00 110.00)
    11771137          (bounds 4.00 4.00)
     
    13341294        )
    13351295        (GraphicsLayer
    1336           (position 30.00 120.00)
    1337           (bounds 4.00 4.00)
    1338           (contentsOpaque 1)
    1339         )
    1340         (GraphicsLayer
    13411296          (position 40.00 120.00)
    13421297          (bounds 4.00 4.00)
     
    14991454        )
    15001455        (GraphicsLayer
    1501           (position 30.00 130.00)
    1502           (bounds 4.00 4.00)
    1503           (contentsOpaque 1)
    1504         )
    1505         (GraphicsLayer
    15061456          (position 40.00 130.00)
    15071457          (bounds 4.00 4.00)
     
    16641614        )
    16651615        (GraphicsLayer
    1666           (position 30.00 140.00)
    1667           (bounds 4.00 4.00)
    1668           (contentsOpaque 1)
    1669         )
    1670         (GraphicsLayer
    16711616          (position 40.00 140.00)
    16721617          (bounds 4.00 4.00)
     
    18291774        )
    18301775        (GraphicsLayer
    1831           (position 30.00 150.00)
    1832           (bounds 4.00 4.00)
    1833           (contentsOpaque 1)
    1834         )
    1835         (GraphicsLayer
    18361776          (position 40.00 150.00)
    18371777          (bounds 4.00 4.00)
     
    19901930        (GraphicsLayer
    19911931          (position 350.00 150.00)
    1992           (bounds 4.00 4.00)
    1993           (contentsOpaque 1)
    1994         )
    1995         (GraphicsLayer
    1996           (position 30.00 160.00)
    19971932          (bounds 4.00 4.00)
    19981933          (contentsOpaque 1)
  • trunk/LayoutTests/legacy-animation-engine/compositing/layer-creation/translate-scale-animation-overlap-expected.txt

    r244800 r256095  
    66      (bounds 800.00 600.00)
    77      (contentsOpaque 1)
    8       (children 703
     8      (children 685
    99        (GraphicsLayer
    1010          (offsetFromRenderer width=-14 height=-14)
     
    1515        )
    1616        (GraphicsLayer
    17           (position 30.00 30.00)
    18           (bounds 4.00 4.00)
    19           (contentsOpaque 1)
    20         )
    21         (GraphicsLayer
    2217          (position 40.00 30.00)
    2318          (bounds 4.00 4.00)
     
    210205        )
    211206        (GraphicsLayer
    212           (position 30.00 40.00)
    213           (bounds 4.00 4.00)
    214           (contentsOpaque 1)
    215         )
    216         (GraphicsLayer
    217207          (position 40.00 40.00)
    218208          (bounds 4.00 4.00)
     
    405395        )
    406396        (GraphicsLayer
    407           (position 30.00 50.00)
    408           (bounds 4.00 4.00)
    409           (contentsOpaque 1)
    410         )
    411         (GraphicsLayer
    412397          (position 40.00 50.00)
    413398          (bounds 4.00 4.00)
     
    600585        )
    601586        (GraphicsLayer
    602           (position 30.00 60.00)
    603           (bounds 4.00 4.00)
    604           (contentsOpaque 1)
    605         )
    606         (GraphicsLayer
    607587          (position 40.00 60.00)
    608588          (bounds 4.00 4.00)
     
    795775        )
    796776        (GraphicsLayer
    797           (position 30.00 70.00)
    798           (bounds 4.00 4.00)
    799           (contentsOpaque 1)
    800         )
    801         (GraphicsLayer
    802777          (position 40.00 70.00)
    803778          (bounds 4.00 4.00)
     
    990965        )
    991966        (GraphicsLayer
    992           (position 30.00 80.00)
    993           (bounds 4.00 4.00)
    994           (contentsOpaque 1)
    995         )
    996         (GraphicsLayer
    997967          (position 40.00 80.00)
    998968          (bounds 4.00 4.00)
     
    11851155        )
    11861156        (GraphicsLayer
    1187           (position 30.00 90.00)
    1188           (bounds 4.00 4.00)
    1189           (contentsOpaque 1)
    1190         )
    1191         (GraphicsLayer
    11921157          (position 40.00 90.00)
    11931158          (bounds 4.00 4.00)
     
    13801345        )
    13811346        (GraphicsLayer
    1382           (position 30.00 100.00)
    1383           (bounds 4.00 4.00)
    1384           (contentsOpaque 1)
    1385         )
    1386         (GraphicsLayer
    13871347          (position 40.00 100.00)
    13881348          (bounds 4.00 4.00)
     
    15751535        )
    15761536        (GraphicsLayer
    1577           (position 30.00 110.00)
    1578           (bounds 4.00 4.00)
    1579           (contentsOpaque 1)
    1580         )
    1581         (GraphicsLayer
    15821537          (position 40.00 110.00)
    15831538          (bounds 4.00 4.00)
     
    17701725        )
    17711726        (GraphicsLayer
    1772           (position 30.00 120.00)
    1773           (bounds 4.00 4.00)
    1774           (contentsOpaque 1)
    1775         )
    1776         (GraphicsLayer
    17771727          (position 40.00 120.00)
    17781728          (bounds 4.00 4.00)
     
    19651915        )
    19661916        (GraphicsLayer
    1967           (position 30.00 130.00)
    1968           (bounds 4.00 4.00)
    1969           (contentsOpaque 1)
    1970         )
    1971         (GraphicsLayer
    19721917          (position 40.00 130.00)
    19731918          (bounds 4.00 4.00)
     
    21602105        )
    21612106        (GraphicsLayer
    2162           (position 30.00 140.00)
    2163           (bounds 4.00 4.00)
    2164           (contentsOpaque 1)
    2165         )
    2166         (GraphicsLayer
    21672107          (position 40.00 140.00)
    21682108          (bounds 4.00 4.00)
     
    23552295        )
    23562296        (GraphicsLayer
    2357           (position 30.00 150.00)
    2358           (bounds 4.00 4.00)
    2359           (contentsOpaque 1)
    2360         )
    2361         (GraphicsLayer
    23622297          (position 40.00 150.00)
    23632298          (bounds 4.00 4.00)
     
    25502485        )
    25512486        (GraphicsLayer
    2552           (position 30.00 160.00)
    2553           (bounds 4.00 4.00)
    2554           (contentsOpaque 1)
    2555         )
    2556         (GraphicsLayer
    25572487          (position 40.00 160.00)
    25582488          (bounds 4.00 4.00)
     
    27452675        )
    27462676        (GraphicsLayer
    2747           (position 30.00 170.00)
    2748           (bounds 4.00 4.00)
    2749           (contentsOpaque 1)
    2750         )
    2751         (GraphicsLayer
    27522677          (position 40.00 170.00)
    27532678          (bounds 4.00 4.00)
     
    29402865        )
    29412866        (GraphicsLayer
    2942           (position 30.00 180.00)
    2943           (bounds 4.00 4.00)
    2944           (contentsOpaque 1)
    2945         )
    2946         (GraphicsLayer
    29472867          (position 40.00 180.00)
    29482868          (bounds 4.00 4.00)
     
    31353055        )
    31363056        (GraphicsLayer
    3137           (position 30.00 190.00)
    3138           (bounds 4.00 4.00)
    3139           (contentsOpaque 1)
    3140         )
    3141         (GraphicsLayer
    31423057          (position 40.00 190.00)
    31433058          (bounds 4.00 4.00)
     
    33263241        (GraphicsLayer
    33273242          (position 410.00 190.00)
    3328           (bounds 4.00 4.00)
    3329           (contentsOpaque 1)
    3330         )
    3331         (GraphicsLayer
    3332           (position 30.00 200.00)
    33333243          (bounds 4.00 4.00)
    33343244          (contentsOpaque 1)
  • trunk/Source/WebCore/ChangeLog

    r256094 r256095  
     12020-02-08  Simon Fraser  <simon.fraser@apple.com>
     2
     3        Extent of a composited animation should not include the untransformed position
     4        https://bugs.webkit.org/show_bug.cgi?id=207434
     5
     6        Reviewed by Sam Weinig.
     7
     8        To determine whether to create ("attach") backing store for layers with transform animations,
     9        we compute the union of all the states of the animation as an "extent", and ask whether it intersects
     10        the coverage rect in GraphicsLayerCA.
     11
     12        The non-Web Animations transition code did this correctly, just unioning the bounds transformed by
     13        the start and end state.
     14
     15        The non-Web Animations keyframe code, and the Web Animations KeyframeEffect code (used for both CSS transitions
     16        and animations) also unioned with the unanimated bounds, which could create overly large extents in some
     17        cases, contributing to jetsams on iOS (rdar://problem/59020443).
     18
     19        Fix KeyframeAnimation and KeyframeEffect to not union with the untransformed bounds.
     20
     21        Tests: compositing/backing/backing-store-attachment-animating-outside-viewport.html
     22               legacy-animation-engine/compositing/backing/backing-store-attachment-animating-outside-viewport.html
     23
     24        * animation/KeyframeEffect.cpp:
     25        (WebCore::KeyframeEffect::computeExtentOfTransformAnimation const):
     26        * page/animation/KeyframeAnimation.cpp:
     27        (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation const):
     28
    1292020-02-08  Zalan Bujtas  <zalan@apple.com>
    230
  • trunk/Source/WebCore/animation/KeyframeEffect.cpp

    r255810 r256095  
    15301530    auto rendererBox = snapRectToDevicePixels(box.borderBoxRect(), box.document().deviceScaleFactor());
    15311531
    1532     auto cumulativeBounds = bounds;
     1532    LayoutRect cumulativeBounds;
    15331533
    15341534    for (const auto& keyframe : m_blendingKeyframes.keyframes()) {
  • trunk/Source/WebCore/page/animation/KeyframeAnimation.cpp

    r252352 r256095  
    254254    auto rendererBox = snapRectToDevicePixels(box.borderBoxRect(), box.document().deviceScaleFactor());
    255255
    256     auto cumulativeBounds = bounds;
     256    LayoutRect cumulativeBounds;
    257257
    258258    for (auto& keyframe : m_keyframes.keyframes()) {
Note: See TracChangeset for help on using the changeset viewer.