<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>258134</bug_id>
          
          <creation_ts>2023-06-15 07:50:20 -0700</creation_ts>
          <short_desc>REGRESSION (iOS 17 beta): Playing animation in reverse not working in keyframes are same as previous animation</short_desc>
          <delta_ts>2023-06-23 10:34:48 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Animations</component>
          <version>Safari 17</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>257861</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Liam DeBeasi">ldebeasi</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>graouts</cc>
    
    <cc>karlcow</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1961799</commentid>
    <comment_count>0</comment_count>
      <attachid>466701</attachid>
    <who name="Liam DeBeasi">ldebeasi</who>
    <bug_when>2023-06-15 07:50:20 -0700</bug_when>
    <thetext>Created attachment 466701
Code reproduction

Playing an animation in reverse does not work in iOS 17 if the reversed keyframes are the same as an existing animation applied to the same element.

Steps to reproduce:

1. Open code reproduction on an iOS 17 device.
2. Tap &quot;Run Accelerated Test&quot;. Observe that the element translates from 0px to 100px, jumps back to 0px, and then jumps to 100px.

Expected Behavior:

I expect that the square will smoothly translate from 0px to 100px, jump back to 0px, and then smoothly translate to 100px.

Actual Behavior:

The square jumps to 100px after jumping back to 0px.


Other Information:

- This looks similar to https://bugs.webkit.org/show_bug.cgi?id=257861. I wasn&apos;t sure if they were the same, so feel free to merge the two threads if they are.
- This works as expected on iOS 16.
- This works as expected on Chrome and Firefox for macOS.
- This seems to only impact accelerated animations. Tapping &quot;Run Non-Accelerated Test&quot; does not reproduce the issue using margin-left.
- Running the second set of keyframes from 0px to 100px without using &quot;direction: &apos;reverse&apos;&quot; yields the expected behavior. You can try this using the &quot;Run Accelerated Test Without Reversing&quot; button.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1961896</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-06-15 14:22:03 -0700</bug_when>
    <thetext>&lt;rdar://problem/110861003&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963350</commentid>
    <comment_count>2</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2023-06-23 10:33:02 -0700</bug_when>
    <thetext>Thank you for filing this bug. Great test case!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1963351</commentid>
    <comment_count>3</comment_count>
    <who name="alan">zalan</who>
    <bug_when>2023-06-23 10:34:48 -0700</bug_when>
    <thetext>&gt;This looks similar to https://bugs.webkit.org/show_bug.cgi?id=257861. I wasn&apos;t sure if they were the same, so feel free to merge the two threads if they are.
Yup, you are correct. This is a dupe of bug 257861.

*** This bug has been marked as a duplicate of bug 257861 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>466701</attachid>
            <date>2023-06-15 07:50:20 -0700</date>
            <delta_ts>2023-06-15 07:50:20 -0700</delta_ts>
            <desc>Code reproduction</desc>
            <filename>index.html</filename>
            <type>text/html</type>
            <size>2191</size>
            <attacher name="Liam DeBeasi">ldebeasi</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPG1ldGEgY2hhcnNldD0iVVRGLTgi
IC8+CiAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRo
LCBpbml0aWFsLXNjYWxlPTEiIC8+CiAgICA8c3R5bGU+CiAgICAgIC5zcXVhcmUgewogICAgICAg
IHdpZHRoOiAxMDBweDsKICAgICAgICBoZWlnaHQ6IDEwMHB4OwogICAgICAgIAogICAgICAgIGJh
Y2tncm91bmQ6IGJsdWU7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9oZWFkPgogIDxib2R5PiAg
IAogICAgPGJ1dHRvbiBvbmNsaWNrPSJ0ZXN0KCkiPlJ1biBBY2NlbGVyYXRlZCBUZXN0PC9idXR0
b24+CiAgICA8YnV0dG9uIG9uY2xpY2s9InRlc3ROb1JldmVyc2UoKSI+UnVuIEFjY2VsZXJhdGVk
IFRlc3QgV2l0aG91dCBSZXZlcnNpbmc8L2J1dHRvbj4KICAgIDxidXR0b24gb25jbGljaz0idGVz
dE5vbkFjY2xlcmF0ZWQoKSI+UnVuIE5vbi1BY2NlbGVyYXRlZCBUZXN0PC9idXR0b24+CiAgICA8
ZGl2IGNsYXNzPSJzcXVhcmUiPjwvZGl2PgogICAgCiAgICA8c2NyaXB0PgogICAgICBjb25zdCBl
bCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5zcXVhcmUnKTsKICAgICAgCiAgICAgIGNvbnN0
IHRlc3QgPSAoKSA9PiB7CiAgICAgICAgY29uc3QgYW5pID0gZWwuYW5pbWF0ZShbCiAgICAgICAg
ICB7IG9mZnNldDogMCwgdHJhbnNmb3JtOiAndHJhbnNsYXRlWCgwcHgpJyB9LAogICAgICAgICAg
eyBvZmZzZXQ6IDEsIHRyYW5zZm9ybTogJ3RyYW5zbGF0ZVgoMTAwcHgpJyB9CiAgICAgICAgXSwg
ewogICAgICAgICAgZHVyYXRpb246IDUwMCwKICAgICAgICAgIGZpbGw6ICdib3RoJwogICAgICAg
IH0pOwogICAgICAgIAogICAgICAgIGFuaS5vbmZpbmlzaCA9ICgpID0+IHsKICAgICAgICAgIGVs
LmFuaW1hdGUoWwogICAgICAgICAgICB7IG9mZnNldDogMCwgdHJhbnNmb3JtOiAndHJhbnNsYXRl
WCgxMDBweCknIH0sCiAgICAgICAgICAgIHsgb2Zmc2V0OiAxLCB0cmFuc2Zvcm06ICd0cmFuc2xh
dGVYKDBweCknIH0KICAgICAgICAgIF0sIHsKICAgICAgICAgICAgZHVyYXRpb246IDUwMCwKICAg
ICAgICAgICAgZGlyZWN0aW9uOiAncmV2ZXJzZScKICAgICAgICAgIH0pOwogICAgICAgIH0KICAg
ICAgfQogICAgICAKICAgICAgY29uc3QgdGVzdE5vUmV2ZXJzZSA9ICgpID0+IHsKICAgICAgICBj
b25zdCBhbmkgPSBlbC5hbmltYXRlKFsKICAgICAgICAgIHsgb2Zmc2V0OiAwLCB0cmFuc2Zvcm06
ICd0cmFuc2xhdGVYKDBweCknIH0sCiAgICAgICAgICB7IG9mZnNldDogMSwgdHJhbnNmb3JtOiAn
dHJhbnNsYXRlWCgxMDBweCknIH0KICAgICAgICBdLCB7CiAgICAgICAgICBkdXJhdGlvbjogNTAw
LAogICAgICAgICAgZmlsbDogJ2JvdGgnCiAgICAgICAgfSk7CiAgICAgICAgCiAgICAgICAgYW5p
Lm9uZmluaXNoID0gKCkgPT4gewogICAgICAgICAgZWwuYW5pbWF0ZShbCiAgICAgICAgICAgIHsg
b2Zmc2V0OiAwLCB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDBweCknIH0sCiAgICAgICAgICAgIHsg
b2Zmc2V0OiAxLCB0cmFuc2Zvcm06ICd0cmFuc2xhdGVYKDEwMHB4KScgfQogICAgICAgICAgXSwg
ewogICAgICAgICAgICBkdXJhdGlvbjogNTAwCiAgICAgICAgICB9KTsKICAgICAgICB9CiAgICAg
IH0KICAgICAgCiAgICAgIGNvbnN0IHRlc3ROb25BY2NsZXJhdGVkID0gKCkgPT4gewogICAgICAg
IGNvbnN0IGFuaSA9IGVsLmFuaW1hdGUoWwogICAgICAgICAgeyBvZmZzZXQ6IDAsIG1hcmdpbkxl
ZnQ6ICcwcHgnIH0sCiAgICAgICAgICB7IG9mZnNldDogMSwgbWFyZ2luTGVmdDogJzEwMHB4JyB9
CiAgICAgICAgXSwgewogICAgICAgICAgZHVyYXRpb246IDUwMCwKICAgICAgICAgIGZpbGw6ICdi
b3RoJwogICAgICAgIH0pOwogICAgICAgIAogICAgICAgIGFuaS5vbmZpbmlzaCA9ICgpID0+IHsK
ICAgICAgICAgIGVsLmFuaW1hdGUoWwogICAgICAgICAgICB7IG9mZnNldDogMCwgbWFyZ2luTGVm
dDogJzEwMHB4J30sCiAgICAgICAgICAgIHsgb2Zmc2V0OiAxLCBtYXJnaW5MZWZ0OiAnMHB4J30K
ICAgICAgICAgIF0sIHsKICAgICAgICAgICAgZHVyYXRpb246IDUwMCwKICAgICAgICAgICAgZGly
ZWN0aW9uOiAncmV2ZXJzZScKICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgfQogICAgPC9z
Y3JpcHQ+CiAgPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>