Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0ea898a2ff9f4b6605ffaf93891267858f1b5e71
      
https://github.com/WebKit/WebKit/commit/0ea898a2ff9f4b6605ffaf93891267858f1b5e71
  Author: Yulun Wu <[email protected]>
  Date:   2026-06-12 (Fri, 12 Jun 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-explicit-placement-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-explicit-placement.html
    M Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp

  Log Message:
  -----------
  [GFC] Grid items ignore row-gap/column-gap
https://bugs.webkit.org/show_bug.cgi?id=316923
<rdar://179385621>

Reviewed by Sammy Gill.

This PR fixes two off by one errors that caused grid items to be mispositioned
and/or oversized with row/column gap set.

computeGridLinePosition accumulates grid track sizes and grid gaps up to line X
and should include X gutters, not x-1 gutters.

gridAreaDimensionSize from grid lines start to end was incorrectly counting
span (end - start) gutters when it should be counting span - 1 gutters.

* 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-explicit-placement-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/alignment/grid-gutters-explicit-placement.html:
 Added.
* Source/WebCore/layout/formattingContexts/grid/GridLayoutUtils.cpp:
(WebCore::Layout::GridLayoutUtils::computeGridLinePosition):
(WebCore::Layout::GridLayoutUtils::gridAreaDimensionSize):

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



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

Reply via email to