Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 20363a36ca9fa4ac58f6f962e8c576a1db3460c7
      
https://github.com/WebKit/WebKit/commit/20363a36ca9fa4ac58f6f962e8c576a1db3460c7
  Author: Yulun Wu <[email protected]>
  Date:   2026-08-10 (Mon, 10 Aug 2026)

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

  Log Message:
  -----------
  [GFC] Refactor track filtering and phased sizing functions for intrinsic 
sizing
https://bugs.webkit.org/show_bug.cgi?id=321207
rdar://184267254

Reviewed by Sammy Gill.

This PR refactors various, inlined functions used to filter grid tracks
by their min track sizing function out into an enum class that is mapped
to the corresponding min track sizing function.

This improves readability for 
increaseSizesToAccommodateSpanningItemsCrossingFlexibleTracks()
by simplifying the calls to affectedFlexibleTracksMatchingMinSizeFunction().

Intrinsic track size resolution for spanning items is done in 2 steps per spec:

https://drafts.csswg.org/css-grid-1/#algo-content

First resolving content sized tracks, then resolving flexible tracks. This PR 
parameterizes this
to call a single function, resolveIntrinsicTrackSizesWithSpanningItems() with a 
phase argument to
distinguish what step the function is called for. A follow up refactor will 
extract the code that
can be shared between:

increaseSizesToAccommodateSpanningItemsCrossingFlexibleTracks

and the notImplemented:

increaseSizesToAccommodateSpanningItemsCrossingContentSizedTracks

* Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp:
(WebCore::Layout::affectedFlexibleTracksMatchingMinSizeFunction):
(WebCore::Layout::increaseSizesToAccommodateSpanningItemsCrossingContentSizedTracks):
(WebCore::Layout::increaseSizesToAccommodateSpanningItemsCrossingFlexibleTracks):
(WebCore::Layout::resolveIntrinsicTrackSizesWithSpanningItems):
(WebCore::Layout::resolveIntrinsicTrackSizes):
(WebCore::Layout::flexibleTracksMatching): Deleted.

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



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

Reply via email to