Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 1fb524946c973830d12ed96af81dcae6b2bdfd55
      
https://github.com/WebKit/WebKit/commit/1fb524946c973830d12ed96af81dcae6b2bdfd55
  Author: Sammy Gill <[email protected]>
  Date:   2026-02-10 (Tue, 10 Feb 2026)

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

  Log Message:
  -----------
  [GFC] Avoid passing around IntegrationUtils during track sizing
rdar://169660703
https://bugs.webkit.org/show_bug.cgi?id=307007

Reviewed by Vitor Roriz.

IntegrationUtils is an implementation detail that is needed in order to
correctly compute geometry for grid items during track sizing and is not
really about the API that makes up those functions. As a result of our
current architecture, we need to pass around IntegrationUtils throughout
track sizing in case we need to access an API on GridItemSizingFunctions.

This situation is not great since IntegrationUtils gives access to a lot
of additional functionality that may not be needed. To improve this and
restrict the track sizing algorithm to only have access to the dedicated
API it needs via GridItemSizingFunctions, we can slightly modify our
helper functions which create this object.

{inline,block}AxisGridItemSizingFunctions are our two helper functions
which return GridItemSizingFunctions that get passed into the track
sizing algorithm. Instead of returning these objects directly, we can
have a set of lambdas that capture IntegrationUtils by reference and
take in the remaining parameters as its arguments. Then, the track
sizing algorithm can stop passing in IntegrationUtils when it needs to
call one of these APIs.

Outside of the change to the two helper functions, the rest of the
changes are just mechanical which gets rid of IntegrationUtils from
TrackSizingAlgorithm as well as the parameters from each API in
GridItemSizingFunctions.

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



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

Reply via email to