[CSS Grid Layout] handle undefined RemainingSpace in computeUsedBreadthOfGridTracks algorithm
https://bugs.webkit.org/show_bug.cgi?id=128372
Patch by Javier Fernandez <jfernandez@igalia.com> on 2014-02-24
Reviewed by David Hyatt.
From Blink r165692 by <svillar@igalia.com>
Source/WebCore:
The spec defines a different code path for the computeUsedBreadthOfGridTracks algorithm
http://dev.w3.org/csswg/css-grid/#function-ComputeUsedBreadthOfGridTracks.
Basically the track breadth is different when the available size is undefined and thus,
cannot be taken into account during the computations.
The available size is undefined whenever the height is auto or the grid element has a
shrink-to-fit behavior.
It was also renamed the function to match the specs so the function name starts with
'compute' instead of 'computed'.
No new tests, but added new cases to some of them.
- rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeIntrinsicLogicalWidths):
(WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
(WebCore::gridElementIsShrinkToFit):
(WebCore::RenderGrid::computeNormalizedFractionBreadth):
(WebCore::RenderGrid::layoutGridItems):
LayoutTests:
Adapt tests to consider also cases for undefined RemainingSpace.
- fast/css-grid-layout/flex-and-minmax-content-resolution-rows-expected.txt:
- fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html:
- fast/css-grid-layout/flex-content-resolution-rows-expected.txt:
- fast/css-grid-layout/flex-content-resolution-rows.html:
- fast/css-grid-layout/grid-auto-columns-rows-update-expected.txt:
- fast/css-grid-layout/grid-auto-columns-rows-update.html:
- fast/css-grid-layout/grid-dynamic-updates-relayout-expected.txt:
- fast/css-grid-layout/grid-dynamic-updates-relayout.html:
- fast/css-grid-layout/grid-item-addition-track-breadth-update-expected.txt:
- fast/css-grid-layout/grid-item-addition-track-breadth-update.html:
- fast/css-grid-layout/grid-item-multiple-minmax-content-resolution-expected.txt:
- fast/css-grid-layout/grid-item-multiple-minmax-content-resolution.html:
- fast/css-grid-layout/grid-item-removal-track-breadth-update-expected.txt:
- fast/css-grid-layout/grid-item-removal-track-breadth-update.html:
- fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution-expected.txt:
- fast/css-grid-layout/grid-item-with-percent-height-in-auto-height-grid-resolution.html:
- fast/css-grid-layout/implicit-position-dynamic-change-expected.txt:
- fast/css-grid-layout/implicit-position-dynamic-change.html:
- fast/css-grid-layout/minmax-max-content-resolution-rows-expected.txt:
- fast/css-grid-layout/minmax-max-content-resolution-rows.html:
- fast/css-grid-layout/minmax-min-content-column-resolution-rows-expected.txt:
- fast/css-grid-layout/minmax-min-content-column-resolution-rows.html:
- fast/css-grid-layout/minmax-spanning-resolution-rows-expected.txt:
- fast/css-grid-layout/minmax-spanning-resolution-rows.html: