Changeset 290572 in webkit


Ignore:
Timestamp:
Feb 27, 2022 2:19:14 PM (5 months ago)
Author:
Matt Woodrow
Message:

Handle reverse flow direction when converting iterator coords for a subgrid
https://bugs.webkit.org/show_bug.cgi?id=236955

Reviewed by Dean Jackson.

Source/WebCore:

When recursing into a subgrid via createForSubgrid, we convert the iterator's
position into coordinates relative to the subgrid. This handles the case where
the subgrid has a reverse flow direction (RTL vs LTR) and swaps the position
to be relative to the opposite edge.

Marks existing WPT grid-gap-007.html as passing

  • rendering/Grid.cpp:

(WebCore::GridIterator::createForSubgrid):

LayoutTests:

Marked grid-gap-007.html as now passing, and added bug annotations to
remaining subgrid failures.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r290565 r290572  
     12022-02-27  Matt Woodrow  <mattwoodrow@apple.com>
     2
     3        Handle reverse flow direction when converting iterator coords for a subgrid
     4        https://bugs.webkit.org/show_bug.cgi?id=236955
     5
     6        Reviewed by Dean Jackson.
     7
     8        * TestExpectations:
     9
     10        Marked grid-gap-007.html as now passing, and added bug annotations to
     11        remaining subgrid failures.
     12
    1132022-02-27  Philippe Normand  <pnormand@igalia.com>
    214
  • trunk/LayoutTests/TestExpectations

    r290556 r290572  
    13951395imported/w3c/web-platform-tests/css/css-grid/masonry/tentative/masonry-subgrid-002.html [ ImageOnlyFailure ]
    13961396
    1397 imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-001.html [ ImageOnlyFailure ]
    1398 imported/w3c/web-platform-tests/css/css-grid/subgrid/baseline-001.html [ ImageOnlyFailure ]
    1399 imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-gap-003.html [ ImageOnlyFailure ]
    1400 imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-gap-007.html [ ImageOnlyFailure ]
    1401 imported/w3c/web-platform-tests/css/css-grid/subgrid/line-names-007.html [ ImageOnlyFailure ]
    1402 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-002.html [ ImageOnlyFailure ]
    1403 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-003.html [ ImageOnlyFailure ]
    1404 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-004.html [ ImageOnlyFailure ]
    1405 imported/w3c/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-003.html [ ImageOnlyFailure ]
    1406 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-001.html [ ImageOnlyFailure ]
    1407 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-002.html [ ImageOnlyFailure ]
    1408 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-003.html [ ImageOnlyFailure ]
    1409 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-004.html [ ImageOnlyFailure ]
     1397webkit.org/b/236951 imported/w3c/web-platform-tests/css/css-grid/subgrid/auto-track-sizing-001.html [ ImageOnlyFailure ]
     1398webkit.org/b/236959 imported/w3c/web-platform-tests/css/css-grid/subgrid/baseline-001.html [ ImageOnlyFailure ]
     1399webkit.org/b/236956 imported/w3c/web-platform-tests/css/css-grid/subgrid/grid-gap-003.html [ ImageOnlyFailure ]
     1400webkit.org/b/236957 imported/w3c/web-platform-tests/css/css-grid/subgrid/line-names-007.html [ ImageOnlyFailure ]
     1401webkit.org/b/236953 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-002.html [ ImageOnlyFailure ]
     1402webkit.org/b/236954 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-003.html [ ImageOnlyFailure ]
     1403webkit.org/b/236953 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-004.html [ ImageOnlyFailure ]
     1404webkit.org/b/236958 imported/w3c/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-003.html [ ImageOnlyFailure ]
     1405webkit.org/b/236949 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-001.html [ ImageOnlyFailure ]
     1406webkit.org/b/236949 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-002.html [ ImageOnlyFailure ]
     1407webkit.org/b/236949 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-003.html [ ImageOnlyFailure ]
     1408webkit.org/b/236949 imported/w3c/web-platform-tests/css/css-grid/subgrid/subgrid-mbp-overflow-004.html [ ImageOnlyFailure ]
    14101409
    14111410webkit.org/b/149890 fast/css-grid-layout/grid-shorthands-style-format.html [ Failure ]
  • trunk/Source/WebCore/ChangeLog

    r290571 r290572  
     12022-02-27  Matt Woodrow  <mattwoodrow@apple.com>
     2
     3        Handle reverse flow direction when converting iterator coords for a subgrid
     4        https://bugs.webkit.org/show_bug.cgi?id=236955
     5
     6        Reviewed by Dean Jackson.
     7
     8        When recursing into a subgrid via createForSubgrid, we convert the iterator's
     9        position into coordinates relative to the subgrid. This handles the case where
     10        the subgrid has a reverse flow direction (RTL vs LTR) and swaps the position
     11        to be relative to the opposite edge.
     12
     13        Marks existing WPT grid-gap-007.html as passing
     14
     15        * rendering/Grid.cpp:
     16        (WebCore::GridIterator::createForSubgrid):
     17
    1182022-02-27  Antoine Quint  <graouts@webkit.org>
    219
  • trunk/Source/WebCore/rendering/Grid.cpp

    r290077 r290572  
    281281    ASSERT(subgrid.isSubgrid(innerDirection));
    282282
     283    if (GridLayoutFunctions::isSubgridReversedDirection(*downcast<RenderGrid>(subgrid.parent()), outer.direction(), subgrid)) {
     284        unsigned fixedMax = subgrid.currentGrid().numTracks(innerDirection);
     285        fixedIndex = fixedMax - fixedIndex - 1;
     286    }
     287
    283288    return GridIterator(subgrid.currentGrid(), innerDirection, fixedIndex);
    284289}
Note: See TracChangeset for help on using the changeset viewer.