<?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>320441</bug_id>
          
          <creation_ts>2026-07-28 02:13:55 -0700</creation_ts>
          <short_desc>url(#foo) in external SVG via &lt;use&gt; incorrectly looks for referenced entity in outer document</short_desc>
          <delta_ts>2026-08-04 02:14:12 -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>Safari 26</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=65344</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>
          <dependson>320107</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sérgio Gomes">sergio.gomes</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>karlcow</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>taher_ali</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2234766</commentid>
    <comment_count>0</comment_count>
    <who name="Sérgio Gomes">sergio.gomes</who>
    <bug_when>2026-07-28 02:13:55 -0700</bug_when>
    <thetext>If a document loads an external SVG file via SVG `&lt;use&gt;`, then any `url(#foo)` usage in that external SVG file fails, because it is apparently looking for `foo` in the importing document instead of the external SVG file.

To illustrate this, here is a small test page: https://sgomes.github.io/external-svg-with-filter/

It includes both a &quot;correct usage&quot; test, where both the filter and the element that makes use of it are defined inside the external SVG; as well as an &quot;incorrect usage&quot; test that matches WebKit&apos;s apparent expectation, where the filter is instead defined in the importing document.

Blink and Gecko pass the &quot;correct usage&quot; test by rendering the shadow, and pass the &quot;incorrect usage&quot; test by rendering an entirely white image.

Webkit fails the &quot;correct usage&quot; test by rendering an entirely white image, and fails the &quot;incorrect usage example&quot; by rendering the shadow.

This problem had initially been reported as a comment in 65344 (https://bugs.webkit.org/show_bug.cgi?id=65344#c8) and was moved to a new issue as requested by taher_ali@apple.com.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2237015</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-08-04 02:14:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/184004736&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>