Bug 190089 - [css-grid] gap is not honored with collapsed tracks (due to auto-fit) and align-items center or end
Summary: [css-grid] gap is not honored with collapsed tracks (due to auto-fit) and ali...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Oriol Brufau
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-09-28 14:11 PDT by Oriol Brufau
Modified: 2018-09-29 05:12 PDT (History)
7 users (show)

See Also:


Attachments
Patch (5.82 KB, patch)
2018-09-28 14:31 PDT, Oriol Brufau
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews116 for mac-sierra (1.22 MB, application/zip)
2018-09-28 15:47 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews102 for mac-sierra (2.22 MB, application/zip)
2018-09-28 15:48 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews106 for mac-sierra-wk2 (2.03 MB, application/zip)
2018-09-28 16:00 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews205 for win-future (13.20 MB, application/zip)
2018-09-28 17:12 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews123 for ios-simulator-wk2 (1.31 MB, application/zip)
2018-09-28 19:48 PDT, EWS Watchlist
no flags Details
Patch (6.04 KB, patch)
2018-09-29 03:41 PDT, Oriol Brufau
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oriol Brufau 2018-09-28 14:11:39 PDT
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
Comment 1 Oriol Brufau 2018-09-28 14:31:05 PDT Comment hidden (obsolete)
Comment 2 EWS Watchlist 2018-09-28 15:47:28 PDT Comment hidden (obsolete)
Comment 3 EWS Watchlist 2018-09-28 15:47:29 PDT Comment hidden (obsolete)
Comment 4 EWS Watchlist 2018-09-28 15:47:59 PDT Comment hidden (obsolete)
Comment 5 EWS Watchlist 2018-09-28 15:48:01 PDT Comment hidden (obsolete)
Comment 6 EWS Watchlist 2018-09-28 15:59:59 PDT Comment hidden (obsolete)
Comment 7 EWS Watchlist 2018-09-28 16:00:01 PDT Comment hidden (obsolete)
Comment 8 EWS Watchlist 2018-09-28 17:12:01 PDT Comment hidden (obsolete)
Comment 9 EWS Watchlist 2018-09-28 17:12:13 PDT Comment hidden (obsolete)
Comment 10 EWS Watchlist 2018-09-28 19:48:30 PDT Comment hidden (obsolete)
Comment 11 EWS Watchlist 2018-09-28 19:48:31 PDT Comment hidden (obsolete)
Comment 12 Oriol Brufau 2018-09-29 03:41:47 PDT
Created attachment 351177 [details]
Patch
Comment 13 Oriol Brufau 2018-09-29 03:46:32 PDT
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 14 Manuel Rego Casasnovas 2018-09-29 04:45:52 PDT
Comment on attachment 351177 [details]
Patch

Thanks for porting this. LGTM.
Comment 15 WebKit Commit Bot 2018-09-29 05:11:24 PDT
Comment on attachment 351177 [details]
Patch

Clearing flags on attachment: 351177

Committed r236643: <https://trac.webkit.org/changeset/236643>
Comment 16 WebKit Commit Bot 2018-09-29 05:11:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 17 Radar WebKit Bug Importer 2018-09-29 05:12:33 PDT
<rdar://problem/44886192>