[css-grid] Display issues with grid item using 'auto' margins |
||
Issue descriptionChrome Version: (63.0.3239.9) OS: All What steps will reproduce the problem? (1) Load the attached test case (2) (3) What is the expected result? The 3 columns fit in the available width and the element in the second row is horizontally centered in the first column. What happens instead? The columns width is totally wrong and the item in the second row incorrectly centered.
,
Nov 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/534ecb7b67e43f206cf8ad645ff8d69286261db0 commit 534ecb7b67e43f206cf8ad645ff8d69286261db0 Author: Javier Fernandez <jfernandez@igalia.com> Date: Tue Nov 28 14:06:41 2017 [css-grid] Treat 'auto' as 0px when compute non-laid out item's margins We must treat any 'auto' margin as 0px during the tracks sizing algorithm, as the CSS Grid spec states: - https://drafts.csswg.org/css-grid/#auto-margins Additionally, we have an utility function to compute the grid item's margins when the item still needs to layout. We used the function CommputedStyle::hasMarings to decide whether such margin computation worths. However, we need that function to operate on a specific axis, hence I added a new function adding such logic. Bug: 788471 Change-Id: I5d4e4fc435aa1ffea0003a9a88cfd7a3c1bca114 Reviewed-on: https://chromium-review.googlesource.com/789830 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Manuel Rego Casasnovas <rego@igalia.com> Cr-Commit-Position: refs/heads/master@{#519673} [add] https://crrev.com/534ecb7b67e43f206cf8ad645ff8d69286261db0/third_party/WebKit/LayoutTests/fast/css-grid-layout/auto-margins-ignored-during-track-sizing-expected.html [add] https://crrev.com/534ecb7b67e43f206cf8ad645ff8d69286261db0/third_party/WebKit/LayoutTests/fast/css-grid-layout/auto-margins-ignored-during-track-sizing.html [modify] https://crrev.com/534ecb7b67e43f206cf8ad645ff8d69286261db0/third_party/WebKit/Source/core/layout/GridLayoutUtils.cpp
,
Nov 28 2017
This issue should be FIXED now. |
||
►
Sign in to add a comment |
||
Comment 1 by r...@igalia.com
, Nov 27 2017Summary: [css-grid] Display issues with grid item using 'auto' margins (was: [css-grid] [css-grid] Display issues with grid item using 'auto' margins)