Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 9259b6d6fbd37804fd77e580fde65d135609f9ad
      
https://github.com/WebKit/WebKit/commit/9259b6d6fbd37804fd77e580fde65d135609f9ad
  Author: Sammy Gill <[email protected]>
  Date:   2026-10-07 (Wed, 07 Oct 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-percentage-max-size-flex-rows-001-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-percentage-max-size-flex-rows-001.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-percentage-max-size-flex-rows-002-expected.txt
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-percentage-max-size-flex-rows-002.html
    M Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.cpp

  Log Message:
  -----------
  [GFC] Resolve percentage and calc() min/max sizes on the grid container
https://bugs.webkit.org/show_bug.cgi?id=326609
rdar://problem/189358198

Reviewed by Alan Baradlay.

GFC only resolved fixed min-width/max-width/min-height/max-height values on the 
grid
container. Any other value, including percentages and calc(), hit 
ASSERT_NOT_IMPLEMENTED_YET.
Grids with these values are not excluded from GFC, so for example a grid with 
an indefinite height,
flexible rows and max-height: 80% grew its rows past the max-height instead of 
redoing the
flex fraction against it.

Percentages and calc() now resolve against the containing block. We get
the width from the grid's containing block which we use to resolve the
percentages. For the height we ask the containing block for its
availableLogicalHeightForPercentageComputation().

box-sizing is now applied inside minimumSizeConstraint/maximumSizeConstraint, so
GridLayout::computeIntrinsicWidths also gets content box sizes. It previously 
passed the raw
values through to the auto-repeat count. That has no effect until auto-repeat 
tracks are
allowed through GFC.

Tests: 
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-percentage-max-size-flex-rows-001.html
       
imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-percentage-max-size-flex-rows-002.html

(WebCore::LayoutIntegration::minimumSizeConstraint): Resolve percentages and 
calc() against
the given size, and apply box-sizing.
(WebCore::LayoutIntegration::maximumSizeConstraint): Ditto.
(WebCore::LayoutIntegration::constraintsForGridContent): Pass the containing 
block's width and
height, and the border and padding, to the min/max helpers.
(WebCore::LayoutIntegration::GridLayout::computeIntrinsicWidths): Ditto, which 
now also applies
box-sizing to the auto-repeat constraints.

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



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

Reply via email to