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

  Changed paths:
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    A Source/WebCore/layout/formattingContexts/grid/ExtraSpaceDistributor.cpp
    A Source/WebCore/layout/formattingContexts/grid/ExtraSpaceDistributor.h
    M Source/WebCore/layout/formattingContexts/grid/GridTypeAliases.h
    M Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp
    M Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.h
    M Source/WebCore/layout/formattingContexts/grid/TrackSizingFunctions.h

  Log Message:
  -----------
  [GFC] Move extra space distribution out of TrackSizingAlgorithm into 
ExtraSpaceDistributor
https://bugs.webkit.org/show_bug.cgi?id=326106
rdar://problem/189020775

Reviewed by Alan Baradlay.

The code implementing https://drafts.csswg.org/css-grid-1/#extra-space lived
alongside the rest of the track sizing algorithm in TrackSizingAlgorithm.cpp.
Move it into its own helper class, ExtraSpaceDistribution, whose single entry
point is distributeExtraSpace(). TrackSizingAlgorithm still decides which
tracks are affected for each pass and handles marking tracks as infinitely
growable; it now calls into ExtraSpaceDistribution to do the distribution.

This is a pure move with no change in behavior. The moved functions are
unchanged apart from distributeExtraSpace() becoming a static member function.

Since both files need UnsizedTrack, it is now declared publicly in
TrackSizingAlgorithm.h. This is really a temporary measure since in
theory UnsizedTrack should only be seen by TrackSizingAlgorithm but it
is fine for now as we rework this code a bit. Eventually the space
distribution code will not need to see UnsizedTrack and we should be
able to move it back to how it was before.

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



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

Reply via email to