Created attachment 399689 [details]
This function is wrong:
LayoutUnit marginLogicalSizeForChild(const RenderGrid& grid, GridTrackSizingDirection direction, const RenderBox& child)
return computeMarginLogicalSizeForChild(grid, direction, child);
bool isRowAxis = flowAwareDirectionForChild(grid, child, direction) == ForColumns;
LayoutUnit marginStart = marginStartIsAuto(child, direction) ? 0_lu : isRowAxis ? child.marginStart() : child.marginBefore();
LayoutUnit marginEnd = marginEndIsAuto(child, direction) ? 0_lu : isRowAxis ? child.marginEnd() : child.marginAfter();
return marginStart + marginEnd;
It uses `direction` in order to know which side to check in `marginStartIsAuto` and `marginEndIsAuto`.
But when retrieving the margin amount it uses `flowAwareDirectionForChild` instead.
In the attached testcase, there should be a green square, not a green rectangle.
Created attachment 399768 [details]
Created attachment 399769 [details]
There is still some problem here since the testcase in this bug and the new cases in grid-items-minimum-width-orthogonal-001.html still fail.
But this patch fixes grid-items-minimum-height-orthogonal-001.html, so it's an improvement.
Comment on attachment 399769 [details]
r=me, thanks for the fix.
Committed r261894: <https://trac.webkit.org/changeset/261894>
All reviewed patches have been landed. Closing bug and clearing flags on attachment 399769 [details].