Changeset 199661 in webkit
- Timestamp:
- Apr 18, 2016 2:45:30 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r199657 r199661 1 2016-04-18 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Use grid-template-areas to determine the explicit grid 4 https://bugs.webkit.org/show_bug.cgi?id=156575 5 6 Reviewed by Darin Adler. 7 8 Created new test to check the right behavior. 9 10 * fast/css-grid-layout/explicit-grid-size-expected.txt: Added. 11 * fast/css-grid-layout/explicit-grid-size.html: Added. 12 * fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt: 13 Small modification as now the columns defined by 14 grid-tempalte-areas are in the explicit grid. 15 * fast/css-grid-layout/grid-template-shorthand-get-set.html: 16 Ditto. 17 1 18 2016-04-18 Manuel Rego Casasnovas <rego@igalia.com> 2 19 -
trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt
r197669 r199661 29 29 PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesWithoutRowSize, '').getPropertyValue('-webkit-grid-template-rows') is "[head] 0px [tail]" 30 30 PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesWithoutRowSize, '').getPropertyValue('-webkit-grid-template-areas') is "\"a\"" 31 PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumns, '').getPropertyValue('-webkit-grid-template-columns') is "10px "31 PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumns, '').getPropertyValue('-webkit-grid-template-columns') is "10px 20px" 32 32 PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumns, '').getPropertyValue('-webkit-grid-template-rows') is "[head] 15px [tail]" 33 33 PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumns, '').getPropertyValue('-webkit-grid-template-areas') is "\"a b\"" 34 PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumnsWithoutRowSize, '').getPropertyValue('-webkit-grid-template-columns') is "10px "34 PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumnsWithoutRowSize, '').getPropertyValue('-webkit-grid-template-columns') is "10px 20px" 35 35 PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumnsWithoutRowSize, '').getPropertyValue('-webkit-grid-template-rows') is "[head] 0px [tail]" 36 36 PASS window.getComputedStyle(gridTemplateComplexFormWithLineNamesMultipleColumnsWithoutRowSize, '').getPropertyValue('-webkit-grid-template-areas') is "\"a b\"" -
trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html
r197669 r199661 29 29 } 30 30 #gridTemplateComplexFormWithLineNamesMultipleColumns { 31 -webkit-grid-template: [head] "a b" 15px [tail] / 10px ;31 -webkit-grid-template: [head] "a b" 15px [tail] / 10px 20px; 32 32 } 33 33 #gridTemplateComplexFormWithLineNamesMultipleColumnsWithoutRowSize { 34 -webkit-grid-template: [head] "a b" [tail] / 10px ;34 -webkit-grid-template: [head] "a b" [tail] / 10px 20px; 35 35 } 36 36 #gridTemplateComplexFormWithLineNamesMultipleRows { … … 197 197 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNames"), "10px", "[head] 15px [tail]", '"a"'); 198 198 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesWithoutRowSize"), "10px", "[head] 0px [tail]", '"a"'); 199 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleColumns"), "10px ", "[head] 15px [tail]", '"a b"');200 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleColumnsWithoutRowSize"), "10px ", "[head] 0px [tail]", '"a b"');199 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleColumns"), "10px 20px", "[head] 15px [tail]", '"a b"'); 200 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleColumnsWithoutRowSize"), "10px 20px", "[head] 0px [tail]", '"a b"'); 201 201 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleRows"), "10px", "[head1] 15px [tail1 head2] 20px [tail2]", '"a" "b"'); 202 202 testGridDefinitionsValues(document.getElementById("gridTemplateComplexFormWithLineNamesMultipleRowsWithoutRowsSizes"), "10px", "[head1] 0px [tail1 head2] 0px [tail2]", '"a" "b"'); -
trunk/Source/WebCore/ChangeLog
r199659 r199661 1 2016-04-18 Manuel Rego Casasnovas <rego@igalia.com> 2 3 [css-grid] Use grid-template-areas to determine the explicit grid 4 https://bugs.webkit.org/show_bug.cgi?id=156575 5 6 Reviewed by Darin Adler. 7 8 From the spec (https://drafts.csswg.org/css-grid/#grid-definition): 9 "The size of the explicit grid is determined by the larger of the number 10 of rows/columns defined by grid-template-areas and the number 11 of rows/columns sized by grid-template-rows/grid-template-columns." 12 13 So we need to take into account the rows/columns defined by 14 grid-template-areas to determine the size of the explicit grid. 15 16 Test: fast/css-grid-layout/explicit-grid-size.html 17 18 * rendering/style/GridPositionsResolver.cpp: 19 (WebCore::GridPositionsResolver::explicitGridColumnCount): 20 (WebCore::GridPositionsResolver::explicitGridRowCount): 21 1 22 2016-04-18 Carlos Garcia Campos <cgarcia@igalia.com> 2 23 -
trunk/Source/WebCore/rendering/style/GridPositionsResolver.cpp
r198399 r199661 105 105 unsigned GridPositionsResolver::explicitGridColumnCount(const RenderStyle& gridContainerStyle) 106 106 { 107 return std::min<unsigned>( gridContainerStyle.gridColumns().size(), kGridMaxTracks);107 return std::min<unsigned>(std::max(gridContainerStyle.gridColumns().size(), gridContainerStyle.namedGridAreaColumnCount()), kGridMaxTracks); 108 108 } 109 109 110 110 unsigned GridPositionsResolver::explicitGridRowCount(const RenderStyle& gridContainerStyle) 111 111 { 112 return std::min<unsigned>( gridContainerStyle.gridRows().size(), kGridMaxTracks);112 return std::min<unsigned>(std::max(gridContainerStyle.gridRows().size(), gridContainerStyle.namedGridAreaRowCount()), kGridMaxTracks); 113 113 } 114 114
Note: See TracChangeset
for help on using the changeset viewer.