RESOLVED FIXED 103332
[CSS Grid Layout] Support 'auto' sized grid items
https://bugs.webkit.org/show_bug.cgi?id=103332
Summary [CSS Grid Layout] Support 'auto' sized grid items
Julien Chaffraix
Reported 2012-11-26 17:35:03 PST
Per the specification, auto is equivalent to ‘minmax(min-content, max-content)’. Talking with Ojan, this definition is different from the shrink-to-fit behavior (http://www.w3.org/TR/css3-box/#shrink-to-fit): min(max(preferred minimum width, available width), preferred width). It's possible to have the 2 equations applying on the same item (if 'self-align: start' and the grid track is 'auto') so we should check if there is no contradiction here.
Attachments
Proposed implementation: translate auto to minmax in RenderStyle. (7.94 KB, patch)
2013-01-30 10:26 PST, Julien Chaffraix
no flags
Julien Chaffraix
Comment 1 2013-01-29 17:46:55 PST
We have moved up to a point where we can implement 'auto'. The main minmax bug is kept open so that we can track some issues blocked by the spec (e.g the question of orthogonal flow on grid items).
Julien Chaffraix
Comment 2 2013-01-30 10:26:20 PST
Created attachment 185517 [details] Proposed implementation: translate auto to minmax in RenderStyle.
Tony Chang
Comment 3 2013-01-30 11:25:39 PST
Comment on attachment 185517 [details] Proposed implementation: translate auto to minmax in RenderStyle. This seems OK to me, but Ojan suggested putting the handling of auto in RenderGrid.cpp as a helper function. He might have a stronger opinion than I do.
Julien Chaffraix
Comment 4 2013-01-30 13:36:40 PST
Comment on attachment 185517 [details] Proposed implementation: translate auto to minmax in RenderStyle. Ojan said that it was a slight violation of keeping RenderStyle dumb but he is fine with it due to the limited impact.
WebKit Review Bot
Comment 5 2013-01-30 14:43:32 PST
Comment on attachment 185517 [details] Proposed implementation: translate auto to minmax in RenderStyle. Clearing flags on attachment: 185517 Committed r141317: <http://trac.webkit.org/changeset/141317>
WebKit Review Bot
Comment 6 2013-01-30 14:43:35 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.