Changeset 198486 in webkit
- Timestamp:
- Mar 21, 2016 3:42:33 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r198482 r198486 1 2016-02-03 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-grid] Fix percentage tracks' size computation in grids with gutters 4 https://bugs.webkit.org/show_bug.cgi?id=153825 5 6 Reviewed by Darin Adler. 7 8 * fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt: 9 * fast/css-grid-layout/grid-gutters-and-flex-content.html: 10 * fast/css-grid-layout/grid-gutters-and-tracks-expected.txt: 11 * fast/css-grid-layout/grid-gutters-and-tracks.html: 12 1 13 2016-03-20 Jinwoo Jeong <jw00.jeong@samsung.com> 2 14 -
trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt
r190663 r198486 2 2 3 3 TEST COMPLETE 4 PASS 5 PASS 4 6 PASS 5 7 PASS -
trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content.html
r196934 r198486 6 6 <script src="../../resources/js-test.js"></script> 7 7 <style> 8 .grid MaxFlexContent { -webkit-grid-template: 50px /minmax(30px, 2fr); }8 .gridPercentAndFlexContent { -webkit-grid-template: 50px / 50% minmax(30px, 2fr); } 9 9 .gridTwoDoubleMaxFlexContent { -webkit-grid-template: 50px / minmax(10px, 0.5fr) minmax(10px, 2fr); } 10 10 .gridIgnoreSecondGridItem { -webkit-grid-template: 50px / minmax(300px, 3fr) minmax(150px, 1fr); } 11 11 12 .gridRows MaxFlexContent { -webkit-grid-template: minmax(30px, 2fr)/ 50px; }12 .gridRowsPercentAndFlexContent { -webkit-grid-template: minmax(30px, 2fr) 50% / 50px; } 13 13 .gridRowsTwoMaxFlexContent { -webkit-grid-template: minmax(10px, 1fr) minmax(10px, 2fr) / 50px; } 14 14 .gridRowsTwoDoubleMaxFlexContent { -webkit-grid-template: minmax(10px, 0.5fr) minmax(10px, 2fr) / 50px; } … … 44 44 </div> 45 45 46 <div style="width: 120px; height: 10px;"> 47 <div class="grid gridPercentAndFlexContent gridRowColumnGaps" data-expected-width="120" data-expected-height="50"> 48 <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="60" data-expected-height="50"></div> 49 <div class="firstRowSecondColumn" data-expected-width="41" data-expected-height="50"></div> 50 </div> 51 </div> 52 46 53 <!-- Check that gutters do not interfere with flex content resolution for rows --> 47 54 … … 57 64 <div class="firstRowFirstColumn" data-expected-width="50" data-expected-height="10"></div> 58 65 <div class="secondRowFirstColumn" data-expected-width="50" data-expected-height="20"></div> 66 </div> 67 </div> 68 69 <div style="width: 10px;"> 70 <div class="grid gridRowsPercentAndFlexContent gridRowColumnGaps" style="height: 150px" data-expected-width="10" data-expected-height="150"> 71 <div class="firstRowFirstColumn" data-expected-width="50" data-expected-height="42"></div> 72 <div class="sizedToGridArea secondRowFirstColumn" data-expected-width="50" data-expected-height="75"></div> 59 73 </div> 60 74 </div> -
trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-tracks-expected.txt
r190663 r198486 45 45 XX XX 46 46 PASS 47 PASS 47 48 XXXXX 48 49 X … … 57 58 PASS 58 59 PASS 60 PASS -
trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-tracks.html
r196934 r198486 21 21 .gridMultipleFixed { -webkit-grid-template: [first] 37px [foo] 57px [bar] 77px [last] / [first] 15px [foo] 25px [bar] 35px [last]; } 22 22 .gridFixed100 { -webkit-grid-template: repeat(2, 100px) / repeat(2, 100px); } 23 .gridWithPercent { -webkit-grid-template: 10% 10px / 10px 20% repeat(1, 30px); } 24 .gridWithDoublePercent { -webkit-grid-template: 35% 65% / 60% 40%; } 25 26 .fixedSizeGrid { 27 width: 220px; 28 height: 300px; 29 } 30 .gridFixedAutoTracks { 31 -webkit-grid-auto-rows: 20px; 32 -webkit-grid-auto-columns: 40px; 33 } 23 34 24 35 .thirdRowThirdColumn { -webkit-grid-area: 3 / 3; } … … 101 112 </div> 102 113 114 <div style="position: relative"> 115 <div class="grid gridWithPercent fixedSizeGrid gridRowColumnGaps gridFixedAutoTracks" data-expected-width="220" data-expected-height="300"> 116 <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="10" data-expected-height="30"></div> 117 <div class="secondRowSecondColumn" data-offset-x="33" data-offset-y="42" data-expected-width="44" data-expected-height="10"></div> 118 <div class="thirdRowThirdColumn" data-offset-x="100" data-offset-y="64" data-expected-width="30" data-expected-height="20"></div> 119 </div> 120 </div> 121 103 122 <!-- Check that gutters contribute to the size of spanning items. --> 104 123 <div style="position: relative"> … … 115 134 <div style="-webkit-grid-row: first / last; -webkit-grid-column-start: 2" data-offset-x="38" data-offset-y="0" data-expected-width="25" data-expected-height="195">X XX X XX X</div> 116 135 <div style="-webkit-grid-row: 1 / 3; -webkit-grid-column: first / bar" data-offset-x="0" data-offset-y="0" data-expected-width="63" data-expected-height="106">XXX XX<br>XX<br>XXXXX</div> 136 </div> 137 </div> 138 139 <div style="position: relative"> 140 <div class="grid gridWithDoublePercent fixedSizeGrid gridRowColumnGaps gridFixedAutoTracks" data-expected-width="220" data-expected-height="300"> 141 <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="132" data-expected-height="105"></div> 142 <div class="secondRowSecondColumn" data-offset-x="155" data-offset-y="117" data-expected-width="88" data-expected-height="195"></div> 143 <div class="secondRowBothColumn" data-offset-x="0" data-offset-y="117" data-expected-width="243" data-expected-height="195"></div> 117 144 </div> 118 145 </div> -
trunk/Source/WebCore/ChangeLog
r198484 r198486 1 2016-02-03 Sergio Villar Senin <svillar@igalia.com> 2 3 [css-grid] Fix percentage tracks' size computation in grids with gutters 4 https://bugs.webkit.org/show_bug.cgi?id=153825 5 6 Reviewed by Darin Adler. 7 8 The track sizing algorithm is passed an available size 9 (freeSpace in the code) where to size the tracks. The total size of the grid 10 gutters was pre-removed from that available size because we cannot use it to size 11 the tracks. However that available size is also used to compute the size of 12 percentage tracks. As we're removing the size of the gutters, the base size for 13 percentage computations is smaller than it should be. 14 15 * rendering/RenderGrid.cpp: 16 (WebCore::RenderGrid::computeUsedBreadthOfGridTracks): 17 1 18 2016-03-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 19 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r198399 r198486 504 504 sizingData.contentSizedTracksIndex.shrink(0); 505 505 506 const LayoutUnit maxSize = initialFreeSpace.valueOr(0); 506 LayoutUnit maxSize = initialFreeSpace.valueOr(0); 507 // Grid gutters were removed from freeSpace by the caller (if freeSpace is definite), 508 // but we must use them to compute relative (i.e. percentages) sizes. 509 if (initialFreeSpace) 510 maxSize += guttersSize(direction, direction == ForColumns ? gridColumnCount() : gridRowCount()); 511 507 512 // 1. Initialize per Grid track variables. 508 513 for (unsigned i = 0; i < tracks.size(); ++i) {
Note: See TracChangeset
for help on using the changeset viewer.