Summary: | [css-grid] Transfer size for grid item with an aspect-ratio and stretch alignment against the definite row | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zsun | ||||||||
Component: | CSS | Assignee: | zsun | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | changseok, esprehn+autocc, ews-watchlist, glenn, jfernandez, kondapallykalyan, pdr, rego, svillar, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
zsun
2021-11-11 01:45:33 PST
Created attachment 443923 [details]
Patch
Created attachment 443938 [details]
Patch
Comment on attachment 443938 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=443938&action=review > Source/WebCore/rendering/RenderGrid.cpp:965 > + if (autoGridItem->hasStretchedLogicalHeight()) I think a comment here, explaining why we need to apply the stretch alignment, and how it affects the aspect-ratio, would be a good idea. > Source/WebCore/rendering/RenderReplaced.cpp:805 > + return (hasRelativeLogicalHeight() || (isGridItem() && hasStretchedLogicalHeight())) && style().logicalWidth().isAuto(); Do we need to check for isGridItem() ? wouldn't this be relevant for flexbox (the other layout model applying stretch alignment) as well ? Created attachment 444370 [details]
Patch
(In reply to Javier Fernandez from comment #3) > Comment on attachment 443938 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=443938&action=review > > > Source/WebCore/rendering/RenderGrid.cpp:965 > > + if (autoGridItem->hasStretchedLogicalHeight()) > > I think a comment here, explaining why we need to apply the stretch > alignment, and how it affects the aspect-ratio, would be a good idea. > Comments added. > > Source/WebCore/rendering/RenderReplaced.cpp:805 > > + return (hasRelativeLogicalHeight() || (isGridItem() && hasStretchedLogicalHeight())) && style().logicalWidth().isAuto(); > > Do we need to check for isGridItem() ? wouldn't this be relevant for flexbox > (the other layout model applying stretch alignment) as well ? Yes, I think we do need to check for isGridItem(). I have seen a couple of table related tests failures without this check. Tried running WPT flexbox tests with the check (e.g. add (isGridItem() || isFlexItem()) but couldn't see it makes any difference on the test result for flexibox tests. Comment on attachment 444370 [details]
Patch
r=me
Committed r285987 (244384@main): <https://commits.webkit.org/244384@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 444370 [details]. |