[css-grid] Fix referencing line both inside and after auto repeat()
When referencing a line name appearing both inside and after an auto repeat(), the code used to just take the minim of: - The absolute index of the line inside the auto repeat(), i.e. the local index relative to the auto repeat() plus the insertion point of the auto repeat(). - The index of the line outside the auto repeat(), without expanding repeated tracks. This was correct if the line outside the auto repeat() preceded it. Otherwise it was wrong due to not taking repeated tracks into account. For example, with grid-template-columns: 1px repeat(auto-fill, 2px 3px [a]) [a]; the absolute index of the line inside the auto repeat() is 2 + 1 = 3. And the absolute index of the line outside the auto repeat() is 1 + 2*n. However, the used index wasn't including repeated tracks so it was 2. Therefore, the minimum was 2 but should have been 3. BUG=966090 TEST=external/wpt/css/css-grid/placement/grid-placement-using-named-grid-lines-003.html Change-Id: I1777a64d7e7d39350a327185dcd13f82493adfdb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2071019 Commit-Queue: Oriol Brufau <obrufau@igalia.com> Reviewed-by:Javier Fernandez <jfernandez@igalia.com> Cr-Commit-Position: refs/heads/master@{#745925}
Showing
Please register or sign in to comment