Bug 165654 - [css-grid] Move Grid into GridSizingData
Summary: [css-grid] Move Grid into GridSizingData
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: 165007
  Show dependency treegraph
 
Reported: 2016-12-09 08:35 PST by Sergio Villar Senin
Modified: 2016-12-28 19:21 PST (History)
11 users (show)

See Also:


Attachments
Patch (46.53 KB, patch)
2016-12-09 08:39 PST, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Patch (46.53 KB, patch)
2016-12-12 02:03 PST, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews117 for mac-yosemite (1.83 MB, application/zip)
2016-12-12 03:09 PST, Build Bot
no flags Details
Patch (46.61 KB, patch)
2016-12-12 04:13 PST, Sergio Villar Senin
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews117 for mac-yosemite (2.04 MB, application/zip)
2016-12-12 07:20 PST, Build Bot
no flags Details
Patch (46.64 KB, patch)
2016-12-13 03:00 PST, 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-12-09 08:35:55 PST
[css-grid] Move Grid into GridSizingData
Comment 1 Sergio Villar Senin 2016-12-09 08:39:54 PST
Created attachment 296653 [details]
Patch
Comment 2 Darin Adler 2016-12-09 20:33:47 PST
/Volumes/Data/EWS/WebKit/Source/WebCore/rendering/RenderGrid.cpp:1972:13: error: use of undeclared identifier 'grid'
    ASSERT(!grid.needsItemsPlacement());
Comment 3 Sergio Villar Senin 2016-12-12 02:03:44 PST
Created attachment 296902 [details]
Patch

Fixed a typo
Comment 4 Build Bot 2016-12-12 03:09:53 PST
Comment on attachment 296902 [details]
Patch

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

Number of test failures exceeded the failure limit.
Comment 5 Build Bot 2016-12-12 03:09:56 PST
Created attachment 296906 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 6 Sergio Villar Senin 2016-12-12 04:13:47 PST
Created attachment 296912 [details]
Patch

Fixed a failing ASSERT
Comment 7 Build Bot 2016-12-12 07:20:14 PST
Comment on attachment 296912 [details]
Patch

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

Number of test failures exceeded the failure limit.
Comment 8 Build Bot 2016-12-12 07:20:18 PST
Created attachment 296915 [details]
Archive of layout-test-results from ews117 for mac-yosemite

The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews117  Port: mac-yosemite  Platform: Mac OS X 10.10.5
Comment 9 Sergio Villar Senin 2016-12-13 03:00:09 PST
Created attachment 297000 [details]
Patch

Temporarily commented some ASSERTs that are not valid yet
Comment 10 Javier Fernandez 2016-12-14 03:00:03 PST
Comment on attachment 297000 [details]
Patch

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

The change looks fine to me.

> Source/WebCore/rendering/RenderGrid.cpp:1973
> +    // ASSERT(!m_grid.needsItemsPlacement());

Wouldn't be clearer to assert whether "items placement" is completed ? instead of this negative clause.

> Source/WebCore/rendering/RenderGrid.cpp:2279
> +    Grid& grid = sizingData.grid();

const ?

> Source/WebCore/rendering/RenderGrid.cpp:2796
> +    ASSERT(!m_grid.needsItemsPlacement());

ditto.
Why we don't need to comment this assert out ?

> Source/WebCore/rendering/RenderGrid.cpp:2807
> +    // ASSERT(!m_grid.needsItemsPlacement());

Ditto.
Comment 11 Sergio Villar Senin 2016-12-14 03:15:37 PST
Comment on attachment 297000 [details]
Patch

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

>> Source/WebCore/rendering/RenderGrid.cpp:1973
>> +    // ASSERT(!m_grid.needsItemsPlacement());
> 
> Wouldn't be clearer to assert whether "items placement" is completed ? instead of this negative clause.

Do you suggest to add another method? We can do it but it'd be redundant IMHO. I added this because it looks familiar (it's like needsLayout()).

>> Source/WebCore/rendering/RenderGrid.cpp:2279
>> +    Grid& grid = sizingData.grid();
> 
> const ?

ok

>> Source/WebCore/rendering/RenderGrid.cpp:2796
>> +    ASSERT(!m_grid.needsItemsPlacement());
> 
> ditto.
> Why we don't need to comment this assert out ?

Because all the callers of this function are executed during layout before clearing the grid. That's the key, we're sure we have completed the items placement and we're also sure that we're performing a layout.

>> Source/WebCore/rendering/RenderGrid.cpp:2807
>> +    // ASSERT(!m_grid.needsItemsPlacement());
> 
> Ditto.

In this case the ASSERT is not always true because we clear the grid after the layout. As the comment says, once the m_grid becomes persistent then the ASSERT will become valid.
Comment 12 Sergio Villar Senin 2016-12-28 03:07:44 PST
Committed r210197: <http://trac.webkit.org/changeset/210197>
Comment 13 Michael Catanzaro 2016-12-28 19:21:38 PST
Please be sure to use the webkit-patch script to land changes, so you don't forget to update the dates in the changelog. ;)