Bug 128672

Summary: [CSS Grid Layout] Fix missing layout in flexible and content sized columns
Product: WebKit Reporter: Manuel Rego Casasnovas <rego>
Component: CSSAssignee: Manuel Rego Casasnovas <rego>
Severity: Normal CC: commit-queue, esprehn+autocc, glenn, jfernandez, kling, kondapallykalyan, svillar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 133304    
Description Flags
Example file to reproduce the issue
Patch none

Description Manuel Rego Casasnovas 2014-02-12 05:18:22 PST
Created attachment 223963 [details]
Example file to reproduce the issue

RenderGrid::logicalContentHeightForChild() is called for some items at the beginning of RenderGrid::layoutGridItems() from RenderGrid::computeUsedBreadthOfGridTracks(). This causes that the comparison inside the for loop in RenderGrid::layoutGridItems() does not detect width changes, so elements won't be marked as needsLayout.

So the comparison is done in RenderGrid::logicalContentHeightForChild() and the element is marked to perform a layout if the width has changed.

The issue can be reproduced easily with a simple grid with one flexible or content sized column, all the available width is not used. On top of that, when you resize the window the flexible or content sized columns are not updating their size properly.
Comment 1 Manuel Rego Casasnovas 2014-02-12 05:19:13 PST
This has been already fixed in Blink and will be ported to WebKit: https://codereview.chromium.org/146833018
Comment 2 Manuel Rego Casasnovas 2014-02-12 06:27:10 PST
Created attachment 223965 [details]
Comment 3 Sergio Villar Senin 2014-02-17 01:54:34 PST
Comment on attachment 223965 [details]

View in context: https://bugs.webkit.org/attachment.cgi?id=223965&action=review


> Source/WebCore/ChangeLog:8
> +        From Blink r166914.

Don't need to specify this if you're the original author.
Comment 4 Manuel Rego Casasnovas 2014-02-17 02:14:01 PST
Created attachment 224346 [details]

Patch for landing.
Comment 5 WebKit Commit Bot 2014-02-17 02:52:32 PST
Comment on attachment 224346 [details]

Clearing flags on attachment: 224346

Committed r164214: <http://trac.webkit.org/changeset/164214>
Comment 6 WebKit Commit Bot 2014-02-17 02:52:34 PST
All reviewed patches have been landed.  Closing bug.