haikuwebkit/LayoutTests/fast/css-grid-layout/grid-item-spanning-resoluti...

22 lines
184 B
Plaintext
Raw Permalink Normal View History

[CSS Grid Layout] Handle 2 positions with one 'auto' properly https://bugs.webkit.org/show_bug.cgi?id=111653 Reviewed by Tony Chang. Source/WebCore: The rendering code was making the assumption that we have one position. Thus it couldn't fully match what the specification wants as the 2 opposite positions are required to resolve either position in several cases (e.g. 1 / span 2, auto / 'c'). This change introduces resolveGridPositionsFromStyle to do both opposite positions resolution in one pass and thus handling more cases. Test: fast/css-grid-layout/grid-item-spanning-resolution.html * rendering/RenderGrid.cpp: (WebCore::RenderGrid::maximumIndexInDirection): (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Updated the above functions to rely on resolveGridPositionsFromStyle. (WebCore::RenderGrid::resolveGridPositionsFromStyle): Added this new function that handle the correct resolution. (WebCore::RenderGrid::resolveGridPositionFromStyle): Updated the ASSERT to match the new code flow. * rendering/RenderGrid.h: (WebCore::RenderGrid::GridSpan::GridSpan): Introduced this new struct to hold the 2 positions along one axis. LayoutTests: * fast/css-grid-layout/grid-auto-flow-resolution-expected.txt: * fast/css-grid-layout/grid-auto-flow-resolution.html: * fast/css-grid-layout/grid-item-spanning-resolution-expected.txt: Added. * fast/css-grid-layout/grid-item-spanning-resolution.html: Added. Extended and added a new test. Most of the new testing is failing as it requires other changes to land. This will help us track our progress towards fully supporting the new syntax and padding. * fast/css-grid-layout/resources/grid.css: Added the 2 new classes. Canonical link: https://commits.webkit.org/130223@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-03-08 18:25:30 +00:00
Test that spannig rows / columns inside percentage sized grid areas get properly sized.
PASS
PASS
PASS
PASS
PASS
[CSS Grid Layout] Handle 2 positions with one 'auto' properly https://bugs.webkit.org/show_bug.cgi?id=111653 Reviewed by Tony Chang. Source/WebCore: The rendering code was making the assumption that we have one position. Thus it couldn't fully match what the specification wants as the 2 opposite positions are required to resolve either position in several cases (e.g. 1 / span 2, auto / 'c'). This change introduces resolveGridPositionsFromStyle to do both opposite positions resolution in one pass and thus handling more cases. Test: fast/css-grid-layout/grid-item-spanning-resolution.html * rendering/RenderGrid.cpp: (WebCore::RenderGrid::maximumIndexInDirection): (WebCore::RenderGrid::placeItemsOnGrid): (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Updated the above functions to rely on resolveGridPositionsFromStyle. (WebCore::RenderGrid::resolveGridPositionsFromStyle): Added this new function that handle the correct resolution. (WebCore::RenderGrid::resolveGridPositionFromStyle): Updated the ASSERT to match the new code flow. * rendering/RenderGrid.h: (WebCore::RenderGrid::GridSpan::GridSpan): Introduced this new struct to hold the 2 positions along one axis. LayoutTests: * fast/css-grid-layout/grid-auto-flow-resolution-expected.txt: * fast/css-grid-layout/grid-auto-flow-resolution.html: * fast/css-grid-layout/grid-item-spanning-resolution-expected.txt: Added. * fast/css-grid-layout/grid-item-spanning-resolution.html: Added. Extended and added a new test. Most of the new testing is failing as it requires other changes to land. This will help us track our progress towards fully supporting the new syntax and padding. * fast/css-grid-layout/resources/grid.css: Added the 2 new classes. Canonical link: https://commits.webkit.org/130223@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@145240 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-03-08 18:25:30 +00:00
PASS
PASS
PASS
[CSS Grid Layout] Align our grid-line handling with the updated specification https://bugs.webkit.org/show_bug.cgi?id=113546 Reviewed by Andreas Kling. From Blink r148091 by <jchaffraix@chromium.org> Source/WebCore: This change makes us match the updated specification by making grid line numbers to always resolve against the grid-{column|row}-start edge (the previous code would resolve grid-{column|row}-end grid lines against the grid-{column|row}-end edge). To keep feature parity, negative numbers resolve against the grid-{column|row}-end edge of the 'explicit grid'. Test: fast/css-grid-layout/grid-item-negative-integer-explicit-grid-resolution.html * rendering/RenderGrid.cpp: (WebCore::estimatedGridSizeForPosition): (WebCore::RenderGrid::explicitGridColumnCount): New utility function. (WebCore::RenderGrid::explicitGridRowCount): Ditto. (WebCore::RenderGrid::maximumIndexInDirection): Use explicitGridXXXCount(). (WebCore::RenderGrid::resolveGridPositionsFromStyle): Check that row-end > row-start. (WebCore::RenderGrid::resolveGridPositionFromStyle): Clamp negative values to the first line. * rendering/RenderGrid.h: * rendering/style/GridPosition.h: LayoutTests: Added a couple of new tests to cover the cases of grid resolutions using negative integers. Negative integers must resolve against the grid-{column|row}-end of the explicit grid. * fast/css-grid-layout/grid-auto-flow-resolution-expected.txt: * fast/css-grid-layout/grid-auto-flow-resolution.html: * fast/css-grid-layout/grid-item-negative-integer-explicit-grid-resolution-expected.txt: Added. * fast/css-grid-layout/grid-item-negative-integer-explicit-grid-resolution.html: Added. * fast/css-grid-layout/grid-item-spanning-resolution-expected.txt: * fast/css-grid-layout/grid-item-spanning-resolution.html: * fast/css-grid-layout/resources/grid.css: (.autoLastRowAutoLastColumn): (.autoSecondRowAutoFirstColumn): (.firstRowBothColumn): (.secondRowBothColumn): (.bothRowFirstColumn): (.bothRowSecondColumn): (.bothRowBothColumn): Canonical link: https://commits.webkit.org/137733@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154044 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-14 10:40:40 +00:00
PASS
PASS
PASS
[CSS Grid Layout] Fix grid position resolution https://bugs.webkit.org/show_bug.cgi?id=119801 Reviewed by Andreas Kling. From Blink r148833, r148878, r150403 by <jchaffraix@chromium.org> Source/WebCore: Both grid-{column|row}-end and negative positions were not properly handled in our grid position resolution code. We were using the same code to resolve all the grid positions without considering the edges of the grid. Also refactored the grid size estimation in resolveGridPositionsFromStyle() so we can use it for the grid size estimation. The code no longer requires the grid to be filled at that moment as the specs changed to use the "explicit grid" which is independent of grid items (only depends on style). Test: fast/css-grid-layout/grid-item-negative-position-resolution.html * rendering/RenderGrid.cpp: (WebCore::RenderGrid::maximumIndexInDirection): (WebCore::RenderGrid::resolveGridPositionsFromStyle): (WebCore::adjustGridPositionForSide): (WebCore::RenderGrid::resolveGridPositionFromStyle): * rendering/RenderGrid.h: LayoutTests: Added a new test to check negative position resolution. Also added several new test cases to check that we properly resolve grid positions in the grid edges. * fast/css-grid-layout/grid-item-negative-position-resolution-expected.txt: Added. * fast/css-grid-layout/grid-item-negative-position-resolution.html: Added. * fast/css-grid-layout/grid-item-spanning-resolution-expected.txt: * fast/css-grid-layout/grid-item-spanning-resolution.html: Canonical link: https://commits.webkit.org/138371@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-08-28 10:26:10 +00:00
PASS
PASS
PASS
PASS
PASS
PASS
[CSS Grid Layout] getComputedStyle() must return the specified value for positioning properties https://bugs.webkit.org/show_bug.cgi?id=130010 Reviewed by Darin Adler. Source/WebCore: According to the specs http://dev.w3.org/csswg/css-grid/#property-index and also to http://lists.w3.org/Archives/Public/www-style/2014Mar/0162.html the function getComputedStyle() must return the specified values for positioning properties, i.e, grid-{columns|rows}-{start|end}. We were in some cases, adjusting the style in the StyleResolver (for example with two opposing spans) something that is now done in the RenderGrid because we cannot alter the original style. The code moved to the renderer became more self explanatory and it now supports named grid areas with names ending in "-start" and "-end". Test: fast/css-grid-layout/named-grid-lines-with-named-grid-areas-get-set.html * css/StyleResolver.cpp: (WebCore::StyleResolver::adjustRenderStyle): (WebCore::gridLineDefinedBeforeGridArea): Deleted. (WebCore::StyleResolver::adjustNamedGridItemPosition): Deleted. (WebCore::StyleResolver::adjustGridItemPosition): Deleted. * css/StyleResolver.h: * rendering/RenderGrid.cpp: (WebCore::isColumnSide): (WebCore::RenderGrid::explicitGridSizeForSide): (WebCore::gridLineDefinedBeforeGridArea): (WebCore::setNamedLinePositionIfDefinedBeforeArea): (WebCore::RenderGrid::adjustNamedGridItemPosition): (WebCore::RenderGrid::adjustGridPositionsFromStyle): (WebCore::RenderGrid::resolveGridPositionsFromStyle): (WebCore::RenderGrid::resolveNamedGridLinePositionFromStyle): (WebCore::RenderGrid::resolveNamedGridLinePositionAgainstOppositePosition): * rendering/RenderGrid.h: * rendering/style/GridPosition.h: (WebCore::GridPosition::setAutoPosition): New helper function. LayoutTests: Updated the return value of getComputedStyle(), it must be always the specified value. Added also a new test that verifies the resolution of names in grid positioning properties, both grid area names and grid line names (including any combination of the two). * fast/css-grid-layout/grid-item-area-get-set-expected.txt: * fast/css-grid-layout/grid-item-area-get-set.html: * fast/css-grid-layout/grid-item-column-row-get-set-expected.txt: * fast/css-grid-layout/grid-item-column-row-get-set.html: * fast/css-grid-layout/grid-item-end-after-get-set-expected.txt: * fast/css-grid-layout/grid-item-end-after-get-set.html: * fast/css-grid-layout/grid-item-spanning-resolution-expected.txt: * fast/css-grid-layout/grid-item-spanning-resolution.html: * fast/css-grid-layout/grid-item-start-before-get-set-expected.txt: * fast/css-grid-layout/grid-item-start-before-get-set.html: * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-get-set-expected.txt: Added. * fast/css-grid-layout/named-grid-lines-with-named-grid-areas-get-set.html: Added. Canonical link: https://commits.webkit.org/148821@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@166299 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2014-03-26 16:45:21 +00:00
PASS
PASS