Bug 128672 - [CSS Grid Layout] Fix missing layout in flexible and content sized columns
Summary: [CSS Grid Layout] Fix missing layout in flexible and content sized columns
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Manuel Rego Casasnovas (Holidays - back 1st Sep)
URL:
Keywords:
Depends on:
Blocks: 133304
  Show dependency treegraph
 
Reported: 2014-02-12 05:18 PST by Manuel Rego Casasnovas (Holidays - back 1st Sep)
Modified: 2014-05-27 07:38 PDT (History)
7 users (show)

See Also:


Attachments
Example file to reproduce the issue (1.35 KB, text/html)
2014-02-12 05:18 PST, Manuel Rego Casasnovas (Holidays - back 1st Sep)
no flags Details
Patch (7.38 KB, patch)
2014-02-12 06:27 PST, Manuel Rego Casasnovas (Holidays - back 1st Sep)
no flags Details | Formatted Diff | Diff
Patch (7.26 KB, patch)
2014-02-17 02:14 PST, Manuel Rego Casasnovas (Holidays - back 1st Sep)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Rego Casasnovas (Holidays - back 1st Sep) 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 (Holidays - back 1st Sep) 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 (Holidays - back 1st Sep) 2014-02-12 06:27:10 PST
Created attachment 223965 [details]
Patch
Comment 3 Sergio Villar Senin 2014-02-17 01:54:34 PST
Comment on attachment 223965 [details]
Patch

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

r=me

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

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

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

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.