<?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>296622</bug_id>
          
          <creation_ts>2025-07-29 07:45:45 -0700</creation_ts>
          <short_desc>:host:has() should match</short_desc>
          <delta_ts>2025-09-05 14:50:01 -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>CSS</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 15</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>282687</dup_id>
          <see_also>https://bugs.webkit.org/show_bug.cgi?id=282687</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Minor</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Matt Clough">cluffpost</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>cluffpost</cc>
    
    <cc>koivisto</cc>
    
    <cc>ntim</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2133099</commentid>
    <comment_count>0</comment_count>
    <who name="Matt Clough">cluffpost</who>
    <bug_when>2025-07-29 07:45:45 -0700</bug_when>
    <thetext>Overview:

Per CSSWG resolution (https://github.com/w3c/csswg-drafts/issues/10693#issuecomment-2289330553), the `:host:has()` selector should match.

Reproduction/Demo:

https://codepen.io/mattclough/pen/bNVBLWm?editors=1000

Expected results:

The shadow root host should be selected, consistent with https://github.com/mozilla/wg-decisions/issues/1592

Actual results:

The shadow root host is not selected

Build Date &amp; Hardware:

Build 20622.1.20.1 on macOS 15.5 (24F74)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2134395</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-08-05 07:46:12 -0700</bug_when>
    <thetext>&lt;rdar://problem/157565412&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2141327</commentid>
    <comment_count>2</comment_count>
    <who name="Sam Sneddon [:gsnedders]">gsnedders</who>
    <bug_when>2025-09-05 14:50:01 -0700</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 282687 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>