<?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>287789</bug_id>
          
          <creation_ts>2025-02-17 02:27:37 -0800</creation_ts>
          <short_desc>[scroll-animations] &quot;In &amp; Out&quot; demos of https://nerdy.dev/notebook/scroll-driven-animations.html mostly do not work</short_desc>
          <delta_ts>2025-02-21 01:25:21 -0800</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>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://github.com/web-platform-tests/wpt/pull/50838</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>284525</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Antoine Quint">graouts</reporter>
          <assigned_to name="Antoine Quint">graouts</assigned_to>
          <cc>graouts</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2095123</commentid>
    <comment_count>0</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-02-17 02:27:37 -0800</bug_when>
    <thetext>The page https://nerdy.dev/notebook/scroll-driven-animations.html contains a fair few view timelines showcases and while all examples in the &quot;Entrances&quot; section work fine in WebKit, the &quot;In &amp; Out&quot; section has a lot of different behavior between Chrome and WebKit. Those need investigating.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2095124</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-02-17 02:27:58 -0800</bug_when>
    <thetext>&lt;rdar://problem/144974803&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2096352</commentid>
    <comment_count>2</comment_count>
      <attachid>474309</attachid>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-02-20 07:41:29 -0800</bug_when>
    <thetext>Created attachment 474309
Candycane effect reduction

Started looking at just the &quot;Candycane&quot; example and I&apos;ve attached a reduction with some console logging. The timeline and animation current times appear to be as expected. However, the computed progress is completely different in WebKit compared to Chrome, which directly maps to the margin-left value that is applied in style.

It appears the issue is that we&apos;re not computing keyframes correctly. This is the keyframes rule specified in CSS:

```
@keyframes candycane {
    entry 0% { margin-left: -200px }
    entry 200% { margin-left: 0 }
    exit -100% { margin-left: 0 }
    exit 100% { margin-left: 200px }
}
```

In Chrome, the offsets are computed as:

entry 0% → 0
entry 200% → 0.18181818181818182
exit -100% → 0.8181818181818182
exit 100% → 1

In WebKit, the offsets are computed as:

entry 0% → 0
exit 100% → 1

This indicates faulty logic in our parsing code dropping keyframes where the percentage value is not comprised in the [0%-100%] range.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2096405</commentid>
    <comment_count>3</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-02-20 09:59:10 -0800</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/40977</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2096408</commentid>
    <comment_count>4</comment_count>
    <who name="Antoine Quint">graouts</who>
    <bug_when>2025-02-20 10:04:50 -0800</bug_when>
    <thetext>Submitted web-platform-tests pull request: https://github.com/web-platform-tests/wpt/pull/50838</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2096660</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-02-21 01:25:19 -0800</bug_when>
    <thetext>Committed 290776@main (c7ec9d7ff067): &lt;https://commits.webkit.org/290776@main&gt;

Reviewed commits have been landed. Closing PR #40977 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>474309</attachid>
            <date>2025-02-20 07:41:29 -0800</date>
            <delta_ts>2025-02-20 07:41:29 -0800</delta_ts>
            <desc>Candycane effect reduction</desc>
            <filename>view-timeline-candycane.html</filename>
            <type>text/html</type>
            <size>1716</size>
            <attacher name="Antoine Quint">graouts</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sIGxhbmc9ImVuIj4KPGhlYWQ+CjxtZXRhIGNoYXJzZXQ9InV0
Zi04Ij4KPG1ldGEgaHR0cC1lcXVpdj0ieC11YS1jb21wYXRpYmxlIiBjb250ZW50PSJpZT1lZGdl
Ij4KPG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPWRldmljZS13aWR0aCwgaW5p
dGlhbC1zY2FsZT0xLCBzaHJpbmstdG8tZml0PW5vIj4KCjx0aXRsZT48L3RpdGxlPgo8c3R5bGU+
Cgp1bCB7CiAgICB3aWR0aDogMjAwcHg7CiAgICBoZWlnaHQ6IDM4MHB4OwogICAgcGFkZGluZzog
MDsKICAgIG92ZXJmbG93LXg6IGhpZGRlbjsKICAgIG92ZXJmbG93LXk6IHNjcm9sbDsKICAgIGJv
cmRlcjogMXB4IHNvbGlkIGJsYWNrOwogICAgbGlzdC1zdHlsZTogbm9uZTsKfQoKbGkgewogICAg
Ym94LXNpemluZzogYm9yZGVyLWJveDsKICAgIHBhZGRpbmc6IDEwcHg7CiAgICBiYWNrZ3JvdW5k
OiBncmF5OwoKICAgIHdpZHRoOiAxMDAlOwogICAgaGVpZ2h0OiAzOHB4OwoKICAgIGFuaW1hdGlv
bjogY2FuZHljYW5lIGxpbmVhciBib3RoOwogICAgYW5pbWF0aW9uLXRpbWVsaW5lOiB2aWV3KC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mb3JF
YWNoKChhbmltYXRpb24sIGluZGV4KSA9PiB7CiAgICAgICAgY29uc29sZS5sb2coYFske2luZGV4
fV0gdGltZWxpbmUgPSAke2FuaW1hdGlvbi50aW1lbGluZS5jdXJyZW50VGltZS50b1N0cmluZygp
fSwgYW5pbWF0aW9uID0gJHthbmltYXRpb24uY3VycmVudFRpbWUudG9TdHJpbmcoKX0sIHByb2dy
ZXNzID0gJHthbmltYXRpb24uZWZmZWN0LmdldENvbXB1dGVkVGltaW5nKCkucHJvZ3Jlc3N9LCBt
YXJnaW4tbGVmdCA9ICR7Z2V0Q29tcHV0ZWRTdHlsZShhbmltYXRpb24uZWZmZWN0LnRhcmdldCku
bWFyZ2luTGVmdH1gKTsKICAgIH0pOwp9KSgpOwoKCjwvc2NyaXB0PgogIAo8L2JvZHk+CjwvaHRt
bD4KCgoK
</data>

          </attachment>
      

    </bug>

</bugzilla>