Bug 236338 - Account for the sub grid's margin/border/padding on descendant items
Summary: Account for the sub grid's margin/border/padding on descendant items
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Matt Woodrow
URL:
Keywords: InRadar
Depends on: 236337
Blocks: 202115
  Show dependency treegraph
 
Reported: 2022-02-08 15:46 PST by Matt Woodrow
Modified: 2022-02-17 16:56 PST (History)
19 users (show)

See Also:


Attachments
Patch (33.83 KB, patch)
2022-02-14 19:24 PST, Matt Woodrow
no flags Details | Formatted Diff | Diff
Patch for EWS (139.74 KB, patch)
2022-02-14 19:25 PST, Matt Woodrow
no flags Details | Formatted Diff | Diff
Patch (34.04 KB, patch)
2022-02-15 13:09 PST, Matt Woodrow
dino: review+
Details | Formatted Diff | Diff
Patch (33.33 KB, patch)
2022-02-17 12:19 PST, Matt Woodrow
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Woodrow 2022-02-08 15:46:18 PST
When children of a sub grid are included into an outer grid's track sizing algorthim, we need to account for the margin/border/padding of the subgrid element itself as part of their intrinsic size.

https://drafts.csswg.org/css-grid-2/#subgrid-item-contribution
Comment 1 Matt Woodrow 2022-02-14 19:24:34 PST
Created attachment 451979 [details]
Patch
Comment 2 Matt Woodrow 2022-02-14 19:25:14 PST
Created attachment 451980 [details]
Patch for EWS
Comment 3 EWS Watchlist 2022-02-15 11:30:14 PST
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 4 Matt Woodrow 2022-02-15 13:09:29 PST
Created attachment 452078 [details]
Patch
Comment 5 Radar WebKit Bug Importer 2022-02-15 15:47:17 PST
<rdar://problem/88991969>
Comment 6 Dean Jackson 2022-02-15 21:51:03 PST
Comment on attachment 452078 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=452078&action=review

> LayoutTests/imported/w3c/ChangeLog:12
> +        * web-platform-tests/css/css-grid/subgrid/abs-pos-002-expected.html:
> +        * web-platform-tests/css/css-grid/subgrid/abs-pos-003-expected.html:
> +        * web-platform-tests/css/css-grid/subgrid/line-names-008.html:
> +        * web-platform-tests/css/css-grid/subgrid/parent-repeat-auto-fit-001.html:
> +        * web-platform-tests/css/css-grid/subgrid/parent-repeat-auto-fit-002.html:

What's the plan for getting these changes merged back?
Comment 7 Matt Woodrow 2022-02-16 14:36:16 PST
(In reply to Dean Jackson from comment #6)
> Comment on attachment 452078 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=452078&action=review
> 
> > LayoutTests/imported/w3c/ChangeLog:12
> > +        * web-platform-tests/css/css-grid/subgrid/abs-pos-002-expected.html:
> > +        * web-platform-tests/css/css-grid/subgrid/abs-pos-003-expected.html:
> > +        * web-platform-tests/css/css-grid/subgrid/line-names-008.html:
> > +        * web-platform-tests/css/css-grid/subgrid/parent-repeat-auto-fit-001.html:
> > +        * web-platform-tests/css/css-grid/subgrid/parent-repeat-auto-fit-002.html:
> 
> What's the plan for getting these changes merged back?

For better or for worse, I figured out these test changes weeks before I had any sort of sanely reviewable WebKit changes, so I uploaded most of them directly to WPT.

I've linked this bug with the WPT pull request for line-names-008.html, but there's also two other WPT pull requests covering these changes.

https://github.com/web-platform-tests/wpt/pull/32611
https://github.com/web-platform-tests/wpt/pull/32585

I'm not sure if I can link multiple WPT pull requests to a single bug, and I'm scared to risk trying and breaking things.

Hopefully those extra two will get approved and pushed.
Comment 8 Matt Woodrow 2022-02-17 12:19:06 PST
Created attachment 452407 [details]
Patch
Comment 9 EWS 2022-02-17 16:55:56 PST
Committed r290096 (247446@main): <https://commits.webkit.org/247446@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 452407 [details].