Bug 112269

Summary: [CSS Grid Layout] Handle min-width / max-width on the grid element
Product: WebKit Reporter: Julien Chaffraix <jchaffraix>
Component: Layout and RenderingAssignee: Julien Chaffraix <jchaffraix>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, dglazkov, eric, esprehn+autocc, ojan.autocc, ojan, rniwa, tony, webkit.review.bot, xan.lopez
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 60731    
Attachments:
Description Flags
Proposed change 1: Handle min-width / max-width with testing.
none
Patch for landing none

Description Julien Chaffraix 2013-03-13 10:09:38 PDT
In RenderGrid::computePreferredLogicalWidths(), there is the following comment:
 
// FIXME: We should account for min / max logical width.

Other renderers (table, flex-box, ...) have some code to account for min-width / max-width when computing the preferred logical widths.
Comment 1 Julien Chaffraix 2013-03-13 10:43:41 PDT
Created attachment 192947 [details]
Proposed change 1: Handle min-width / max-width with testing.
Comment 2 WebKit Review Bot 2013-03-13 11:28:56 PDT
Comment on attachment 192947 [details]
Proposed change 1: Handle min-width / max-width with testing.

Attachment 192947 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://webkit-commit-queue.appspot.com/results/17184044

New failing tests:
fast/css-grid-layout/grid-element-empty-row-column.html
fast/css-grid-layout/grid-preferred-logical-widths.html
Comment 3 Julien Chaffraix 2013-03-13 11:43:35 PDT
Comment on attachment 192947 [details]
Proposed change 1: Handle min-width / max-width with testing.

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

> Source/WebCore/rendering/RenderGrid.cpp:196
> +    for (size_t i = 0; i < m_grid.size(); ++i) {

EWS <3

This is wrong m_grid.size() is the row count, not the column count. Will replace with gridColumnCount() which solves the failures. Also will add a sanity check in GridIterator that the starting indexes are inside the grid (which should always be the case as the grid has to be populated for GridIterator to be correct).
Comment 4 Build Bot 2013-03-13 13:30:27 PDT
Comment on attachment 192947 [details]
Proposed change 1: Handle min-width / max-width with testing.

Attachment 192947 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-commit-queue.appspot.com/results/16997752

New failing tests:
fast/css-grid-layout/grid-element-empty-row-column.html
fast/css-grid-layout/grid-preferred-logical-widths.html
Comment 5 Build Bot 2013-03-13 13:49:06 PDT
Comment on attachment 192947 [details]
Proposed change 1: Handle min-width / max-width with testing.

Attachment 192947 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17149506

New failing tests:
fast/css-grid-layout/grid-element-empty-row-column.html
fast/css-grid-layout/grid-preferred-logical-widths.html
Comment 6 Build Bot 2013-03-13 13:59:11 PDT
Comment on attachment 192947 [details]
Proposed change 1: Handle min-width / max-width with testing.

Attachment 192947 [details] did not pass mac-ews (mac):
Output: http://webkit-commit-queue.appspot.com/results/17149507

New failing tests:
fast/css-grid-layout/grid-element-empty-row-column.html
fast/css-grid-layout/grid-preferred-logical-widths.html
Comment 7 Julien Chaffraix 2013-03-13 14:02:10 PDT
Created attachment 192989 [details]
Patch for landing
Comment 8 WebKit Review Bot 2013-03-13 14:52:26 PDT
Comment on attachment 192989 [details]
Patch for landing

Clearing flags on attachment: 192989

Committed r145758: <http://trac.webkit.org/changeset/145758>
Comment 9 WebKit Review Bot 2013-03-13 14:52:29 PDT
All reviewed patches have been landed.  Closing bug.