Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1700b4a1e543fffc7c8c5c56f137203d6799eee7
      
https://github.com/WebKit/WebKit/commit/1700b4a1e543fffc7c8c5c56f137203d6799eee7
  Author: Sammy Gill <[email protected]>
  Date:   2026-10-06 (Tue, 06 Oct 2026)

  Changed paths:
    M Source/WebCore/layout/formattingContexts/grid/AutoRepeatResolver.cpp
    M Source/WebCore/layout/formattingContexts/grid/AutoRepeatResolver.h
    M Source/WebCore/layout/formattingContexts/grid/ExplicitGridResolver.cpp
    M Source/WebCore/layout/formattingContexts/grid/ExplicitGridResolver.h
    M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.h
    M Source/WebCore/layout/formattingContexts/grid/GridLayoutConstraints.h
    M Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.cpp

  Log Message:
  -----------
  [GFC] Resolve auto-fill repetitions against the grid container's min and max 
size when computing intrinsic widths
https://bugs.webkit.org/show_bug.cgi?id=326411
rdar://problem/189223527

Reviewed by Alan Baradlay.

When trying to resolve the number of tracks for a grid's auto-repeat
listing we need to determine what the available space is that will be
used to fill with the repeated tracks. This is done by looking at the
grid's minimum, maximum, and preferred sizes in that axis. In
322512@main we added the initial support for auto-fill which unrolled
the tracks in the layout() codepath and here we are attempting to do the
same when comuting the grid's intrinsic widths. To accomplish this we
make two major changes:

1.) Add an AutoRepeatConstraint helper struct that gets plumbed all the
way to AutoRepeatResolver. This is a dedicated struct that contains the
minimum, maximum, and preferred size that will be used to figure out
what the available space is. This replaces the GridLayoutConstraint that
was being used instead so much of this patch is just modifying the
various sites in AutoRepeatResolver to use this instead.

2.) Have the computeIntrinsicLogicalWidths come up with the
AutoRepeatConstraint that will be used and plumb it to the rest of the
code that attempts to resolve the exlplicit grid for this path.

Additionally, we also move the code that mappted percentage tracks to
auto to be inside of GridFormattingContext instead of
ExplicitGridResolver. Arguably this was not a responsibility
ExplicitGridResolver should have had and we already do this in
GridFormattingContext anyways.

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



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

Reply via email to