Bug 194509

Summary: [css-grid] Indefinite percentage in fit-content track size is treated as 0
Product: WebKit Reporter: Oriol Brufau <obrufau>
Component: CSSAssignee: Oriol Brufau <obrufau>
Severity: Normal CC: commit-queue, jfernandez, rego, 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=927865
Description Flags
Patch none

Description Oriol Brufau 2019-02-11 11:28:37 PST
Created attachment 361698 [details]

What steps will reproduce the problem?
(1) Create a css grid sized under a max-content constraint, with a fit-content(100%) column size.
(2) Place a grid item inside it, with a min-content contribution of 50px and a max-content contribution of 100px.

What is the expected result?
The grid is 100px wide.

What happens instead?
The grid is 50px wide.

According to https://github.com/w3c/csswg-drafts/issues/3585, fit-content() with an indefinite percentage should be treated as minmax(auto,max-content) instead of resolving the percentage against 0.

Firefox and Edge already did this, and Blink has been fixed in https://crbug.com/927865
Comment 1 Oriol Brufau 2019-02-11 11:39:06 PST
Created attachment 361700 [details]
Comment 2 WebKit Commit Bot 2019-02-18 15:41:01 PST
Comment on attachment 361700 [details]

Clearing flags on attachment: 361700

Committed r241746: <https://trac.webkit.org/changeset/241746>
Comment 3 WebKit Commit Bot 2019-02-18 15:41:02 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Radar WebKit Bug Importer 2019-02-18 15:53:20 PST