Bug 195967 - [css-grid] width/height:N% should make the minimum contribution be the minimum size, not the min-content contribution
Summary: [css-grid] width/height:N% should make the minimum contribution be the minimu...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oriol Brufau
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-19 15:31 PDT by Oriol Brufau
Modified: 2020-05-15 16:27 PDT (History)
10 users (show)

See Also:


Attachments
testcase (512 bytes, text/html)
2019-03-19 15:31 PDT, Oriol Brufau
no flags Details
Patch (9.58 KB, patch)
2020-05-15 09:47 PDT, Oriol Brufau
no flags Details | Formatted Diff | Diff
Patch (9.59 KB, patch)
2020-05-15 15:52 PDT, Oriol Brufau
no flags Details | Formatted Diff | Diff
Patch (9.60 KB, patch)
2020-05-15 15:59 PDT, Oriol Brufau
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oriol Brufau 2019-03-19 15:31:37 PDT
Created attachment 365244 [details]
testcase

What steps will reproduce the problem?
(1) load the attached testcase

What is the expected result?
The grid tracks should be 10px/10px and the grid item should fill that area.

What happens instead?
The grid tracks (and item) are 30px/30px and thus overflow the grid container.

`height` and `width` are set to indefinite percentages, so they behave as auto.
Therefore, the minimum contribution should be the outer size that would result from the minimum size, not the min-content contribution.
This was changed in https://github.com/w3c/csswg-drafts/issues/2367

Chromium has been fixed in https://bugs.chromium.org/p/chromium/issues/detail?id=931474
Comment 1 Oriol Brufau 2020-05-15 09:47:42 PDT
Created attachment 399488 [details]
Patch
Comment 2 Manuel Rego Casasnovas 2020-05-15 15:43:45 PDT
Comment on attachment 399488 [details]
Patch

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

Thanks for fixing this, LGTM.

> Source/WebCore/ChangeLog:23
> +        Some cases in the test still fail due to other issues.

Nit: Could you link to bug reports for the "other issues"?
Comment 3 Oriol Brufau 2020-05-15 15:46:21 PDT
(In reply to Manuel Rego Casasnovas from comment #2)
> Comment on attachment 399488 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=399488&action=review
> 
> Thanks for fixing this, LGTM.
> 
> > Source/WebCore/ChangeLog:23
> > +        Some cases in the test still fail due to other issues.
> 
> Nit: Could you link to bug reports for the "other issues"?

OK, actually it seems it's just bug 209461
Comment 4 Oriol Brufau 2020-05-15 15:52:08 PDT
Created attachment 399524 [details]
Patch
Comment 5 Oriol Brufau 2020-05-15 15:59:38 PDT
Created attachment 399525 [details]
Patch
Comment 6 EWS 2020-05-15 16:26:05 PDT
Committed r261767: <https://trac.webkit.org/changeset/261767>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399525 [details].
Comment 7 Radar WebKit Bug Importer 2020-05-15 16:27:16 PDT
<rdar://problem/63293632>