Changeset 178577 in webkit
- Timestamp:
- Jan 16, 2015 2:22:45 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r178574 r178577 1 2014-11-26 Sergio Villar Senin <svillar@igalia.com> 2 3 [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space 4 https://bugs.webkit.org/show_bug.cgi?id=139059 5 6 Reviewed by David Hyatt. 7 8 The third step of the grid track sizing algorithm (method 9 ComputeUsedBreadthOfGridTracks in the old specs version of the 10 algorithm) tries to grow all grid tracks until the remaining space 11 is exhausted. Should the remaining space is undefined we should fill 12 the tracks up to their limits. This is specified in pseudocode like 13 this: 14 15 For each Grid track t in GridTracks 16 t.UsedBreadth = t.MaxBreadth 17 18 That's correct for most of the cases, but it becomes 19 wrong whenever t.UsedBreadth > t.MaxBreadth something that is not 20 incorrect. What we actually want to do is to grow the track to its 21 maximum if and only if the used breadth is smaller than the maximum. 22 23 * TestExpectations: Added a test which is correct but starts to fail 24 due to another bug (wkb.ug/139058). 25 * fast/css-grid-layout/grid-auto-columns-rows-update.html: 26 * fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt: 27 * fast/css-grid-layout/grid-content-sized-columns-resolution.html: 28 * fast/css-grid-layout/grid-grow-tracks-to-their-max-expected.txt: Added. 29 * fast/css-grid-layout/grid-grow-tracks-to-their-max.html: Added. 30 * fast/css-grid-layout/grid-item-removal-track-breadth-update.html: 31 * fast/css-grid-layout/minmax-max-content-resolution-rows.html: 32 * fast/css-grid-layout/minmax-min-content-column-resolution-rows.html: 33 * fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html: 34 * fast/css-grid-layout/percent-of-indefinite-track-size.html: 35 1 36 2015-01-15 Zalan Bujtas <zalan@apple.com> 2 37 -
trunk/LayoutTests/TestExpectations
r178386 r178577 456 456 457 457 webkit.org/b/140309 css3/background/background-repeat-space-content.html [ ImageOnlyFailure ] 458 459 webkit.org/b/139058 fast/css-grid-layout/flex-and-minmax-content-resolution-rows.html [ Failure ] -
trunk/LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-update.html
r174057 r178577 44 44 updateAndCheck("unconstrainedGrid", { 'rows': 'minmax(20em, 15px)', 'columns': '50px' }, { 'width': '50px', 'height': '200px' }); 45 45 updateAndCheck("unconstrainedGrid", { 'rows': 'minmax(20em, 15px)', 'columns': 'minmax(10%, 100px)' }, { 'width': '100px', 'height': '200px' }); 46 updateAndCheck("unconstrainedGrid", { 'rows': 'minmax(-webkit-min-content, 15px)', 'columns': 'minmax(10%, 100px)' }, { 'width': '100px', 'height': ' 15px' });46 updateAndCheck("unconstrainedGrid", { 'rows': 'minmax(-webkit-min-content, 15px)', 'columns': 'minmax(10%, 100px)' }, { 'width': '100px', 'height': '20px' }); 47 47 updateAndCheck("unconstrainedGrid", { 'rows': 'minmax(-webkit-min-content, 15px)', 'columns': 'minmax(10%, -webkit-max-content)' }, { 'width': '120px', 'height': '15px' }); 48 48 updateAndCheck("unconstrainedGrid", { 'rows': 'minmax(-webkit-min-content, 15px)', 'columns': 'minmax(10%, -webkit-max-content)' }, { 'width': '120px', 'height': '15px' }); … … 53 53 updateAndCheck("constrainedGridUndefinedHeight", { 'rows': 'minmax(20em, 15px)', 'columns': '50px' }, { 'width': '50px', 'height': '200px' }); 54 54 updateAndCheck("constrainedGridUndefinedHeight", { 'rows': 'minmax(20em, 15px)', 'columns': 'minmax(10%, 100px)' }, { 'width': '1px', 'height': '200px' }); 55 updateAndCheck("constrainedGridUndefinedHeight", { 'rows': 'minmax(-webkit-min-content, 15px)', 'columns': 'minmax(10%, 100px)' }, { 'width': '1px', 'height': ' 15px' });55 updateAndCheck("constrainedGridUndefinedHeight", { 'rows': 'minmax(-webkit-min-content, 15px)', 'columns': 'minmax(10%, 100px)' }, { 'width': '1px', 'height': '20px' }); 56 56 updateAndCheck("constrainedGridUndefinedHeight", { 'rows': 'minmax(-webkit-min-content, 15px)', 'columns': 'minmax(-webkit-max-content, 100px)' }, { 'width': '120px', 'height': '15px' }); 57 57 updateAndCheck("constrainedGridUndefinedHeight", { 'rows': 'minmax(40em, 15px)', 'columns': 'minmax(-webkit-max-content, 100px)' }, { 'width': '120px', 'height': '400px' }); -
trunk/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution-expected.txt
r174643 r178577 14 14 PASS window.getComputedStyle(gridMaxContentFixedAndAutoAboveLimits, '').getPropertyValue('-webkit-grid-template-columns') is "65px 85px" 15 15 PASS window.getComputedStyle(gridMinContentFixedAndFixedFixedAndAuto, '').getPropertyValue('-webkit-grid-template-columns') is "20px 20px 60px" 16 PASS window.getComputedStyle(gridAutoAndFixedFixedAndMaxContentFixed, '').getPropertyValue('-webkit-grid-template-columns') is " 40px 20px 90px"16 PASS window.getComputedStyle(gridAutoAndFixedFixedAndMaxContentFixed, '').getPropertyValue('-webkit-grid-template-columns') is "70px 20px 60px" 17 17 PASS successfullyParsed is true 18 18 -
trunk/LayoutTests/fast/css-grid-layout/grid-content-sized-columns-resolution.html
r174643 r178577 155 155 testGridColumnsValues("gridMaxContentFixedAndAutoAboveLimits", "65px 85px"); 156 156 testGridColumnsValues("gridMinContentFixedAndFixedFixedAndAuto", "20px 20px 60px"); 157 testGridColumnsValues("gridAutoAndFixedFixedAndMaxContentFixed", " 40px 20px 90px");157 testGridColumnsValues("gridAutoAndFixedFixedAndMaxContentFixed", "70px 20px 60px"); 158 158 </script> 159 159 </body> -
trunk/LayoutTests/fast/css-grid-layout/grid-item-removal-track-breadth-update.html
r168416 r178577 81 81 testRemoval("unconstrainedAutoGrid", { 'width': '390', 'height': '10' }, { 'width': '350', 'height': '10' }, { 'width': '170', 'height': '10' }); 82 82 testRemoval("unconstrainedMinContentFixedGrid", { 'width': '100', 'height': '60' }, { 'width': '100', 'height': '60' }, { 'width': '100', 'height': '40' }); 83 testRemoval("unconstrainedMinContentFixedGridUndefinedHeight", { 'width': '100', 'height': ' 40' }, { 'width': '100', 'height': '40' }, { 'width': '100', 'height': '40' });83 testRemoval("unconstrainedMinContentFixedGridUndefinedHeight", { 'width': '100', 'height': '60' }, { 'width': '100', 'height': '60' }, { 'width': '100', 'height': '40' }); 84 84 testRemoval("unconstrainedMaxContentFixedGrid", { 'width': '390', 'height': '40' }, { 'width': '350', 'height': '40' }, { 'width': '170', 'height': '40' }); 85 85 testRemoval("unconstrainedFixedMinContentGrid", { 'width': '100', 'height': '60' }, { 'width': '100', 'height': '60' }, { 'width': '100', 'height': '40' }); … … 88 88 testRemoval("lessConstrainedAutoGrid", { 'width': '60', 'height': '90' }, { 'width': '60', 'height': '60' }, { 'width': '60', 'height': '30' }); 89 89 testRemoval("lessConstrainedMinContentFixedGrid", { 'width': '60', 'height': '90' }, { 'width': '60', 'height': '60' }, { 'width': '60', 'height': '30' }); 90 testRemoval("lessConstrainedMinContentFixedGridUndefinedHeight", { 'width': '60', 'height': ' 40' }, { 'width': '60', 'height': '40' }, { 'width': '60', 'height': '40' });90 testRemoval("lessConstrainedMinContentFixedGridUndefinedHeight", { 'width': '60', 'height': '90' }, { 'width': '60', 'height': '60' }, { 'width': '60', 'height': '40' }); 91 91 testRemoval("lessConstrainedMaxContentFixedGrid", { 'width': '350', 'height': '20' }, { 'width': '350', 'height': '20' }, { 'width': '170', 'height': '20' }); 92 92 testRemoval("lessConstrainedMaxContentFixedGridUndefinedHeight", { 'width': '350', 'height': '40' }, { 'width': '350', 'height': '40' }, { 'width': '170', 'height': '40' }); -
trunk/LayoutTests/fast/css-grid-layout/minmax-max-content-resolution-rows.html
r168416 r178577 56 56 <div class="constrainedContainer"> 57 57 <div class="grid gridMinMaxContent"> 58 <div class="firstRowFirstColumn" data-expected-width="20" data-expected-height=" 50">XX XX XX XX XX XX XX XX</div>58 <div class="firstRowFirstColumn" data-expected-width="20" data-expected-height="80">XX XX XX XX XX XX XX XX</div> 59 59 </div> 60 60 </div> … … 77 77 <div class="grid gridMinMaxContent"> 78 78 <!-- The 'max' logical width ends up being smaller than the 'min' so per the spec we ignore the 'max'. --> 79 <div class="firstRowFirstColumn" data-expected-width="20" data-expected-height=" 50">XX XX XX XX XX XX XX XX</div>79 <div class="firstRowFirstColumn" data-expected-width="20" data-expected-height="80">XX XX XX XX XX XX XX XX</div> 80 80 </div> 81 81 </div> -
trunk/LayoutTests/fast/css-grid-layout/minmax-min-content-column-resolution-rows.html
r168416 r178577 51 51 <div class="constrainedContainer"> 52 52 <div class="grid gridMinMinContent"> 53 <div class="firstRowFirstColumn" data-expected-width="30" data-expected-height=" 40">XX XX XX XX XX XX</div>53 <div class="firstRowFirstColumn" data-expected-width="30" data-expected-height="60">XX XX XX XX XX XX</div> 54 54 </div> 55 55 </div> … … 70 70 <div style="width: 30px; height: 100px"> 71 71 <div class="grid gridMinMinContent"> 72 <div class="firstRowFirstColumn" data-expected-width="30" data-expected-height=" 40">XX XX XX XX XX XX</div>72 <div class="firstRowFirstColumn" data-expected-width="30" data-expected-height="60">XX XX XX XX XX XX</div> 73 73 </div> 74 74 </div> -
trunk/LayoutTests/fast/css-grid-layout/percent-of-indefinite-track-size-in-auto.html
r174057 r178577 39 39 </div> 40 40 <div style="position: relative;"> 41 <div class="indefiniteSizeGrid gridWithPercentInMinOfMinMax" data-expected-width="30" data-expected-height=" 15">41 <div class="indefiniteSizeGrid gridWithPercentInMinOfMinMax" data-expected-width="30" data-expected-height="20"> 42 42 <div class="firstRowFirstColumn">XXX</div> 43 43 <div class="firstRowFirstColumn">XX XX</div> -
trunk/LayoutTests/fast/css-grid-layout/percent-of-indefinite-track-size.html
r174057 r178577 39 39 </div> 40 40 <div style="position: relative;"> 41 <div class="indefiniteSizeGrid gridWithPercentInMinOfMinMax" data-expected-width="30" data-expected-height=" 15">41 <div class="indefiniteSizeGrid gridWithPercentInMinOfMinMax" data-expected-width="30" data-expected-height="20"> 42 42 <div class="firstRowFirstColumn">XXX</div> 43 43 <div class="firstRowFirstColumn">XX XX</div> -
trunk/Source/WebCore/ChangeLog
r178575 r178577 1 2014-11-26 Sergio Villar Senin <svillar@igalia.com> 2 3 [CSS Grid Layout] Tracks shrink sometimes with indefinite remaining space 4 https://bugs.webkit.org/show_bug.cgi?id=139059 5 6 Reviewed by David Hyatt. 7 8 Test: fast/css-grid-layout/grid-grow-tracks-to-their-max.html 9 10 * rendering/RenderGrid.cpp: 11 (WebCore::RenderGrid::computeUsedBreadthOfGridTracks): 12 1 13 2015-01-15 Csaba Osztrogonác <ossy@webkit.org> 2 14 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r177858 r178577 346 346 } else { 347 347 for (auto& track : tracks) 348 track.m_usedBreadth = track.m_maxBreadth;348 track.m_usedBreadth = std::max(track.m_usedBreadth, track.m_maxBreadth); 349 349 } 350 350
Note: See TracChangeset
for help on using the changeset viewer.