Bug 194509 - [css-grid] Indefinite percentage in fit-content track size is treated as 0
Summary: [css-grid] Indefinite percentage in fit-content track size is treated as 0
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oriol Brufau
Keywords: InRadar
Depends on:
Reported: 2019-02-11 11:28 PST by Oriol Brufau
Modified: 2019-02-18 15:53 PST (History)
4 users (show)

See Also:

testcase (304 bytes, text/html)
2019-02-11 11:28 PST, Oriol Brufau
no flags Details
Patch (8.90 KB, patch)
2019-02-11 11:39 PST, 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-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