Changeset 261949 in webkit
- Timestamp:
- May 20, 2020 1:24:52 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r261946 r261949 1 2020-05-20 Oriol Brufau <obrufau@igalia.com> 2 3 [css-grid] Fix auto repeat with multiple tracks and gutters 4 https://bugs.webkit.org/show_bug.cgi?id=182922 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 Update test expectations. 9 10 * fast/css-grid-layout/grid-auto-repeat-huge-grid.html: 11 1 12 2020-05-20 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/LayoutTests/fast/css-grid-layout/grid-auto-repeat-huge-grid.html
r214604 r261949 181 181 autoFitGridElementCols.style.gridGap = "1000000px"; 182 182 183 getTracksCheckingLength(autoFillGridElementCols, "grid-template-columns", 130, ["wideGrid", "lotsOfAutoRepeatWithAutoFillCols"]);184 getTracksCheckingLength(autoFitGridElementCols, "grid-template-columns", 82, ["wideGrid", "lotsOfAutoRepeatWithAutoFitCols"]);183 getTracksCheckingLength(autoFillGridElementCols, "grid-template-columns", 30, ["wideGrid", "lotsOfAutoRepeatWithAutoFillCols"]); 184 getTracksCheckingLength(autoFitGridElementCols, "grid-template-columns", 34, ["wideGrid", "lotsOfAutoRepeatWithAutoFitCols"]); 185 185 186 186 autoFillGridElementCols.style.gridGap = "0px"; … … 203 203 autoFitGridElementRows.style.gridGap = "1000000px"; 204 204 205 getTracksCheckingLength(autoFillGridElementRows, "grid-template-rows", 130, ["tallGrid", "lotsOfAutoRepeatWithAutoFillRows"]);206 getTracksCheckingLength(autoFitGridElementRows, "grid-template-rows", 82, ["tallGrid", "lotsOfAutoRepeatWithAutoFitRows"]);205 getTracksCheckingLength(autoFillGridElementRows, "grid-template-rows", 30, ["tallGrid", "lotsOfAutoRepeatWithAutoFillRows"]); 206 getTracksCheckingLength(autoFitGridElementRows, "grid-template-rows", 34, ["tallGrid", "lotsOfAutoRepeatWithAutoFitRows"]); 207 207 208 208 autoFillGridElementRows.style.gridGap = "0px"; -
trunk/LayoutTests/imported/w3c/ChangeLog
r261907 r261949 1 2020-05-20 Oriol Brufau <obrufau@igalia.com> 2 3 [css-grid] Fix auto repeat with multiple tracks and gutters 4 https://bugs.webkit.org/show_bug.cgi?id=182922 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 Import WPT test. 9 10 * web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001-expected.html: Added. 11 * web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001.html: Added. 12 * web-platform-tests/css/css-grid/grid-definition/w3c-import.log: 13 1 14 2020-05-20 Oriol Brufau <obrufau@igalia.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/w3c-import.log
r261767 r261949 24 24 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-min-size-001.html 25 25 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-min-size-002.html 26 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001-expected.html 27 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001.html 26 28 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-change-auto-repeat-tracks.html 27 29 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-change-fit-content-argument-001.html -
trunk/Source/WebCore/ChangeLog
r261948 r261949 1 2020-05-20 Oriol Brufau <obrufau@igalia.com> 2 3 [css-grid] Fix auto repeat with multiple tracks and gutters 4 https://bugs.webkit.org/show_bug.cgi?id=182922 5 6 Reviewed by Manuel Rego Casasnovas. 7 8 The code that computes the number of auto repeat tracks wrongly assumes 9 that the second argument of the repeat() notation is a single track 10 function. That was true in the beginning, however specs were later on 11 modified to allow a <track-list>. We support a <track-list> as a second 12 argument since long ago but the code that computes the number of 13 auto-repeat tracks was never updated. 14 15 This patch modifies two places that relate to the gaps between the 16 auto-repeat tracks, which ensures the proper total length. 17 18 This is a port of https://crrev.com/620278 from Chromium. 19 20 Tests: fast/css-grid-layout/grid-auto-repeat-huge-grid.html 21 imported/w3c/web-platform-tests/css/css-grid/grid-definition/grid-auto-repeat-multiple-values-001.html 22 23 * rendering/RenderGrid.cpp: 24 (WebCore::RenderGrid::computeAutoRepeatTracksCount const): 25 1 26 2020-05-20 Simon Fraser <simon.fraser@apple.com> 2 27 -
trunk/Source/WebCore/rendering/RenderGrid.cpp
r260249 r261949 508 508 } 509 509 510 // Add gutters as if there where only 1 auto repeat track. Gaps between auto repeat tracks will be added later when511 // computing the repetitions.510 // Add gutters as if auto repeat tracks were only repeated once. Gaps between different repetitions will be added later when 511 // computing the number of repetitions of the auto repeat(). 512 512 LayoutUnit gapSize = gridGap(direction, availableSize); 513 tracksSize += gapSize * trackSizes.size();513 tracksSize += gapSize * (trackSizes.size() + autoRepeatTrackListLength - 1); 514 514 515 515 LayoutUnit freeSpace = availableSize.value() - tracksSize; … … 517 517 return autoRepeatTrackListLength; 518 518 519 LayoutUnit autoRepeatSizeWithGap = autoRepeatTracksSize + gapSize ;519 LayoutUnit autoRepeatSizeWithGap = autoRepeatTracksSize + gapSize * autoRepeatTrackListLength; 520 520 unsigned repetitions = 1 + (freeSpace / autoRepeatSizeWithGap).toUnsigned(); 521 521 freeSpace -= autoRepeatSizeWithGap * (repetitions - 1);
Note: See TracChangeset
for help on using the changeset viewer.