<?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>285420</bug_id>
          
          <creation_ts>2025-01-06 04:28:19 -0800</creation_ts>
          <short_desc>Outline not rendered correctly for inline SVG</short_desc>
          <delta_ts>2025-05-15 18:39:11 -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>Layout and Rendering</component>
          <version>Safari 18</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 14</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc>https://jsfiddle.net/h2opt0L5/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>net</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>bfulgham</cc>
    
    <cc>karlcow</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2085018</commentid>
    <comment_count>0</comment_count>
    <who name="">net</who>
    <bug_when>2025-01-06 04:28:19 -0800</bug_when>
    <thetext>I tried to add an outline to inline SVG illustrations with the following code:

```
&lt;html&gt;
&lt;head&gt;
  &lt;style&gt;
  body {
        display: flex;
        flex-direction: column;
        align-items: center;
        &amp; &gt; * {
                width: 75vw;
                max-width: 400px;
        }
  }
  figure {
        display: block;
        height: auto;
        max-width: 50%;
        margin: 10px auto 10px auto;
        &amp;:active {
                max-width: 150%;
                margin: 10px -50px 10px -50px;
        }
        &amp; svg {
                display: block;
                height: auto;
                width: 50%;
        max-width: 50%;
        margin: 0 auto 0 auto;
        &amp;:hover {
                outline: 2px black outset;
                outline-offset: 2px;
        }
        &amp;:active { outline: none; }
    }
  }
  &lt;/style&gt;
  &lt;title&gt;
  &lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;figure&gt;
    &lt;svg version=&quot;1.1&quot; baseprofile=&quot;full&quot; width=&quot;300&quot; height=&quot;200&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot;&gt;
    &lt;rect width=&quot;100%&quot; height=&quot;100%&quot; fill=&quot;red&quot;&gt;&lt;/rect&gt;
    &lt;circle cx=&quot;150&quot; cy=&quot;100&quot; r=&quot;80&quot; fill=&quot;green&quot;&gt;&lt;/circle&gt;
    &lt;text x=&quot;150&quot; y=&quot;125&quot; font-size=&quot;60&quot; text-anchor=&quot;middle&quot; fill=&quot;white&quot;&gt;
      SVG
    &lt;/text&gt;&lt;/svg&gt;
  &lt;/figure&gt;
&lt;/body&gt;
&lt;/html&gt;
``` 

The outline does not appear on hovering, but only after clicking the SVG, and then remains visible even when the mouse pointer is moved away. Both Firefox und Chrome render the outline correctly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2086721</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-01-13 04:29:13 -0800</bug_when>
    <thetext>&lt;rdar://problem/142807293&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117513</commentid>
    <comment_count>2</comment_count>
      <attachid>475257</attachid>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2025-05-15 18:39:11 -0700</bug_when>
    <thetext>Created attachment 475257
Test case</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>475257</attachid>
            <date>2025-05-15 18:39:11 -0700</date>
            <delta_ts>2025-05-15 18:39:11 -0700</delta_ts>
            <desc>Test case</desc>
            <filename>svg-outline.html</filename>
            <type>text/html</type>
            <size>1161</size>
            <attacher name="Simon Fraser (smfr)">simon.fraser</attacher>
            
              <data encoding="base64">PGh0bWw+CjxoZWFkPgogIDxzdHlsZT4KICBib2R5IHsKICAgICAgICBkaXNwbGF5OiBmbGV4Owog
ICAgICAgIGZsZXgtZGlyZWN0aW9uOiBjb2x1bW47CiAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRl
cjsKICAgICAgICAmID4gKiB7CiAgICAgICAgICAgICAgICB3aWR0aDogNzV2dzsKICAgICAgICAg
ICAgICAgIG1heC13aWR0aDogNDAwcHg7CiAgICAgICAgfQogIH0KICBmaWd1cmUgewogICAgICAg
IGRpc3BsYXk6IGJsb2NrOwogICAgICAgIGhlaWdodDogYXV0bzsKICAgICAgICBtYXgtd2lkdGg6
IDUwJTsKICAgICAgICBtYXJnaW46IDEwcHggYXV0byAxMHB4IGF1dG87CiAgICAgICAgJjphY3Rp
dmUgewogICAgICAgICAgICAgICAgbWF4LXdpZHRoOiAxNTAlOwogICAgICAgICAgICAgICAgbWFy
Z2luOiAxMHB4IC01MHB4IDEwcHggLTUwcHg7CiAgICAgICAgfQogICAgICAgICYgc3ZnIHsKICAg
ICAgICAgICAgICAgIGRpc3BsYXk6IGJsb2NrOwogICAgICAgICAgICAgICAgaGVpZ2h0OiBhdXRv
OwogICAgICAgICAgICAgICAgd2lkdGg6IDUwJTsKICAgICAgICBtYXgtd2lkdGg6IDUwJTsKICAg
ICAgICBtYXJnaW46IDAgYXV0byAwIGF1dG87CiAgICAgICAgJjpob3ZlciB7CiAgICAgICAgICAg
ICAgICBvdXRsaW5lOiAycHggYmxhY2sgb3V0c2V0OwogICAgICAgICAgICAgICAgb3V0bGluZS1v
ZmZzZXQ6IDJweDsKICAgICAgICB9CiAgICAgICAgJjphY3RpdmUgeyBvdXRsaW5lOiBub25lOyB9
CiAgICB9CiAgfQogIDwvc3R5bGU+CiAgPHRpdGxlPgogIDwvdGl0bGU+CjwvaGVhZD4KPGJvZHk+
CiAgPGZpZ3VyZT4KICAgIDxzdmcgdmVyc2lvbj0iMS4xIiBiYXNlcHJvZmlsZT0iZnVsbCIgd2lk
dGg9IjMwMCIgaGVpZ2h0PSIyMDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+
CiAgICA8cmVjdCB3aWR0aD0iMTAwJSIgaGVpZ2h0PSIxMDAlIiBmaWxsPSJyZWQiPjwvcmVjdD4K
ICAgIDxjaXJjbGUgY3g9IjE1MCIgY3k9IjEwMCIgcj0iODAiIGZpbGw9ImdyZWVuIj48L2NpcmNs
ZT4KICAgIDx0ZXh0IHg9IjE1MCIgeT0iMTI1IiBmb250LXNpemU9IjYwIiB0ZXh0LWFuY2hvcj0i
bWlkZGxlIiBmaWxsPSJ3aGl0ZSI+CiAgICAgIFNWRwogICAgPC90ZXh0Pjwvc3ZnPgogIDwvZmln
dXJlPgo8L2JvZHk+CjwvaHRtbD4K
</data>

          </attachment>
      

    </bug>

</bugzilla>