Gutters adjacent to collapsed tracks decrease the end position of grid areas in the previous track. Therefore, when the grid items are aligned to the center or end, they are shifted incorrectly. Examples: https://codepen.io/anon/pen/qMeQMQ, https://codepen.io/mrego/pen/XVvNom Works on Firefox. Has been fixed in Blink: https://bugs.chromium.org/p/chromium/issues/detail?id=801881
Created attachment 351112 [details] Patch
Comment on attachment 351112 [details] Patch Attachment 351112 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/9386091 Number of test failures exceeded the failure limit.
Created attachment 351128 [details] Archive of layout-test-results from ews116 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews116 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 351112 [details] Patch Attachment 351112 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/9386437 Number of test failures exceeded the failure limit.
Created attachment 351129 [details] Archive of layout-test-results from ews102 for mac-sierra The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews102 Port: mac-sierra Platform: Mac OS X 10.12.6
Comment on attachment 351112 [details] Patch Attachment 351112 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/9386623 Number of test failures exceeded the failure limit.
Created attachment 351133 [details] Archive of layout-test-results from ews106 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews106 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
Comment on attachment 351112 [details] Patch Attachment 351112 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/9387466 New failing tests: fast/repaint/align-self-overflow-change.html imported/blink/fast/text-autosizing/grid-dbcat.html fast/repaint/align-self-change.html ietestcenter/css3/grid/grid-items-004.htm imported/blink/fast/css-grid-layout/grid-item-before-anonymous-child-crash.html ietestcenter/css3/grid/grid-columns-001.htm fast/repaint/justify-items-legacy-change.html fast/repaint/justify-self-change.html ietestcenter/css3/grid/grid-items-001.htm ietestcenter/css3/grid/grid-items-003.htm fast/repaint/align-items-overflow-change.html ietestcenter/css3/grid/grid-items-002.htm ietestcenter/css3/grid/display-grid-001.htm ietestcenter/css3/grid/display-grid-002.htm imported/blink/fast/css-grid-layout/grid-add-item-with-positioned-items.html ietestcenter/css3/grid/grid-items-005.htm fast/forms/fieldset/fieldset-grid.html fast/repaint/justify-self-overflow-change.html imported/blink/fast/css-grid-layout/stale-grid-layout-2.html fast/repaint/justify-items-overflow-change.html
Created attachment 351146 [details] Archive of layout-test-results from ews205 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews205 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment on attachment 351112 [details] Patch Attachment 351112 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/9388734 Number of test failures exceeded the failure limit.
Created attachment 351164 [details] Archive of layout-test-results from ews123 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews123 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
Created attachment 351177 [details] Patch
I found some code that used isEmptyAutoRepeatTrack without seemingly checking hasAutoRepeatEmptyTracks beforehand, so I thought it wasn't necessary in WebKit. I just didn't look properly. I have fixed the patch.
Comment on attachment 351177 [details] Patch Thanks for porting this. LGTM.
Comment on attachment 351177 [details] Patch Clearing flags on attachment: 351177 Committed r236643: <https://trac.webkit.org/changeset/236643>
All reviewed patches have been landed. Closing bug.
<rdar://problem/44886192>