Bug 163724 - [css-grid] Content Alignment broken with indefinite sized grid container
Summary: [css-grid] Content Alignment broken with indefinite sized grid container
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Javier Fernandez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-20 06:20 PDT by Javier Fernandez
Modified: 2016-10-21 01:14 PDT (History)
12 users (show)

See Also:


Attachments
Test case to reproduce the issue. (429 bytes, text/html)
2016-10-20 06:20 PDT, Javier Fernandez
no flags Details
Patch (16.39 KB, patch)
2016-10-20 06:34 PDT, Javier Fernandez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-yosemite (1017.26 KB, application/zip)
2016-10-20 07:31 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (894.17 KB, application/zip)
2016-10-20 07:35 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (9.37 MB, application/zip)
2016-10-20 07:47 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews114 for mac-yosemite (1.68 MB, application/zip)
2016-10-20 07:48 PDT, Build Bot
no flags Details
Patch (16.45 KB, patch)
2016-10-20 08:16 PDT, Javier Fernandez
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews116 for mac-yosemite (1.84 MB, application/zip)
2016-10-20 09:12 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews101 for mac-yosemite (1.39 MB, application/zip)
2016-10-20 09:15 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (17.37 MB, application/zip)
2016-10-20 09:32 PDT, Build Bot
no flags Details
Archive of layout-test-results from ews105 for mac-yosemite-wk2 (902.70 KB, application/zip)
2016-10-20 09:35 PDT, Build Bot
no flags Details
Patch (19.07 KB, patch)
2016-10-20 10:39 PDT, Javier Fernandez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Javier Fernandez 2016-10-20 06:20:35 PDT
Created attachment 292172 [details]
Test case to reproduce the issue.

When the grid container has indefinite width or height the Content Alignment properties (align-content and justify-content) don't work as expected. 

It seems that we are not computing correctly the available free space when the container has indefinite size. That issue is affecting how we deal with Overflow Alignment on the align-content and justify-content properties.

In order to reproduce the issue, just load the attached test case and see how it behaves in the first grid, which is alignment using align-content: end.
Comment 1 Javier Fernandez 2016-10-20 06:34:21 PDT
Created attachment 292173 [details]
Patch
Comment 2 Manuel Rego Casasnovas 2016-10-20 07:09:59 PDT
Comment on attachment 292173 [details]
Patch

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

r=me

> Source/WebCore/ChangeLog:8
> +        The Grid Tracks sizing algorithm updates receives the available space

Typo "updates receives".

> Source/WebCore/ChangeLog:19
> +        (WebCore::RenderGrid::layoutBlock): Compute freeSpace for Rows after doing layout and resolving the indefinite height.

Nit: You wrapped the lines in the rest of the ChangeLog comment but not here.
Comment 3 Build Bot 2016-10-20 07:31:08 PDT
Comment on attachment 292173 [details]
Patch

Attachment 292173 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2330882

New failing tests:
fast/css-grid-layout/grid-content-alignment-overflow.html
Comment 4 Build Bot 2016-10-20 07:31:12 PDT
Created attachment 292179 [details]
Archive of layout-test-results from ews103 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 5 Build Bot 2016-10-20 07:35:37 PDT
Comment on attachment 292173 [details]
Patch

Attachment 292173 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2330893

New failing tests:
fast/css-grid-layout/grid-content-alignment-overflow.html
Comment 6 Build Bot 2016-10-20 07:35:41 PDT
Created attachment 292181 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 7 Build Bot 2016-10-20 07:46:58 PDT
Comment on attachment 292173 [details]
Patch

Attachment 292173 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/2330918

New failing tests:
fast/css-grid-layout/grid-content-alignment-overflow.html
Comment 8 Build Bot 2016-10-20 07:47:01 PDT
Created attachment 292186 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 9 Build Bot 2016-10-20 07:48:16 PDT
Comment on attachment 292173 [details]
Patch

Attachment 292173 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2330944

New failing tests:
fast/css-grid-layout/grid-content-alignment-overflow.html
Comment 10 Build Bot 2016-10-20 07:48:19 PDT
Created attachment 292187 [details]
Archive of layout-test-results from ews114 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 11 Javier Fernandez 2016-10-20 08:16:58 PDT
Created attachment 292193 [details]
Patch
Comment 12 Build Bot 2016-10-20 09:12:25 PDT
Comment on attachment 292193 [details]
Patch

Attachment 292193 [details] did not pass mac-debug-ews (mac):
Output: http://webkit-queues.webkit.org/results/2331607

New failing tests:
fast/css-grid-layout/grid-content-alignment-overflow.html
Comment 13 Build Bot 2016-10-20 09:12:29 PDT
Created attachment 292204 [details]
Archive of layout-test-results from ews116 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews116  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 14 Build Bot 2016-10-20 09:15:05 PDT
Comment on attachment 292193 [details]
Patch

Attachment 292193 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.webkit.org/results/2331682

New failing tests:
fast/css-grid-layout/grid-content-alignment-overflow.html
Comment 15 Build Bot 2016-10-20 09:15:09 PDT
Created attachment 292205 [details]
Archive of layout-test-results from ews101 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews101  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 16 Build Bot 2016-10-20 09:32:09 PDT
Comment on attachment 292193 [details]
Patch

Attachment 292193 [details] did not pass ios-sim-ews (ios-simulator-wk2):
Output: http://webkit-queues.webkit.org/results/2331731

New failing tests:
fast/css-grid-layout/grid-content-alignment-overflow.html
Comment 17 Build Bot 2016-10-20 09:32:14 PDT
Created attachment 292209 [details]
Archive of layout-test-results from ews123 for ios-simulator-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-wk2  Platform: Mac OS X 10.11.6
Comment 18 Build Bot 2016-10-20 09:35:27 PDT
Comment on attachment 292193 [details]
Patch

Attachment 292193 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.webkit.org/results/2331793

New failing tests:
fast/css-grid-layout/grid-content-alignment-overflow.html
Comment 19 Build Bot 2016-10-20 09:35:32 PDT
Created attachment 292210 [details]
Archive of layout-test-results from ews105 for mac-yosemite-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105  Port: mac-yosemite-wk2  Platform: Mac OS X 10.10.5
Comment 20 Javier Fernandez 2016-10-20 10:39:13 PDT
Created attachment 292224 [details]
Patch

Fixed layout tests.
Comment 21 WebKit Commit Bot 2016-10-21 01:13:59 PDT
Comment on attachment 292224 [details]
Patch

Clearing flags on attachment: 292224

Committed r207663: <http://trac.webkit.org/changeset/207663>
Comment 22 WebKit Commit Bot 2016-10-21 01:14:05 PDT
All reviewed patches have been landed.  Closing bug.