<?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>219531</bug_id>
          
          <creation_ts>2020-12-03 22:50:16 -0800</creation_ts>
          <short_desc>&lt;use&gt; fails to target &lt;path&gt; inserted later</short_desc>
          <delta_ts>2023-05-30 11:10:33 -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>DUPLICATE</resolution>
          <dup_id>216363</dup_id>
          
          <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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Kaiido">tristan.fraipont</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
    
    <cc>rniwa</cc>
    
    <cc>sabouhallawa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>smoley</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
    
    <cc>zimmermann</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1711954</commentid>
    <comment_count>0</comment_count>
      <attachid>415389</attachid>
    <who name="Kaiido">tristan.fraipont</who>
    <bug_when>2020-12-03 22:50:16 -0800</bug_when>
    <thetext>Created attachment 415389
test case

https://jsfiddle.net/g36aokvt/

When a &lt;use&gt; element targets a &lt;path&gt; element that will be appended in the DOM after the &lt;use&gt;, the &lt;use&gt; element fails to update and to clone the target correctly.  
This works fine in every browsers and in WebKit too when the target is a &lt;rect&gt; or a &lt;circle&gt;.

I guess this is a recent regression, but I was unable to run bisect-builds correctly to be sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1712589</commentid>
    <comment_count>1</comment_count>
    <who name="Smoley">smoley</who>
    <bug_when>2020-12-07 13:42:48 -0800</bug_when>
    <thetext>Thanks for filing, I can reproduce this on Safari 13.1.3 as well as STP 116.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1712590</commentid>
    <comment_count>2</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2020-12-07 13:43:01 -0800</bug_when>
    <thetext>&lt;rdar://problem/72062144&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1890831</commentid>
    <comment_count>3</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-12 00:26:45 -0700</bug_when>
    <thetext>I am able to reproduce this bug in Safari 15.6 and Safari Technical Preview 151 where the test case does not show &quot;red&quot; square like other browsers (Chrome Canary 106 and Firefox Nightly 105) after some time. Just wanted to share updated test results. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958809</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-05-30 10:46:17 -0700</bug_when>
    <thetext>It seems to work in WebKit ToT (264678@main) and I think it is fixed now.

Will wait for someone else also to confirm since I do have some SVG patches in my local builds with above ToT.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1958814</commentid>
    <comment_count>5</comment_count>
    <who name="Said Abou-Hallawa">sabouhallawa</who>
    <bug_when>2023-05-30 11:10:33 -0700</bug_when>
    <thetext>This was fixed by the fix of bug 216363 (264085@main).

*** This bug has been marked as a duplicate of bug 216363 ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>415389</attachid>
            <date>2020-12-03 22:50:16 -0800</date>
            <delta_ts>2020-12-03 22:50:16 -0800</delta_ts>
            <desc>test case</desc>
            <filename>test-case.html</filename>
            <type>text/html</type>
            <size>648</size>
            <attacher name="Kaiido">tristan.fraipont</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgogIDxoZWFkPgogICAgPG1ldGEgY2hhcnNldD0iVVRGLTgi
PgogICAgPHRpdGxlPjwvdGl0bGU+CiAgPC9oZWFkPgogIDxib2R5Pgo8c3ZnPgogIDxkZWZzPgog
ICAgPHBhdGggaWQ9InBhdGgtaW5saW5lIiBmaWxsPSJncmVlbiIgZD0iTTAgMCBMNTAgMCBMNTAg
NTAgTDAgNTAgWiIvPgogIDwvZGVmcz4KICA8dXNlIGhyZWY9IiNwYXRoLWRlbGF5ZWQiIHg9IjAi
Lz4KICA8dXNlIGhyZWY9IiNyZWN0LWRlbGF5ZWQiIHg9IjYwIi8+CiAgPHVzZSBocmVmPSIjcGF0
aC1pbmxpbmUiICB4PSIxMjAiLz4KPC9zdmc+CiAgICA8c2NyaXB0Pgpjb25zdCBtYXJrdXAgPSBg
PHN2Zz4KICA8ZGVmcz4KICAgIDxwYXRoIGlkPSJwYXRoLWRlbGF5ZWQiIGZpbGw9InJlZCIgZD0i
TTAgMCBMNTAgMCBMNTAgNTAgTDAgNTAgWiIvPgogICAgPHJlY3QgaWQ9InJlY3QtZGVsYXllZCIg
ZmlsbD0iYmx1ZSIgeD0iMCIgeT0iMCIgd2lkdGg9IjUwIiBoZWlnaHQ9IjUwIi8+CiAgPC9kZWZz
Pgo8L3N2Zz5gOwpzZXRUaW1lb3V0KCAoKSA9PiB7CiAgZG9jdW1lbnQuYm9keS5pbnNlcnRBZGph
Y2VudEhUTUwoICJiZWZvcmVlbmQiLCBtYXJrdXAgKTsKfSwgMTAwMCApOwogICAgPC9zY3JpcHQ+
CiAgPC9ib2R5Pgo8L2h0bWw+CgoK
</data>

          </attachment>
      

    </bug>

</bugzilla>