Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: d2f5260584c57562d71dd883203e5d3c36f2eea1
      
https://github.com/WebKit/WebKit/commit/d2f5260584c57562d71dd883203e5d3c36f2eea1
  Author: Elika Etemad <[email protected]>
  Date:   2026-09-20 (Sun, 20 Sep 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-fixedpos-nested-scroll-001-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-fixedpos-nested-scroll-001-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-fixedpos-nested-scroll-001.html
    M Source/WebCore/style/AnchorPositionEvaluator.cpp

  Log Message:
  -----------
  REGRESSION(Safari 27): anchored box inside modal dialog missing if page is 
scrolled
https://bugs.webkit.org/show_bug.cgi?id=324348
rdar://187582516

Reviewed by Kiet Ho.

311715@main rewrote the body of offsetFromAncestorContainer() to use
localToContainerQuad(); however in the process it lost the ancestor checks
for isFixed. This is causing the anchor position to be incorrectly calculated
when layout happens after scrolling away from the origin--for example
if a fixed box contains a non-positioned anchor for an anchor-positioned
fixed child--resulting in the anchored box being laid out offscreen, and
thus entirely invisible.

This updates our isFixed() helper to handle boxes that don't themselves
have a RenderLayer, which fixes this problem... and prossibly some other
scenarios as well.

Tests: 
imported/w3c/web-platform-tests/css/css-anchor-position/anchor-fixedpos-nested-scroll-001.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-fixedpos-nested-scroll-001-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-fixedpos-nested-scroll-001-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-fixedpos-nested-scroll-001.html:
 Added.
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::isFixed):
(WebCore::Style::AnchorPositionEvaluator::captureScrollSnapshots):

Canonical link: https://commits.webkit.org/321475@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to