[css-grid] grid abs.pos. child is sized wrongly when using auto-fit and it generates some collapsed tracks |
||||
Issue descriptionChrome Version: 63.0.3239.18 (Official Build) dev (64-bit) OS: Linux What steps will reproduce the problem? (1) load the attached testcase (2) (3) What is the expected result? In the top two grids, all <span>s should be 30px wide (the width of one column). In the last grid, all <span>s should be 65px wide (the width of two columns with a 5px grid gap in-between). What happens instead? All abs.pos. boxes (pink color) are 5px too short. I believe the rendering in Firefox is correct per the CSS Grid spec.
,
Dec 27 2017
I have changed the issue's title because the "aligned" term was confusing.
,
Dec 27 2017
,
Dec 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c52d041f823b2012e846d0ba39fe711c9287def2 commit c52d041f823b2012e846d0ba39fe711c9287def2 Author: Javier Fernandez <jfernandez@igalia.com> Date: Thu Dec 28 01:15:23 2017 [css-grid] Compute correctly the gaps when there are collapsed tracks The GuttersSize function has a complex logic to compute the gaps in a specific GridSpan, considering different scenarios of collapsed tracks for such span. The first case is avoiding the duplicated gap because of trailing collapsed tracks. The second case considered is looking for non-empty tracks before the GridSpan end, if it points to an empty track, so we must add this gap. The last case is to consider the gap of non-empty tracks after the GridSpan end line, if it points to an empty track. There are several cases that are not considered or incorrectly computed. This CL addresses those cases; basically, we should only consider gaps when there are non-empty tracks before and after the collapsed tracks. Additionally, we should avoid duplicating the gaps size adding both, before and after non-empty track's gap. Bug: 785626 Change-Id: I660cda2d1da98648a9d5f3a5a776b633a46f20c0 Reviewed-on: https://chromium-review.googlesource.com/842870 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Manuel Rego Casasnovas <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#526262} [add] https://crrev.com/c52d041f823b2012e846d0ba39fe711c9287def2/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-001.html [add] https://crrev.com/c52d041f823b2012e846d0ba39fe711c9287def2/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-002.html [add] https://crrev.com/c52d041f823b2012e846d0ba39fe711c9287def2/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-003.html [add] https://crrev.com/c52d041f823b2012e846d0ba39fe711c9287def2/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-004.html [add] https://crrev.com/c52d041f823b2012e846d0ba39fe711c9287def2/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-005.html [add] https://crrev.com/c52d041f823b2012e846d0ba39fe711c9287def2/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-006.html [add] https://crrev.com/c52d041f823b2012e846d0ba39fe711c9287def2/third_party/WebKit/LayoutTests/external/wpt/css/css-grid/abspos/grid-positioned-items-and-autofit-tracks-007.html [modify] https://crrev.com/c52d041f823b2012e846d0ba39fe711c9287def2/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
,
Dec 28 2017
This issue should be FIXED now. |
||||
►
Sign in to add a comment |
||||
Comment 1 by r...@igalia.com
, Nov 21 2017Labels: Hotlist-Interop
Status: Available (was: Untriaged)