WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
232987
[css-grid] Transfer size for grid item with an aspect-ratio and stretch alignment against the definite row
https://bugs.webkit.org/show_bug.cgi?id=232987
Summary
[css-grid] Transfer size for grid item with an aspect-ratio and stretch align...
zsun
Reported
2021-11-11 01:45:33 PST
This is similar to
bug 231802
. Instead of having a percentage of the definite row, the grid item stretches in the block-axis. Affected test - imported/w3c/web-platform-tests/css/css-grid/grid-items/aspect-ratio-004.html
Attachments
Patch
(5.88 KB, patch)
2021-11-11 02:05 PST
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(5.89 KB, patch)
2021-11-11 05:06 PST
,
zsun
no flags
Details
Formatted Diff
Diff
Patch
(6.06 KB, patch)
2021-11-16 03:43 PST
,
zsun
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
zsun
Comment 1
2021-11-11 02:05:15 PST
Created
attachment 443923
[details]
Patch
zsun
Comment 2
2021-11-11 05:06:00 PST
Created
attachment 443938
[details]
Patch
Javier Fernandez
Comment 3
2021-11-12 06:19:19 PST
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 ?
zsun
Comment 4
2021-11-16 03:43:51 PST
Created
attachment 444370
[details]
Patch
zsun
Comment 5
2021-11-16 04:53:00 PST
(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.
Javier Fernandez
Comment 6
2021-11-17 15:08:10 PST
Comment on
attachment 444370
[details]
Patch r=me
EWS
Comment 7
2021-11-18 01:12:59 PST
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]
.
Radar WebKit Bug Importer
Comment 8
2021-11-18 01:13:25 PST
<
rdar://problem/85540225
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug