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

  Changed paths:
    M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.cpp
    M Source/WebCore/layout/formattingContexts/grid/GridFormattingContext.h
    M Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp
    M Source/WebCore/layout/formattingContexts/grid/GridLayout.h
    M Source/WebCore/layout/formattingContexts/grid/GridLayoutState.h
    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
    M Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.cpp

  Log Message:
  -----------
  [GFC][Cleanup] Store used gap values inside GridLayoutState
https://bugs.webkit.org/show_bug.cgi?id=308595
rdar://171122153

Reviewed by Elika Etemad.

We currently have a helper function on GridLayoutUtils that is used to
compute the used gap values and is called multiple times during layout.
However, the used gap values never change so this piece of information
can be computed just once. This can be done inside of
GridFormattingContext and passed around as an additional piece of
information that lives on GridLayoutState.

Any places that were previously calling the GridLayoutUtils function
will now just have the used gap value plumbed to them.

(WebCore::Layout::GridLayout::layout):
We were unpacking each field inside GridLayoutState but let's just get
the values when we need them.

(WebCore::Layout::GridLayout::performGridSizingAlgorithm const):
This function was taking in many of the things from GridLayoutState as
an argument. Just to make the code a bit more compact we can have it
take in GridLayoutState. In most cases it would be nice if the function
took in only what it needed but since it uses quite a few different
pieces from GridLayoutState I think it is ok here.

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



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

Reply via email to