Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b327a3a846c4820f299c686eae6e3176ad935018
      
https://github.com/WebKit/WebKit/commit/b327a3a846c4820f299c686eae6e3176ad935018
  Author: Elika Etemad <[email protected]>
  Date:   2026-01-14 (Wed, 14 Jan 2026)

  Changed paths:
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-overflow-001-expected.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-overflow-001-ref.html
    A 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-overflow-001.html
    M Source/WebCore/rendering/PositionedLayoutConstraints.cpp
    M Source/WebCore/rendering/RenderGrid.cpp

  Log Message:
  -----------
  Fix RTL grid scrollable area to account for grid and scrollbars correctly
https://bugs.webkit.org/show_bug.cgi?id=305145
rdar://167792896

Reviewed by Alan Baradlay.

Recent fixes for anchor positioning / scrollable areas got RTL coordinates
backwards for calculating the grid's contribution to the scrollable area.

This patch corrects this error, and also fixes some left-side scrollbars errors
found while investigating.

Tests: imported/w3c/web-platform-tests/css/css-grid/grid-overflow-001-ref.html
       imported/w3c/web-platform-tests/css/css-grid/grid-overflow-001.html
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-overflow-001-expected.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-overflow-001-ref.html:
 Added.
* 
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-overflow-001.html:
 Added.

Add more test coverage.

* Source/WebCore/rendering/PositionedLayoutConstraints.cpp:
(WebCore::PositionedLayoutConstraints::captureGridArea):

Handle left-side scrollbars consistently between grid and non-grid CBs.

* Source/WebCore/rendering/RenderGrid.cpp:
(WebCore::RenderGrid::gridAreaRangeForOutOfFlow const):

Account for right-side RTL scrollbars.

(WebCore::RenderGrid::contentOverflowRect const):

Fix backwards coordinates in RTL grid overflow calculation.

(WebCore::RenderGrid::translateRTLCoordinate const):

Call into shouldPlaceVerticalScrollbarOnLeft() instead of making assumptions.

(WebCore::RenderGrid::logicalOffsetForGridItem const):

Account for left-side LTR scrollbars.

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



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

Reply via email to