<?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>307171</bug_id>
          
          <creation_ts>2026-02-06 08:51:41 -0800</creation_ts>
          <short_desc>Anchor positioning: abspos elements can anchor to viewport-fixedpos elements</short_desc>
          <delta_ts>2026-06-06 12:54:27 -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 Technology Preview</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="David Shin">dshin</reporter>
          <assigned_to name="fantasai">fantasai.bugs</assigned_to>
          <cc>bfulgham</cc>
    
    <cc>fantasai.bugs</cc>
    
    <cc>kiet.ho</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>2178797</commentid>
    <comment_count>0</comment_count>
      <attachid>478269</attachid>
    <who name="David Shin">dshin</who>
    <bug_when>2026-02-06 08:51:41 -0800</bug_when>
    <thetext>Created attachment 478269
Minimum Reproducible Case

(Discovered from Firefox bug: https://bugzilla.mozilla.org/show_bug.cgi?id=2014997)

Given that:

1. The initial fixed containing block is the parent of the initial containing block in the containing block chain [1],
2. Absolute containing block can have at most the initial containing block as its absolute containing block,
3. And an acceptable anchor should be strictly laid out before the positioned element [2],

Strictly spec-wise, fixed elements (Using the initial fixed containing block) should not be a valid anchor for an absolute positioned element in the testcase.

Perhaps relatedly - the positioned element doesn&apos;t seem to be properly scroll (un?)compensated.

[1] https://drafts.csswg.org/css-position-3/#def-cb
[2] https://drafts.csswg.org/css-anchor-position-1/#acceptable-anchor-element</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2181315</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2026-02-13 08:52:10 -0800</bug_when>
    <thetext>&lt;rdar://problem/170323196&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2189646</commentid>
    <comment_count>2</comment_count>
    <who name="pascoe@apple.com">pascoe</who>
    <bug_when>2026-03-12 11:08:50 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/60480</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2189649</commentid>
    <comment_count>3</comment_count>
    <who name="David Shin">dshin</who>
    <bug_when>2026-03-12 11:12:01 -0700</bug_when>
    <thetext>There&apos;s a proposed spec change to in fact get rid of the special fixed ICB, which would allow this behaviour: https://github.com/w3c/csswg-drafts/issues/13468</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2216547</commentid>
    <comment_count>4</comment_count>
    <who name="fantasai">fantasai.bugs</who>
    <bug_when>2026-06-01 16:31:50 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/66208</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2218308</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2026-06-06 12:54:25 -0700</bug_when>
    <thetext>Committed 314706@main (fe7bcd9ee8c2): &lt;https://commits.webkit.org/314706@main&gt;

Reviewed commits have been landed. Closing PR #66208 and removing active labels.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>478269</attachid>
            <date>2026-02-06 08:51:41 -0800</date>
            <delta_ts>2026-02-06 08:51:41 -0800</delta_ts>
            <desc>Minimum Reproducible Case</desc>
            <filename>fixed.html</filename>
            <type>text/html</type>
            <size>406</size>
            <attacher name="David Shin">dshin</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxzdHlsZT4KLmNiIHsKICB3aWR0aDogMTAwcHg7CiAgaGVpZ2h0OiAx
MDBweDsKICBvdmVyZmxvdzogc2Nyb2xsOwp9CgouZml4ZWQgewogIHBvc2l0aW9uOiBmaXhlZDsK
ICBsZWZ0OiAwcHg7CiAgdG9wOiAwcHg7CiAgYm9yZGVyOiAxcHggc29saWQ7CiAgYW5jaG9yLW5h
bWU6IC0tYTsKfQoKLmFicyB7CiAgcG9zaXRpb24tYW5jaG9yOiAtLWE7CiAgcG9zaXRpb24tYXJl
YTogYm90dG9tIHJpZ2h0OwogIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICBib3JkZXI6IDFweCBzb2xp
ZDsKfQo8L3N0eWxlPgo8ZGl2IGlkPWYgY2xhc3M9Zml4ZWQ+QW5jaG9yPC9kaXY+CjxkaXYgaWQ9
YSBjbGFzcz1hYnM+UG9zaXRpb25lZDwvZGl2Pgo8ZGl2IHN0eWxlPSJoZWlnaHQ6IDIwMHZoOyI+
PC9kaXY+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>