Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dd8920b30dbe0afea4b5ce0be8a4133f5181091b
      
https://github.com/WebKit/WebKit/commit/dd8920b30dbe0afea4b5ce0be8a4133f5181091b
  Author: Alexsander Borges Damaceno <[email protected]>
  Date:   2025-10-09 (Thu, 09 Oct 2025)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe-rtl-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe-rtl-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe-rtl.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe.html
    M Source/WebCore/rendering/PositionedLayoutConstraints.cpp

  Log Message:
  -----------
  [css-anchor-position-1] Support safe with anchor-center
https://bugs.webkit.org/show_bug.cgi?id=295503

Reviewed by Elika Etemad.

Make safe keyword work with anchor-aligned element as specified in CSS Anchor 
Positioning spec:
https://drafts.csswg.org/css-anchor-position-1/#anchor-center

"When using anchor-center, by default if the anchor is too close to the edge of 
the box’s original containing block,
it will "shift" from being purely centered, in order to remain within the 
original containing block.
See CSS Box Alignment 3 §4.4 Overflow Alignment:
the safe and unsafe keywords and scroll safety limits for more details."

* Source/WebCore/rendering/PositionedLayoutConstraints.cpp:
(WebCore::PositionedLayoutConstraints::resolveAlignmentShift const):
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe-rtl.html:
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe-rtl-expected.html
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-anchor-position/anchor-center-safe-rtl-ref.html

Canonical link: https://commits.webkit.org/301301@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