Issue 733577: [css-grid] grid-template-areas makes grid placement to ignore the default index for line names |
|||||
Issue descriptionChrome Version: 60.0.3112.20 OS: Linux What steps will reproduce the problem? (1) Load the attached test case What is the expected result? The red item should placed at the 1st column of second row. What happens instead? The red item is placed at the 4th column of second row. Jun 15 2017,The issue is not reproducible if we don't use the grid-template-areas property. It's also surprising that even using the grid-template-areas property, the issue is not reproducible when declaring only 4 items and 3 columns. Jun 15 2017,
Jun 19 2017,
Jun 28 2017,
I'm working on this and already found out a preliminary approach to solve the issue. Jun 30 2017, Project MemberThe following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ccf30955351cc421d3ee6e334595e01f65fecc05 commit ccf30955351cc421d3ee6e334595e01f65fecc05 Author: Javier Fernandez <jfernandez@igalia.com> Date: Fri Jun 30 11:54:21 2017 [css-grid] Use a reference to sort the actual named grid lines vector When using the grid-template-{columns,rows} properties we create internally 2 hashmaps; 'NamedGridLines' associates a named line with the different grid lines such name is used, and 'OrderedNamedGridLines' that associates a grid line with the different names it has. When using the grid-template-areas we use the 'OrderedNamedGridLines' to extract the information about which names are associated to each grid line. The spec states that when using the same name for different lines, an item located a such name will be placed in the first line associated to that name. Because of this, we need to internally create an index vector from the 'OrderedNamedGridLines' and we need to sort it ascendantly. We were wrongly using a copy of the index vector, so we weren't actually sorting the actual indexes. This patch solves the issue by using a reference type for the indexes variable, hence, sorting the actual data of the hashmap. Bug: 733577 Change-Id: I4af516420c04565ba4f5b9fc0d267e7c63a2b7aa Reviewed-on: https://chromium-review.googlesource.com/553777 Commit-Queue: Javier Fernandez <jfernandez@igalia.com> Reviewed-by: Christian Biesinger <cbiesinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#483679} [add] https://crrev.com/ccf30955351cc421d3ee6e334595e01f65fecc05/third_party/WebKit/LayoutTests/external/wpt/css/css-grid-1/placement/grid-placement-using-named-grid-lines-001.html [add] https://crrev.com/ccf30955351cc421d3ee6e334595e01f65fecc05/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-template-areas-must-keep-named-columns-order-expected.html [add] https://crrev.com/ccf30955351cc421d3ee6e334595e01f65fecc05/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-template-areas-must-keep-named-columns-order.html [modify] https://crrev.com/ccf30955351cc421d3ee6e334595e01f65fecc05/third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp Jun 30 2017,This issue should be FIXED now. Jun 30 2017,
|
|||||
►
Sign in to add a comment |
Comment 1 by jfernan...@igalia.com, Jun 15 2017