[webkit-changes] [WebKit/WebKit] 94edba: [css-grid] Consider sum of non-orthogonal nested s...

Sammy Gill noreply at github.com
Thu Oct 5 11:09:32 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 94edbaabbf368aa6ffa9a0d21601c668a0ba095a
      https://github.com/WebKit/WebKit/commit/94edbaabbf368aa6ffa9a0d21601c668a0ba095a
  Author: Sammy Gill <sammy.gill at apple.com>
  Date:   2023-10-05 (Thu, 05 Oct 2023)

  Changed paths:
    M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-baseline-005-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-baseline-006-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-baseline-007-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-baseline-008-expected.txt
    M Source/WebCore/rendering/GridBaselineAlignment.cpp
    M Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp

  Log Message:
  -----------
  [css-grid] Consider sum of non-orthogonal nested subgrids' margin,
border,  and padding for first baseline alignment in the column axis.
https://bugs.webkit.org/show_bug.cgi?id=262605
rdar://problem/116443747

Reviewed by Matt Woodrow.

To compute the extra layer of margin for subridded items in this
scenario, we will simply walk up the subgrid ancestors until we reach
the outermost parent grid. For each subgrid, we will take its mbp and
add it to a cumulative offset value. By the time we reach the outermost
parent grid we should have a sum of all of the nested subgrid margin,
border, and padding values.

If at any point we run into an orthogonal subgrid we will return 0 to
fallback to previous behavior.

* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-baseline-005-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-baseline-006-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-baseline-007-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-baseline-008-expected.txt:
* Source/WebCore/rendering/GridBaselineAlignment.cpp:
(WebCore::GridBaselineAlignment::ascentForChild const):

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




More information about the webkit-changes mailing list