<?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>293438</bug_id>
          
          <creation_ts>2025-05-22 11:21:40 -0700</creation_ts>
          <short_desc>[css-anchor-position-1] anchor-scope scopes all names instead of affected names</short_desc>
          <delta_ts>2025-05-29 15:02:43 -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>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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>
          
          <blocked>291856</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="fantasai">fantasai.bugs</reporter>
          <assigned_to name="fantasai">fantasai.bugs</assigned_to>
          <cc>koivisto</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>2119031</commentid>
    <comment_count>0</comment_count>
      <attachid>475341</attachid>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-05-22 11:21:40 -0700</bug_when>
    <thetext>Created attachment 475341
testcase

Overview:
The anchor-scope property traps the specified anchor-names from being exposed outside the element&apos;s subtree. But our implementation traps any anchor that happens to have a matching name, even if it has other names which are not trapped.

Steps to Reproduce:
1. Create an anchor with two anchor names.
2. Wrap it in an anchor-scope that only has one of those names.
3. Try to attach an anchor outside this subtree to the unscoped name.

Expected Result:
Attachment works.

Actual Result:
Attachment does not work.

Additional Information:
See anchorScopeForAnchorElement() for the source of the problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2119032</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2025-05-22 11:21:51 -0700</bug_when>
    <thetext>&lt;rdar://problem/151866809&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2119789</commentid>
    <comment_count>2</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2025-05-26 21:04:43 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/45935</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2120500</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-05-29 15:02:41 -0700</bug_when>
    <thetext>Committed 295576@main (013f4f81fdd5): &lt;https://commits.webkit.org/295576@main&gt;

Reviewed commits have been landed. Closing PR #45935 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>475341</attachid>
            <date>2025-05-22 11:21:40 -0700</date>
            <delta_ts>2025-05-22 11:21:40 -0700</delta_ts>
            <desc>testcase</desc>
            <filename>anchor-scope.html</filename>
            <type>text/html</type>
            <size>294</size>
            <attacher name="fantasai">fantasai.bugs</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+Cjx0aXRsZT5hbmNob3Itc2NvcGUgdGVzdDwvdGl0bGU+Cgo8ZGl2IHN0
eWxlPSJtYXJnaW46IDJlbTsgYW5jaG9yLXNjb3BlOiAtLWJhciI+CiAgPGRpdiBzdHlsZT0iYW5j
aG9yLW5hbWU6IC0tZm9vLCAtLWJhciI+QW5jaG9yIC0tZm9vPC9kaXY+CjwvZGl2PgoKPGRpdiBz
dHlsZT0icG9zaXRpb246IGFic29sdXRlOyBwb3NpdGlvbi1hbmNob3I6IC0tZm9vOyBwb3NpdGlv
bi1hcmVhOiB0b3A7IGJvcmRlcjogc29saWQgb3JhbmdlIj5hbmNob3JlZCB0byB0b3Agb2YgLS1m
b288L2Rpdj4K
</data>

          </attachment>
      

    </bug>

</bugzilla>