Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e2813d5566c60f4d86b895fcd2b68323d4e84449
      
https://github.com/WebKit/WebKit/commit/e2813d5566c60f4d86b895fcd2b68323d4e84449
  Author: Yulun Wu <[email protected]>
  Date:   2026-02-04 (Wed, 04 Feb 2026)

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

  Log Message:
  -----------
  [GFC] Account for gutters when expanding flex tracks.
https://bugs.webkit.org/show_bug.cgi?id=306910
<rdar://169317562>

Reviewed by Elika Etemad.

This PR updates GFC to account for gutters when sizing fr items.

Per

https://www.w3.org/TR/css-grid-1/#algo-terms

free space = available grid space - sum of base sizes - gutters.

This PR also refactors findSizeOfFr to handle this logic, and replaces
computeHypotheticalFrSize() with computeFRSizeComponents() to seperate
the computation of base sizes + flex factor sum from the computation and
handeling of the fr unit.

* Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp:
(WebCore::Layout::GridLayout::performGridSizingAlgorithm const):
* Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.cpp:
(WebCore::Layout::computeFRSizeComponents):
(WebCore::Layout::TrackSizingAlgorithm::sizeTracks):
(WebCore::Layout::TrackSizingAlgorithm::findSizeOfFr):
(WebCore::Layout::computeHypotheticalFrSize): Deleted.
* Source/WebCore/layout/formattingContexts/grid/TrackSizingAlgorithm.h:

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



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

Reply via email to