<?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>202791</bug_id>
          
          <creation_ts>2019-10-10 03:19:44 -0700</creation_ts>
          <short_desc>SMIL animations of href / xlink:href of &lt;image&gt; have no visual effect</short_desc>
          <delta_ts>2026-04-29 11:46:08 -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>
          
          
          <bug_file_loc>https://dev.w3.org/SVG/profiles/1.1F2/test/harness/htmlObjectApproved/animate-elem-39-t.html</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="Nikolas Zimmermann">zimmermann</reporter>
          <assigned_to name="Ahmad Saleem">ahmad.saleem792</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>rwlbuis</cc>
    
    <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>1578585</commentid>
    <comment_count>0</comment_count>
    <who name="Nikolas Zimmermann">zimmermann</who>
    <bug_when>2019-10-10 03:19:44 -0700</bug_when>
    <thetext>LayoutTests/svg/W3C-SVG-1.1/animate-elem-39-t.svg shows that SMIL animations of the &lt;image&gt; element href / xlink:href have no effect.

A quick investigation shows that imageSourceURL() is the culprit, since it simply returns getAttribute(SVGNames::hrefAttr, XLinkNames::hrefAttr) -- which is equal to the serialized baseVal of the underlying SVGAnimatedString, never reflecting the animVal.

SVGURIReference::href() returns the right value, and also correctly handles href vs. xlink:href, since the baseVal is either reflecting href, or if xlink:href (if any of them is set).

The only issue is that imageSourceURL() returns a reference to a const AtomString, and thus we cannot simply return href().

A quick hack to fix SMIL animations on the aforementioned testcase is:

const AtomString&amp; SVGImageElement::imageSourceURL() const
{   
    static NeverDestroyed&lt;AtomString&gt; tempAtom(&quot;tempAtom&quot;, AtomString::ConstructFromLiteral);
    AtomString&amp; mutableAtom = tempAtom;
    mutableAtom = href();
    return tempAtom;
}

We either have to give up the &quot;const AtomString&amp;&quot; return value, or add a new AtomString m_imageSourceURL member to SVGImageElement.
And obviously we need more test coverage!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1880182</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-01 15:10:35 -0700</bug_when>
    <thetext>&lt;rdar://problem/96316808&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1964567</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-06-30 14:13:55 -0700</bug_when>
    <thetext>Fixed in Blink by giving up on AtomString&amp; and just returning (&quot;href()&quot;).

https://src.chromium.org/viewvc/blink?view=revision&amp;revision=157025</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2058811</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2024-09-09 18:11:30 -0700</bug_when>
    <thetext>(In reply to Ahmad Saleem from comment #2)
&gt; Fixed in Blink by giving up on AtomString&amp; and just returning (&quot;href()&quot;).
&gt; 
&gt; https://src.chromium.org/viewvc/blink?view=revision&amp;revision=157025

SVG link is gone - https://source.chromium.org/chromium/chromium/src/+/93976b6624f40024070bea7dde68e81a3d366173</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2192300</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2026-03-20 21:44:08 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/61066</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2195192</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-03-30 09:30:31 -0700</bug_when>
    <thetext>Committed 310236@main (4a210d1278f1): &lt;https://commits.webkit.org/310236@main&gt;

Reviewed commits have been landed. Closing PR #61066 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2205826</commentid>
    <comment_count>6</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2026-04-29 10:09:18 -0700</bug_when>
    <thetext>This change is present in Safari Technology Preview 242. Please install that revision or newer to confirm the fix.

Release notes: https://webkit.org/blog/17934/release-notes-for-safari-technology-preview-242/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2205898</commentid>
    <comment_count>7</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2026-04-29 11:46:08 -0700</bug_when>
    <thetext>This change is present in Safari Technology Preview 241. Please install that revision or newer to confirm the fix.

Release notes: https://webkit.org/blog/17917/release-notes-for-safari-technology-preview-241/</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>