Bug 112269 - [CSS Grid Layout] Handle min-width / max-width on the grid element
Summary: [CSS Grid Layout] Handle min-width / max-width on the grid element
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:
Blocks: 60731
  Show dependency treegraph
 
Reported: 2013-03-13 10:09 PDT by Julien Chaffraix
Modified: 2013-03-13 14:52 PDT (History)
10 users (show)

See Also:


Attachments
Proposed change 1: Handle min-width / max-width with testing. (11.45 KB, patch)
2013-03-13 10:43 PDT, Julien Chaffraix
no flags Details | Formatted Diff | Diff
Patch for landing (11.86 KB, patch)
2013-03-13 14:02 PDT, 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 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.