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

  Changed paths:
    M Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp
    M Source/WebCore/layout/integration/grid/LayoutIntegrationGridCoverage.cpp

  Log Message:
  -----------
  [GFC][Integration] Allow min-content as track sizing function for rows
https://bugs.webkit.org/show_bug.cgi?id=307687
rdar://170246267

Reviewed by Vitor Roriz.

Relax the requirements by allowing min-content to be a valid track
sizing function for the row template list.

This allows content like the following to run through GFC:

<div style="display: grid; width: 100px; height: 100px; grid-template-columns: 
10px 100px; grid-template-rows: min-content; min-width: 0; min-height: 0; 
outline: 3px solid green;">
  <div style="outline: 1px solid red; grid-column: 1/2; grid-row: 1/2; 
min-width: 0; min-height: 0;">x x x x</div>
  <div style="outline: 1px solid red; grid-column: 2/3; grid-row: 1/2; 
min-width: 0; min-height: 0;">xxxxxxx</div>
</div>

* Source/WebCore/layout/formattingContexts/grid/GridLayout.cpp:
(WebCore::Layout::rowSizesForFirstIterationColumnSizing):
We were hitting an ASSERT_NOT_IMPLEMENTED here because we didn't have
anything to handle the min-content case. This code implements this
portion of the spec:
"If calculating the layout of a grid item in this step depends on the
available space in the block axis, assume the available space that it
would have if any row with a definite max track sizing function had
that size and all other rows were infinite."

Since min-content is not a definite value for the max-track sizing
function we map it to LayoutUnit::max();

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



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

Reply via email to