9.j: The subgrid is always stretched in its subgridded dimension(s): the align-self/justify-self properties on it are ignored, as are any specified width/height constraints. We need to make sure that we always stretch subgrid items, even if it means overriding a specified width/height.
<rdar://problem/89996514>
Created attachment 454186 [details] Patch
Created attachment 454188 [details] Patch
This patch modifies the imported WPT tests. Please ensure that any changes on the tests (not coming from a WPT import) are exported to WPT. Please see https://trac.webkit.org/wiki/WPTExportProcess
Comment on attachment 454188 [details] Patch Upstream WPT doesn't seem happy about some trailing whitespace in your test, can you remove them? See: https://community-tc.services.mozilla.com/tasks/fKANgyH9StmuqxCzp54LiA/runs/0/logs/public/logs/live.log#L108-110
Comment on attachment 454188 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454188&action=review > Source/WebCore/rendering/RenderBox.cpp:2885 > - return style.resolvedJustifySelf(&containingBlock->style(), containingBlock->selfAlignmentNormalBehavior(this)).position() == ItemPosition::Stretch; > - return style.resolvedAlignSelf(&containingBlock->style(), containingBlock->selfAlignmentNormalBehavior(this)).position() == ItemPosition::Stretch; > + return resolvedJustifySelf(&containingBlock->style(), containingBlock->selfAlignmentNormalBehavior(this)).position() == ItemPosition::Stretch; > + return resolvedAlignSelf(&containingBlock->style(), containingBlock->selfAlignmentNormalBehavior(this)).position() == ItemPosition::Stretch; I think it's ok to just check/downcast to RenderGrid and run the grid specific code in here. While I personally dislike the way we structure all these different layout systems, I think that's what the current pattern here is (same for width) > Source/WebCore/rendering/RenderGrid.cpp:1208 > + GridTrackSizingDirection childFlowDirection = GridLayoutFunctions::flowAwareDirectionForChild(*this, child, direction); auto? > Source/WebCore/rendering/RenderGrid.cpp:1292 > +{ I'd just early return on a non-grid child. > Source/WebCore/rendering/RenderGrid.cpp:1295 > + GridTrackSizingDirection childBlockDirection = GridLayoutFunctions::flowAwareDirectionForChild(*this, child, ForRows); > + LayoutUnit stretchedLogicalHeight = availableAlignmentSpaceForChildBeforeStretching(GridLayoutFunctions::overridingContainingBlockContentSizeForChild(child, childBlockDirection).value(), child, ForRows); autos
Created attachment 455023 [details] Patch for landing
Created attachment 455039 [details] Patch for landing
Committed r291464 (248580@main): <https://commits.webkit.org/248580@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 455039 [details].