<?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>275293</bug_id>
          
          <creation_ts>2024-06-08 12:22:37 -0700</creation_ts>
          <short_desc>[SVG] Handle `repeatEvent` for svg animations</short_desc>
          <delta_ts>2025-09-17 15:22:20 -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>SVG</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://bugs.webkit.org/show_bug.cgi?id=299047</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>BrowserCompat, InRadar, WPTImpact</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ahmad Saleem">ahmad.saleem792</reporter>
          <assigned_to name="Ahmad Saleem">ahmad.saleem792</assigned_to>
          <cc>sabouhallawa</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2040492</commentid>
    <comment_count>0</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-06-08 12:22:37 -0700</bug_when>
    <thetext>Hi Team,

While going through SVG Animations failure, I noticed that we fail &apos;repeat&apos; event.

Blink Commit: https://chromium.googlesource.com/chromium/blink/+/f7d3a4aaa8598d79b137dde63e9b401ea351e1e9

WebKit Source: https://github.com/WebKit/WebKit/blob/502bfe649c550c59266753403cb4b2ab86854333/Source/WebCore/svg/animation/SVGSMILElement.cpp

Following compiles:

&gt; Source/WebCore/dom/EventNames.json:

Add -&gt; &quot;repeatEvent&quot;: { },

&gt; Source/WebCore/svg/animation/SVGSMILElement.cpp:

In &apos;SVGSMILElement::progress&apos;:

After:

if (oldActiveState == Inactive)
            startedActiveInterval();

Add following:

if (repeat &amp;&amp; repeat != m_lastRepeat)
            smilEventSender().dispatchEventSoon(*this, eventNames().repeatEventEvent);

In same, after &apos;if (seekToTime)&apos; (within same loop) add following:

if (repeat) {
            for (unsigned repeatEventCount = 1; repeatEventCount &lt; repeat; repeatEventCount++) {
                smilEventSender().dispatchEventSoon(*this, eventNames().repeatEventEvent);
            }
            if (m_activeState == Inactive)
                smilEventSender().dispatchEventSoon(*this, eventNames().repeatEventEvent);
        }

___

It progress following: https://wpt.fyi/results/svg/animations/repeat-event.svg?label=experimental&amp;label=master&amp;aligned=

___

Just raising so we can fix it.

Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2041534</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2024-06-15 12:23:14 -0700</bug_when>
    <thetext>&lt;rdar://problem/129919749&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2135463</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2025-08-09 14:34:55 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/29658</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2136644</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-08-14 16:14:53 -0700</bug_when>
    <thetext>Committed 298715@main (d7366f00065a): &lt;https://commits.webkit.org/298715@main&gt;

Reviewed commits have been landed. Closing PR #29658 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>