Changeset 290674 in webkit


Ignore:
Timestamp:
Mar 1, 2022 1:57:06 PM (5 months ago)
Author:
Matt Woodrow
Message:

Use static position relative to parent for abs-pos items within nested grids.
https://bugs.webkit.org/show_bug.cgi?id=236957

Reviewed by Dean Jackson.

Source/WebCore:

In the case where an absolutely positioned element's parent and containing block
are both grid container, but they are not the same grid container, then the static position
of the abs-pos item should be relative to the parent, not the CB.

Existing subgrid tests marked as passing.

  • rendering/RenderGrid.cpp:

(WebCore::RenderGrid::setLogicalOffsetForChild const):

LayoutTests:

Existing subgrid tests marked as passing.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r290673 r290674  
     12022-03-01  Matt Woodrow  <mattwoodrow@apple.com>
     2
     3        Use static position relative to parent for abs-pos items within nested grids.
     4        https://bugs.webkit.org/show_bug.cgi?id=236957
     5
     6        Reviewed by Dean Jackson.
     7
     8        * TestExpectations:
     9
     10       Existing subgrid tests marked as passing.
     11
    1122022-03-01  Andres Gonzalez  <andresg_22@apple.com>
    213
  • trunk/LayoutTests/TestExpectations

    r290648 r290674  
    14001400webkit.org/b/236959 imported/w3c/web-platform-tests/css/css-grid/subgrid/baseline-001.html [ ImageOnlyFailure ]
    14011401webkit.org/b/236956 imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-gap-003.html [ ImageOnlyFailure ]
    1402 webkit.org/b/236957 imported/w3c/web-platform-tests/css/css-grid/subgrid/line-names-007.html [ ImageOnlyFailure ]
    14031402webkit.org/b/236958 imported/w3c/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-003.html [ ImageOnlyFailure ]
    14041403webkit.org/b/236949 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-001.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r290672 r290674  
     12022-03-01  Matt Woodrow  <mattwoodrow@apple.com>
     2
     3        Use static position relative to parent for abs-pos items within nested grids.
     4        https://bugs.webkit.org/show_bug.cgi?id=236957
     5
     6        Reviewed by Dean Jackson.
     7
     8        In the case where an absolutely positioned element's parent and containing block
     9        are both grid container, but they are not the same grid container, then the static position
     10        of the abs-pos item should be relative to the parent, not the CB.
     11
     12        Existing subgrid tests marked as passing.
     13
     14        * rendering/RenderGrid.cpp:
     15        (WebCore::RenderGrid::setLogicalOffsetForChild const):
     16
    1172022-03-01  Alan Bujtas  <zalan@apple.com>
    218
  • trunk/Source/WebCore/rendering/RenderGrid.cpp

    r290579 r290674  
    19011901void RenderGrid::setLogicalOffsetForChild(RenderBox& child, GridTrackSizingDirection direction) const
    19021902{
    1903     if (!child.isGridItem() && hasStaticPositionForChild(child, direction))
     1903    if (child.parent() != this && hasStaticPositionForChild(child, direction))
    19041904        return;
    19051905    // 'setLogicalLeft' and 'setLogicalTop' only take into account the child's writing-mode, that's why 'flowAwareDirectionForChild' is needed.
Note: See TracChangeset for help on using the changeset viewer.