<?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>292968</bug_id>
          
          <creation_ts>2025-05-13 18:22:38 -0700</creation_ts>
          <short_desc>REGRESSION (Safari 18.4): Declarative shadow DOM and custom elements do not work with parseUnsafeHTML</short_desc>
          <delta_ts>2025-05-16 21:53:28 -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>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <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>mic.gallego</reporter>
          <assigned_to name="Ryosuke Niwa">rniwa</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>cdumez</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2116934</commentid>
    <comment_count>0</comment_count>
    <who name="">mic.gallego</who>
    <bug_when>2025-05-13 18:22:38 -0700</bug_when>
    <thetext>Hello,

On Safari exclusively (it works on Chrome), parseUnsafeHTML and setUnsafeHTML are not working with nested web components. Even though the web components are inserted into the page, the `connectedCallback` is never called. You can experience the issue here: https://codepen.io/bakura10/pen/LEEqGmy

On Chrome, both messages are logged. On Safari, the nested web components is not initialized at all.

Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2116936</commentid>
    <comment_count>1</comment_count>
    <who name="">mic.gallego</who>
    <bug_when>2025-05-13 18:36:18 -0700</bug_when>
    <thetext>After further testing, it appears to work on Safari 18.1, but not on 18.3 and 18.4. It therefore seems to be a recent regression.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2116940</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2025-05-13 19:00:17 -0700</bug_when>
    <thetext>***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2116941</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-05-13 19:00:26 -0700</bug_when>
    <thetext>&lt;rdar://problem/151273154&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2116942</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2025-05-13 19:02:22 -0700</bug_when>
    <thetext>*** Safari Technology Preview 218 ***

&quot;Bar: Should be called&quot;

*** Chrome Canary 138.0.7177.0 (Official Build) canary (arm64) ***
&quot;Bar: Should be called&quot;
&quot;Bim: Should be called&quot;

*** Firefox Nightly 140 (20250513214736) ***

&quot;Bar: Should be called&quot;
&quot;Bim: Should be called&quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117178</commentid>
    <comment_count>5</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-05-14 15:18:17 -0700</bug_when>
    <thetext>Thank you for the report! Between 18.2 and 18.3, guessing the former because it was a release with more changes overall.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117179</commentid>
    <comment_count>6</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2025-05-14 15:19:59 -0700</bug_when>
    <thetext>Actually, looks like our testing so far disagrees, and 18.3 worked.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117761</commentid>
    <comment_count>7</comment_count>
      <attachid>475277</attachid>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2025-05-16 15:49:44 -0700</bug_when>
    <thetext>Created attachment 475277
Reduction</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117815</commentid>
    <comment_count>8</comment_count>
    <who name="Ryosuke Niwa">rniwa</who>
    <bug_when>2025-05-16 17:00:07 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/45526</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2117847</commentid>
    <comment_count>9</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-05-16 21:53:26 -0700</bug_when>
    <thetext>Committed 295050@main (6d35fd51666a): &lt;https://commits.webkit.org/295050@main&gt;

Reviewed commits have been landed. Closing PR #45526 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>475277</attachid>
            <date>2025-05-16 15:49:44 -0700</date>
            <delta_ts>2025-05-16 15:49:44 -0700</delta_ts>
            <desc>Reduction</desc>
            <filename>connected-callback.html</filename>
            <type>text/html</type>
            <size>597</size>
            <attacher name="Ryosuke Niwa">rniwa</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+Cjxib2R5Pgo8c2NyaXB0Pgp3aW5kb3cuY3VzdG9tRWxlbWVudHMuZGVm
aW5lKCdpbm5lci1lbGVtZW50JywgY2xhc3MgZXh0ZW5kcyBIVE1MRWxlbWVudCB7CiAgICBjb25u
ZWN0ZWRDYWxsYmFjaygpIHsgcmVzdWx0LnRleHRDb250ZW50ID0gJ1BBU1MnOyB9Cn0pOwo8L3Nj
cmlwdD4KPHA+VGhpcyB0ZXN0cyB1c2luZyA8Y29kZT5wYXJzZUhUTUxVbnNhZmU8L2NvZGU+IHRv
IGNyZWF0ZSBhIGRlY2xhcmF0aXZlIHNoYWRvdyBET00uPGJyPgpjb25uZWN0ZWRDYWxsYmFjayBz
aG91bGQgYmUgY2FsbGVkIG9uIGEgY3VzdG9tIGVsZW1lbnQgaW5zaWRlIHRoZSBzaGFkb3cgRE9N
LjwvcD4KPGRpdiBpZD0icmVzdWx0Ij5GQUlMPC9kaXY+CjxkaXYgaWQ9ImNvbnRhaW5lciI+PC9k
aXY+CjxzY3JpcHQ+CmNvbnRhaW5lci5hcHBlbmQoLi4uRG9jdW1lbnQucGFyc2VIVE1MVW5zYWZl
KCc8b3V0ZXItZWxlbWVudD48dGVtcGxhdGUgc2hhZG93cm9vdG1vZGU9Im9wZW4iPjxpbm5lci1l
bGVtZW50PjwvaW5uZXItZWxlbWVudD48L3RlbXBsYXRlPjwvb3V0ZXItZWxlbWVudD4nKS5jaGls
ZE5vZGVzKTsKPC9zY3JpcHQ+CjwvYm9keT4K
</data>

          </attachment>
      

    </bug>

</bugzilla>