[CSS Grid Layout] Properly layout spanning grid items with minmax grid tracks
https://bugs.webkit.org/show_bug.cgi?id=112389

Reviewed by Tony Chang.

Source/WebCore:

This change updates our core minmax resolution function to be spanning grid
items aware. The new implementation of the algorithm doesn't totally match
the specification but it is fairly close that it's a good first pass. The
extra complexity in the specification needs to be carefully examinated
first (not to mention the probable change in the core layout algorithm).

Tests: fast/css-grid-layout/minmax-spanning-resolution-columns.html
       fast/css-grid-layout/minmax-spanning-resolution-rows.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
Updated this function to account for spanning grid items by:
- iterating over all spanned grid tracks.
- removing any used breadth from all spanned grid tracks.

LayoutTests:

* fast/css-grid-layout/grid-item-spanning-resolution.html:
* fast/css-grid-layout/resources/grid.css:
(.firstRowBothColumn):
(.secondRowBothColumn):
(.bothRowFirstColumn):
(.bothRowSecondColumn):
(.bothRowBothColumn):
Moved the previous classes for maximum reuse.

* fast/css-grid-layout/minmax-spanning-resolution-columns-expected.txt: Added.
* fast/css-grid-layout/minmax-spanning-resolution-columns.html: Added.
* fast/css-grid-layout/minmax-spanning-resolution-rows-expected.txt: Added.
* fast/css-grid-layout/minmax-spanning-resolution-rows.html: Added.
New tests.

* fast/css-grid-layout/grid-item-change-column-repaint-expected.txt:
* fast/css-grid-layout/grid-item-change-row-repaint-expected.txt:
Unintended consistent progression from this change, it's unclear why these baselines
change as the tests involve no spanning.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@146482 268f45cc-cd09-0410-ab3c-d52691b4dbfc