Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9bb2fb8bd3bd592a9a04c9ae940460b22da9aa76
      
https://github.com/WebKit/WebKit/commit/9bb2fb8bd3bd592a9a04c9ae940460b22da9aa76
  Author: Yulun Wu <[email protected]>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

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

  Log Message:
  -----------
  [GFC] Parameterize distributeExtraSpace to handle flexible tracks
https://bugs.webkit.org/show_bug.cgi?id=324480
rdar://187718970

Reviewed by Sammy Gill.

This PR implements the space distribution ratio of
https://drafts.csswg.org/css-grid-1/#algo-spanning-flex-items.

This PR adds distributeSpaceAmongFlexibleTracks to perform the space 
distribution.

Space is distributed according to the track's fraction of the flex sum if the 
flex sum >= 1,
otherwise distributes some fraction of the available space by each track's flex 
fraction
and the rest equally.

No behavior change: an item spanning a single flexible track receives all of 
the space
under either distribution, and coverage does not yet admit items spanning more 
than one
track.

* Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp:
(WebCore::Layout::distributeSpaceAmongFlexibleTracks):
(WebCore::Layout::distributeExtraSpace):
(WebCore::Layout::resolveIntrinsicTrackSizesWithSpanningItems):

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



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

Reply via email to