Bug 148069

Summary: [CSS Grid Layout] Do not stretch always grid items with auto width
Product: WebKit Reporter: Javier Fernandez <jfernandez>
Component: Layout and RenderingAssignee: Javier Fernandez <jfernandez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, esprehn+autocc, glenn, hyatt, jfernandez, kondapallykalyan, mcatanzaro, rego, svillar
Priority: P2 Keywords: BlinkMergeCandidate
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 60731    
Attachments:
Description Flags
Patch none

Description Javier Fernandez 2015-08-16 15:18:23 PDT
We assumed that any grid item with 'auto' width will be stretched to fill all the available space in its grid area. We assumed this because grid area acts as item's container.

However, Grid Layout specification states on its Alignment section that items will be stretched by default, unless either justify-self or align-self compute to a value other than stretch or margins are auto. In those cases, grid items will auto-size to fit their contents.
Comment 1 Javier Fernandez 2015-08-16 15:42:08 PDT
Created attachment 259130 [details]
Patch
Comment 2 WebKit Commit Bot 2015-08-18 10:03:12 PDT
Comment on attachment 259130 [details]
Patch

Clearing flags on attachment: 259130

Committed r188582: <http://trac.webkit.org/changeset/188582>
Comment 3 WebKit Commit Bot 2015-08-18 10:03:17 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Michael Catanzaro 2015-08-22 11:42:03 PDT
I added ENABLE(CSS_GRID_LAYOUT) guards around the use of parent()->isRenderGrid() in r188823.