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

  Changed paths:
    M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp
    M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.h

  Log Message:
  -----------
  [GFC] Stretch alignment should trigger stretch sizing
https://bugs.webkit.org/show_bug.cgi?id=318916
rdar://181750071

Reviewed by Brandon Stewart.

When computing the automatic preferred size of a grid item there are two
ways that the item can get stretched to fill its grid area based on its
self alignment in that axis:

1.) normal - If the grid item has no preferred aspect ratio, and no
natural size in the relevant axis (if it is a replaced element)

2.) stretch - As long as there are no auto margins.

We currently implement 1 but not 2 so we just expand our current logic
by taking this extra bit of information into consideration. The
isStretchedForAutomaticSize helper reuses the same bit of logic in both
axes since the only difference is the alignment and margins we are
checking. All of its callers only reach it once the preferred size in
the axis is known to be auto, so it asserts that precondition rather
than re-checking it.

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



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

Reply via email to