Changeset 290576 in webkit


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

Convert grid direction to be relative to subgrid when accounting for extra margin.
https://bugs.webkit.org/show_bug.cgi?id=236954

Reviewed by Dean Jackson.

Source/WebCore:

|direction| is passed as a direction relative to |grid|, so we need to convert it
to be a direction relative to the subgrid item in order to account for margin on
the correct edge.

Marks existing test orthogonal-writing-mode-003.html as passing.

  • rendering/GridLayoutFunctions.cpp:

(WebCore::GridLayoutFunctions::marginLogicalSizeForChild):

LayoutTests:

Marks existing test orthogonal-writing-mode-003.html as passing.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r290572 r290576  
     12022-02-27  Matt Woodrow  <mattwoodrow@apple.com>
     2
     3        Convert grid direction to be relative to subgrid when accounting for extra margin.
     4        https://bugs.webkit.org/show_bug.cgi?id=236954
     5
     6        Reviewed by Dean Jackson.
     7
     8        * TestExpectations:
     9
     10        Marks existing test orthogonal-writing-mode-003.html as passing.
     11
    1122022-02-27  Matt Woodrow  <mattwoodrow@apple.com>
    213
  • trunk/LayoutTests/TestExpectations

    r290572 r290576  
    14001400webkit.org/b/236957 imported/w3c/web-platform-tests/css/css-grid/subgrid/line-names-007.html [ ImageOnlyFailure ]
    14011401webkit.org/b/236953 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-002.html [ ImageOnlyFailure ]
    1402 webkit.org/b/236954 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-003.html [ ImageOnlyFailure ]
    14031402webkit.org/b/236953 imported/w3c/web-platform-tests/css/css-grid/subgrid/orthogonal-writing-mode-004.html [ ImageOnlyFailure ]
    14041403webkit.org/b/236958 imported/w3c/web-platform-tests/css/css-grid/subgrid/repeat-auto-fill-003.html [ ImageOnlyFailure ]
  • trunk/Source/WebCore/ChangeLog

    r290575 r290576  
     12022-02-27  Matt Woodrow  <mattwoodrow@apple.com>
     2
     3        Convert grid direction to be relative to subgrid when accounting for extra margin.
     4        https://bugs.webkit.org/show_bug.cgi?id=236954
     5
     6        Reviewed by Dean Jackson.
     7
     8        |direction| is passed as a direction relative to |grid|, so we need to convert it
     9        to be a direction relative to the subgrid item in order to account for margin on
     10        the correct edge.
     11
     12        Marks existing test orthogonal-writing-mode-003.html as passing.
     13
     14        * rendering/GridLayoutFunctions.cpp:
     15        (WebCore::GridLayoutFunctions::marginLogicalSizeForChild):
     16
    1172022-02-27  Chris Dumez  <cdumez@apple.com>
    218
  • trunk/Source/WebCore/rendering/GridLayoutFunctions.cpp

    r290096 r290576  
    140140    }
    141141
    142     if (&grid != child.parent())
    143         margin += extraMarginForSubgridAncestors(direction, child);
     142    if (&grid != child.parent()) {
     143        GridTrackSizingDirection subgridDirection = flowAwareDirectionForChild(grid, *downcast<RenderGrid>(child.parent()), direction);
     144        margin += extraMarginForSubgridAncestors(subgridDirection, child);
     145    }
    144146
    145147    return margin;
Note: See TracChangeset for help on using the changeset viewer.