Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 965adbc7f1f4db86a27a2e14de308abd2da61fdc
      
https://github.com/WebKit/WebKit/commit/965adbc7f1f4db86a27a2e14de308abd2da61fdc
  Author: Sammy Gill <[email protected]>
  Date:   2026-07-15 (Wed, 15 Jul 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-overflowing-item-content-is-painted-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-overflowing-item-content-is-painted.html
    M Source/WebCore/layout/integration/grid/LayoutIntegrationGridLayout.cpp

  Log Message:
  -----------
  [GFC] Grid item's overflowing content may not get painted
https://bugs.webkit.org/show_bug.cgi?id=319406
rdar://182233113

Reviewed by Alan Baradlay.

In the attached testcase we have a grid with a grid item that is
positioned offscreen via a negative margin on the grid. The container
that the grid is in has overflow: hidden and is positioned inside the
body. The following diagram shows what this content is like:

    (-150,-100)          (-50,-100)
        +--------------------+
        |  grid container    |   border box 100x50, pushed off the
        |  + grid item       |   top-left with negative margins so it
        +--------------------+   lies entirely outside the clip region
    (-150,-50)           (-50,-50)
        :                              (0,0)             (100,0)
        :  green item content            +-----------------+
        :  (250x200) overflows           |                 |
        :  down/right into the           |  visible green  |
        :  clip region .................|.  (fills box)    |
        :                                |                 |
        +--------------------------------+-----------------+
    (-150,100)                        (0,100)           (100,100)
                                     overflow:hidden container (100x100)

Currently the overflowing content does not get painted because in
RenderBlock:paint we bail since the grid, which is the visual content,
is clipped out. This is similar to the bug that we fixed in 316668@main
but in this case the overflowing content comes from the grid item's
content and not the grid item itself.

So, to fix it we expand upon the fix we applied in the previous patch
and also take into consideration any visual overflow that comes from
within the grid item.

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



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

Reply via email to