Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 417c5cd1cddf38bcb6268923a17f9b35cde9fd11
      
https://github.com/WebKit/WebKit/commit/417c5cd1cddf38bcb6268923a17f9b35cde9fd11
  Author: Sammy Gill <[email protected]>
  Date:   2025-05-01 (Thu, 01 May 2025)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-with-calc-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-with-calc.html
    M Source/WebCore/rendering/RenderGrid.cpp

  Log Message:
  -----------
  [Grid] Properly handle calc values when computing auto track sizes in 
computeAutoRepeatTracksCount.
rdar://146466356
https://bugs.webkit.org/show_bug.cgi?id=288819

Reviewed by Alan Baradlay.

RenderGrid::computeAutoRepeatTracksAccount is supposed to determine the
number of auto-repeat tracks according to the following:

https://drafts.csswg.org/css-grid-2/#auto-repeat

During this process we are supposed to "floor the max track sizing
function by the min track sizing function," if both are definite. The
code that handles this does not consider calcu values at all which
results in hitting an ASSERT in Length when attempting to get the value,
which can even result in incorrect geometry. Fix this by using
valueForLength to properly compute these values.

Also slightly rewrite this part of the code so that it reads more
closely to the spec.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-with-calc-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-fit-with-calc.html:
 Added.
* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeAutoRepeatTracksCount const):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to