Bug 103332 - [CSS Grid Layout] Support 'auto' sized grid items
Summary: [CSS Grid Layout] Support 'auto' sized grid items
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Julien Chaffraix
URL:
Keywords:
Depends on: 103311
Blocks: 103573
  Show dependency treegraph
 
Reported: 2012-11-26 17:35 PST by Julien Chaffraix
Modified: 2013-01-30 14:43 PST (History)
6 users (show)

See Also:


Attachments
Proposed implementation: translate auto to minmax in RenderStyle. (7.94 KB, patch)
2013-01-30 10:26 PST, Julien Chaffraix
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Chaffraix 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.
Comment 1 Julien Chaffraix 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).
Comment 2 Julien Chaffraix 2013-01-30 10:26:20 PST
Created attachment 185517 [details]
Proposed implementation: translate auto to minmax in RenderStyle.
Comment 3 Tony Chang 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.
Comment 4 Julien Chaffraix 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.
Comment 5 WebKit Review Bot 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>
Comment 6 WebKit Review Bot 2013-01-30 14:43:35 PST
All reviewed patches have been landed.  Closing bug.