<?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>290983</bug_id>
          
          <creation_ts>2025-04-03 02:07:06 -0700</creation_ts>
          <short_desc>fws-supply.website: SVG &lt;use&gt; should work without specifying a fragment identifier</short_desc>
          <delta_ts>2026-05-19 23:33:09 -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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=191292</see_also>
          <bug_file_loc>http://wpt.live/svg/struct/reftests/use-external-svg-resource-no-fragment-id.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>65344</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Oliver Williams">oliverwilliams345</reporter>
          <assigned_to name="Karl Dubost">karlcow</assigned_to>
          <cc>agafvv</cc>
    
    <cc>ahmad.saleem792</cc>
    
    <cc>chriskirknielsen+wkbugs</cc>
    
    <cc>karlcow</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>2108451</commentid>
    <comment_count>0</comment_count>
    <who name="Oliver Williams">oliverwilliams345</who>
    <bug_when>2025-04-03 02:07:06 -0700</bug_when>
    <thetext>Currently it is necessary to add an id to every SVG that a developer wants to use using &lt;use&gt;. According to the SVG 2 spec, this should no longer be required. Chromium version 137 is will remove this requirement. https://chromestatus.com/feature/5128141573718016

Rather than

&lt;svg&gt;
&lt;use href=&quot;heart.svg#icon&quot;&gt;&lt;/use&gt;
&lt;/svg&gt;

It should be possible to reference an entire SVG files directly:

&lt;svg&gt;
&lt;use href=&quot;heart.svg&quot;&gt;&lt;/use&gt;
&lt;/svg&gt;

In a time of HTTP/2, there is no longer a performance need to use sprite sheets. Keeping SVG as separate files is an easier approach. When using &lt;use&gt; for an icon system, needing to add an id to every SVG is laborious and error prone.

Relevant spec link is here https://svgwg.org/svg2-draft/struct.html#UseElement</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2109336</commentid>
    <comment_count>1</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-04-06 22:32:07 -0700</bug_when>
    <thetext>Thanks Oliver for the bug. 
Probably things to explore around. 
https://searchfox.org/wubkat/rev/85b73124f671d6d8fbe2b6dc730b98711b42326d/Source/WebCore/svg/SVGUseElement.cpp#447-482</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2110137</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-04-10 02:08:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/148973201&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2210076</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-05-12 03:04:41 -0700</bug_when>
    <thetext>&gt; The ‘use’ element can reference an entire SVG document by specifying an ‘href’ value without a fragment. Such references are taken to be referring to the root element of the referenced document.
— https://w3c.github.io/svgwg/svg2-draft/struct.html#UseElementHrefAttribute</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2210080</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-05-12 03:17:49 -0700</bug_when>
    <thetext>https://wpt.fyi/results/svg/struct/reftests/use-external-svg-resource-no-fragment-id.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2210088</commentid>
    <comment_count>5</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2026-05-12 03:52:15 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/64752</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2212339</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-05-19 23:33:06 -0700</bug_when>
    <thetext>Committed 313550@main (9ba5d25ffcf1): &lt;https://commits.webkit.org/313550@main&gt;

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

    </bug>

</bugzilla>