Bug 195967

Summary: [css-grid] width/height:N% should make the minimum contribution be the minimum size, not the min-content contribution
Product: WebKit Reporter: Oriol Brufau <obrufau>
Component: CSSAssignee: Oriol Brufau <obrufau>
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   
See Also: https://bugs.chromium.org/p/chromium/issues/detail?id=931474
Attachments:
Description Flags
testcase
none
Patch
none
Patch
none
Patch none

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>