Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 82fec767aefbfd9b5a433911f00d27444687b3ae
      
https://github.com/WebKit/WebKit/commit/82fec767aefbfd9b5a433911f00d27444687b3ae
  Author: Sammy Gill <[email protected]>
  Date:   2026-10-01 (Thu, 01 Oct 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-fit-content-indefinite-percentage-not-stretched-001-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-fit-content-indefinite-percentage-not-stretched-001.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-fit-content-indefinite-percentage-not-stretched-002-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/layout-algorithm/grid-fit-content-indefinite-percentage-not-stretched-002.html
    M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp

  Log Message:
  -----------
  [GFC] fit-content() tracks with an indefinite percentage should not be 
stretched
https://bugs.webkit.org/show_bug.cgi?id=325837
rdar://problem/188848301

Reviewed by Alan Baradlay.

When the grid container's size in an axis is indefinite, percentages in
track sizes are treated as auto. trackSizeWithPercentagesConvertedToAuto
applied this to fit-content(<percentage>) by replacing the whole track
size with auto, which is minmax(auto, auto). This makes the track
eligible for the "Stretch auto tracks," portion of the track sizing
algorithm. As a result, a fit-content(50%) row in a grid with
an auto height and a definite min-height was stretched to fill the
min-height.

fit-content() is defined as the smaller of minmax(auto, max-content) and
minmax(auto, limit), so with its limit treated as auto it reduces to
minmax(auto, max-content). Convert it to that instead, which keeps the
track from being stretched and matches the legacy grid implementation.

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



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

Reply via email to