| Summary: | [css-grid] Subgrid items should always be stretched | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Matt Woodrow <mattwoodrow> | ||||||||||
| Component: | Layout and Rendering | Assignee: | Matt Woodrow <mattwoodrow> | ||||||||||
| Status: | RESOLVED FIXED | ||||||||||||
| Severity: | Normal | CC: | bfulgham, changseok, clopez, esprehn+autocc, ews-watchlist, glenn, jfernandez, kondapallykalyan, ntim, obrufau, pdr, rego, simon.fraser, svillar, webkit-bug-importer, youennf, zalan | ||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||||
| Hardware: | Unspecified | ||||||||||||
| OS: | Unspecified | ||||||||||||
| See Also: | https://github.com/web-platform-tests/wpt/pull/33121 | ||||||||||||
| Attachments: |
|
||||||||||||
|
Description
Matt Woodrow
2022-03-08 16:29:00 PST
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]. |