<?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>303998</bug_id>
          
          <creation_ts>2025-12-11 08:51:39 -0800</creation_ts>
          <short_desc>[SVG] Interoperability Failure: &lt;style&gt; inside external SVG referenced by &lt;use&gt; is ignored (Blink implements, WebKit/Gecko do not)</short_desc>
          <delta_ts>2025-12-12 02:17:41 -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>SVG</component>
          <version>WebKit Local Build</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 11</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>249080</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=249080</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Arif">arif.hossain.9213</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>karlcow</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2165118</commentid>
    <comment_count>0</comment_count>
      <attachid>477694</attachid>
    <who name="Arif">arif.hossain.9213</who>
    <bug_when>2025-12-11 08:51:39 -0800</bug_when>
    <thetext>Created attachment 477694
Test files

This issue reports an interoperability failure where Chrome/Blink applies styles from a &lt;style&gt; block within an external SVG referenced by &lt;use&gt;, but WebKit (Safari) and Gecko (Firefox) ignore these styles. This discrepancy breaks the intended modularity of SVGs.

The Scalable Vector Graphics (SVG) 2 specification, Section 5.6.3 (Style Scoping and Inheritance), states that the stylesheet objects from the referenced external document should apply to the elements within the use-element shadow tree. WebKit&apos;s current behavior appears to contradict this intent.

Steps to Reproduce:
1. Save the attached SVG file as rounded_marks.svg. (This SVG contains an internal &lt;style&gt; block.)

2. Save the attached HTML file as test.html. (This file uses &lt;use href=&quot;rounded_marks.svg&quot;&gt;&lt;/use&gt;.)

3. Open test.html in Safari/WebKit.

4. Open test.html in Chrome/Blink (for comparison).

Observed Behavior (WebKit/Safari):
The SVG renders nothing, or renders unstyled elements, indicating that the stylesheet from the external document is not being applied to the shadow tree.

Observed Behavior (Chrome/Blink):
The SVG renders correctly, successfully applying the styles from the external &lt;style&gt; block, aligning with the intent of SVG 2 style scoping.

Interoperability References:
Gecko/Firefox Bug (Closed INVALID): Mozilla Bug 2004673

Upcoming Blink/Chromium Bug: Chromium Bug 467468919

Expected Behavior (Advocacy for Convergence):
I strongly support the application of internal &lt;style&gt; blocks from the external SVG to the shadow root. This behavior is crucial for modularity, as it allows the SVG to be a self-contained component that defines its own styling.

We request that the WebKit team review the SVG 2 specification (Section 5.6.3) and consider aligning with Chrome&apos;s implementation to enable this intended and highly useful feature for modular SVG components across the web.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2165158</commentid>
    <comment_count>1</comment_count>
    <who name="Arif">arif.hossain.9213</who>
    <bug_when>2025-12-11 10:55:01 -0800</bug_when>
    <thetext>https://www.w3.org/TR/SVG2/struct.html#UseStyleInheritance</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2165285</commentid>
    <comment_count>2</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-12-11 17:18:44 -0800</bug_when>
    <thetext>This seems a duplicate of the bug I&apos;m trying to fix. 
Bug 249080
https://github.com/WebKit/WebKit/pull/53713

But is a bit more complex than I initially thought.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2165286</commentid>
    <comment_count>3</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-12-11 17:20:54 -0800</bug_when>
    <thetext>see my comment in the PR.

Gecko is implementing the specification correctly and is receiving
web compatibility pressure, because some web developers have different
behaviors in different browsers. This behavior has been shipped since
Firefox 56 in 2017.
https://bugzilla.mozilla.org/show_bug.cgi?id=265894

Blink has just published an intent to ship to align with the behavior of
Firefox and the specification.
https://groups.google.com/a/chromium.org/g/blink-dev/c/8ZT9te1tP4E
https://crbug.com/40663285</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2165287</commentid>
    <comment_count>4</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-12-11 17:22:18 -0800</bug_when>
    <thetext>Hi Arif, 
thanks for the report.

&gt; We request that the WebKit team review the SVG 2 specification

who is &quot;We&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2165344</commentid>
    <comment_count>5</comment_count>
    <who name="Arif">arif.hossain.9213</who>
    <bug_when>2025-12-12 00:35:14 -0800</bug_when>
    <thetext>(In reply to Karl Dubost from comment #4)
&gt; Hi Arif, 
&gt; thanks for the report.
&gt; 
&gt; &gt; We request that the WebKit team review the SVG 2 specification
&gt; 
&gt; who is &quot;We&quot;?

My apologies, this bug report was generated by an AI. The &apos;We&apos; it mentions likely refers to the developers. My actual issue is the following: WebKit is failing to apply styles defined in an external SVG&apos;s &lt;style&gt; block when rendered inside a &lt;use&gt; shadow root. Please confirm this behavior using the attached files.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2165364</commentid>
    <comment_count>6</comment_count>
    <who name="Karl Dubost">karlcow</who>
    <bug_when>2025-12-12 02:17:41 -0800</bug_when>
    <thetext>OK so let me close this as a duplicate

*** This bug has been marked as a duplicate of bug 249080 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>477694</attachid>
            <date>2025-12-11 08:51:39 -0800</date>
            <delta_ts>2025-12-11 08:51:39 -0800</delta_ts>
            <desc>Test files</desc>
            <filename>test.zip</filename>
            <type>application/x-zip-compressed</type>
            <size>1819</size>
            <attacher name="Arif">arif.hossain.9213</attacher>
            
              <data encoding="base64">UEsDBBQACAAIAA22i1sAAAAAAAAAAAAAAAAJACAAdGVzdC5odG1sdXgLAAEEAAAAAAQAAAAAVVQN
AAfa9TppJvY6abykNml9U7FOwzAQ3Sv1H0wGBFLdtAwIpU4WKCsMZWBCbnKNTW0nsp2UCPXfcdIU
pa3hFvvunp7v3Z3J1dPL4+r9dYmYlSIZj0h7IkFVHgegAhcZj5AzwoBmyeHe+RIsRSmj2oCNg7fV
M34ILvKKSoiDmsOuLLQNUFooC8rhdzyzLM6g5ingzpkgrrjlVGCTUgHxfDo74bPcCkiWX1SWAkh4
cI/VdQhjmy6EBrYusgZ9n8Zak1TnXEVotrjMMeA5sxGaz2Y18+Q/K2P5psHcgjQRSp0g0B4cFTxX
uJf8B24/VNCaqXNfvRk3paBNhNaiSLe+x0wJqcWaWl640v+RJbm66aRNOoW728V5Da1hbDVVxk2k
cG2aGw8hxq6LW6wqiY2kQjjYnZfrOmJFDdqny89z7xvL/qJzxysJh6MnYb+qvduuwHCRXIfPloRU
BhDTsIkDXVQqg+yjrchMHTRISOjSyclrvwwk7Nndxwm7H/QDUEsHCGLZHsRsAQAAUQMAAFBLAwQU
AAgACAALrotbAAAAAAAAAAAAAAAAEQAgAHJvdW5kZWRfbWFya3Muc3ZndXgLAAEEAAAAAAQAAAAA
VVQNAAfH5zppAPY6aUtz4meVVlFv2zYQfi/Q/3BxXuzMih0HLTAtDuCmaxcsTYbY2dBHWqYlIhIp
kFRkrxiwf7i/1CMpRpItZ6kBAzZ5vPvu7vuOvFBPMWyylKtpL9E6D0ejsixPy/NTIePRZDwej9Ci
B0+Mlh/EZtobwxjeje23d/n2DcCF0tuU2p8ApxmRj0HEZJRS+ObWAEYnMJ1O4eru9tP154f72eL6
7hb+nN1fzz7c/Dq3eyejt28a5r+JEj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