Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9ea13515e70372ba3e175c21734d61967ce25a0b
      
https://github.com/WebKit/WebKit/commit/9ea13515e70372ba3e175c21734d61967ce25a0b
  Author: Sammy Gill <[email protected]>
  Date:   2026-07-07 (Tue, 07 Jul 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-safe-overflow-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-self-alignment-safe-overflow.html
    M Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp

  Log Message:
  -----------
  [GFC] Implement alignment safety.
https://bugs.webkit.org/show_bug.cgi?id=318729
rdar://181532612

Reviewed by Elika Etemad.

In GFC we currently have very simple alignment logic which is basically
just unsafe alignment since we take and use the output from 
StyleSelfAlignmentData::adjustmentFromStartEdge
to determine the margin box position.

This doesn't work if safe alignment is specified since the output from
that value can be negative in order to satisfy the constraint of the
alignment position and would cause the content to be placed outside the
start edge of the grid.

To implement alignment safety all we need to do is clamp the result to 0
when safe is specified since that will align the margin box to the start
of the grid area.

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



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

Reply via email to