Bug 162150 - [css-grid] Remove the x2 computation of row sizes with indefinite heights
Summary: [css-grid] Remove the x2 computation of row sizes with indefinite heights
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sergio Villar Senin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-19 07:30 PDT by Sergio Villar Senin
Modified: 2016-09-22 00:59 PDT (History)
10 users (show)

See Also:


Attachments
Patch (54.55 KB, patch)
2016-09-19 07:40 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews122 for ios-simulator-elcapitan-wk2 (7.48 MB, application/zip)
2016-09-19 08:56 PDT, Build Bot
no flags Details
Patch (52.83 KB, patch)
2016-09-20 07:35 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews123 for ios-simulator-elcapitan-wk2 (8.04 MB, application/zip)
2016-09-20 08:46 PDT, Build Bot
no flags Details
Patch with improved reftest (52.85 KB, patch)
2016-09-20 09:26 PDT, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Patch (53.95 KB, patch)
2016-09-21 07:33 PDT, Sergio Villar Senin
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergio Villar Senin 2016-09-19 07:30:21 PDT
[css-grid] Remove the x2 computation of row sizes with indefinite heights
Comment 1 Sergio Villar Senin 2016-09-19 07:40:25 PDT
Created attachment 289228 [details]
Patch
Comment 2 Build Bot 2016-09-19 08:56:38 PDT
Comment on attachment 289228 [details]
Patch

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

New failing tests:
fast/css-grid-layout/nested-grid.html
Comment 3 Build Bot 2016-09-19 08:56:42 PDT
Created attachment 289233 [details]
Archive of layout-test-results from ews122 for ios-simulator-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews122  Port: ios-simulator-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 4 Javier Fernandez 2016-09-19 11:15:45 PDT
Comment on attachment 289228 [details]
Patch

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

> Source/WebCore/rendering/RenderGrid.cpp:479
> +    bool hasDefiniteLogicalHeight = hasOverrideLogicalContentHeight() || computeContentLogicalHeight(MainOrPreferredSize, style().logicalHeight(), Nullopt);

I guess the hasOverrideLogicalContentHeight() is intended for the "nested grid" case, right ? In the case of the grid, as item, being stretched. I wonder whether computeContentLogicalheight should handle that case by itself, though.
Comment 5 Sergio Villar Senin 2016-09-20 04:47:43 PDT
Comment on attachment 289228 [details]
Patch

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

>> Source/WebCore/rendering/RenderGrid.cpp:479
>> +    bool hasDefiniteLogicalHeight = hasOverrideLogicalContentHeight() || computeContentLogicalHeight(MainOrPreferredSize, style().logicalHeight(), Nullopt);
> 
> I guess the hasOverrideLogicalContentHeight() is intended for the "nested grid" case, right ? In the case of the grid, as item, being stretched. I wonder whether computeContentLogicalheight should handle that case by itself, though.

As mentioned in the above FIXME it should be really handled by hasDefiniteLogicalHeight(). The problem is that that method needs to be reworked as it fails in many cases, like with positioned, replaced or objects with override sizes like grid items.
Comment 6 Sergio Villar Senin 2016-09-20 04:54:23 PDT
(In reply to comment #2)
> Comment on attachment 289228 [details]
> Patch
> 
> Attachment 289228 [details] did not pass ios-sim-ews (ios-simulator-wk2):
> Output: http://webkit-queues.webkit.org/results/2106089
> 
> New failing tests:
> fast/css-grid-layout/nested-grid.html

So there is a 0.02% difference between both results, I guess that should be considered equal.

Anyway I've just realized that I was adding a reftest and that the contents do not fit inside the viewport without having a vertical scrollbar. This means that the results on the bottom won't be ever considered.

I'll rework the test so it fits.
Comment 7 Sergio Villar Senin 2016-09-20 07:35:13 PDT
Created attachment 289343 [details]
Patch
Comment 8 Javier Fernandez 2016-09-20 08:09:49 PDT
Comment on attachment 289343 [details]
Patch

The changes look good to me. Since we have fixed the bug that caused some test cases to FAIL, shouldn't we remove the FIXME present in the html test ?
Comment 9 Build Bot 2016-09-20 08:45:59 PDT
Comment on attachment 289343 [details]
Patch

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

New failing tests:
fast/css-grid-layout/nested-grid.html
Comment 10 Build Bot 2016-09-20 08:46:03 PDT
Created attachment 289350 [details]
Archive of layout-test-results from ews123 for ios-simulator-elcapitan-wk2

The attached test failures were seen while running run-webkit-tests on the ios-sim-ews.
Bot: ews123  Port: ios-simulator-elcapitan-wk2  Platform: Mac OS X 10.11.6
Comment 11 Sergio Villar Senin 2016-09-20 09:26:08 PDT
Created attachment 289359 [details]
Patch with improved reftest
Comment 12 Javier Fernandez 2016-09-21 01:14:17 PDT
Comment on attachment 289359 [details]
Patch with improved reftest

I still fail to see the removal of the FIXME in the percent-track-breadths-regarding-container-size.html test.
Comment 13 Sergio Villar Senin 2016-09-21 07:33:15 PDT
Created attachment 289450 [details]
Patch

I totally overlooked your comment. Here you are the FIXME removal
Comment 14 Darin Adler 2016-09-21 11:49:55 PDT
Comment on attachment 289450 [details]
Patch

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

> Source/WebCore/rendering/RenderGrid.cpp:478
> +    // FIXME: We should use RenderBlock::hasDefiniteLogicalHeight() but it does not work for positioned stuff
> +    // FIXME: consider caching the hasDefiniteLogicalHeight value throughout the layout

Most WebKit comments are supposed to be sentence style, with capital letters at the start and periods at the end.
Comment 15 Sergio Villar Senin 2016-09-22 00:59:55 PDT
Committed r206253: <http://trac.webkit.org/changeset/206253>