Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 39cf916c9b474368030570d2e1118b5720523208
      
https://github.com/WebKit/WebKit/commit/39cf916c9b474368030570d2e1118b5720523208
  Author: Kiet Ho <[email protected]>
  Date:   2025-09-26 (Fri, 26 Sep 2025)

  Changed paths:
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-name-inline-001-expected.txt
    M 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-004-expected.txt
    M Source/WebCore/style/AnchorPositionEvaluator.cpp

  Log Message:
  -----------
  [css-anchor-position-1] Acceptable anchor algorithm should consider inline 
containing block
rdar://160917762
https://bugs.webkit.org/show_bug.cgi?id=299157

Reviewed by Elika Etemad.

THe acceptable anchor code uses RenderObject::containingBlock() to get
the containing block, but the name is a bit deceptive: it returns the
container that is a _block element_. For determining acceptable anchor,
the containing block could be an inline element. Switch to using
RenderObject::container(), which does return an inline element
as containing block.

Test: 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-004.html

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-name-inline-001-expected.txt:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-scroll-004-expected.txt:
* Source/WebCore/style/AnchorPositionEvaluator.cpp:
(WebCore::Style::penultimateContainingBlockChainElement):
(WebCore::Style::firstChildPrecedesSecondChild):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to