This is change in the spec [1] from January 2015 [2] that we've not implemented yet: "When appearing outside a minmax() notation, implies an automatic minimum (i.e. ''minmax(auto, <flex>)'')." We're considering that "1fr" is equivalent to "minmax(1fr, 1fr)". You can see the difference in the attached example [3], both grids should have the very same output. [1] https://drafts.csswg.org/css-grid/#valdef-grid-template-columns-flex [2] https://github.com/w3c/csswg-drafts/commit/129f2c1ad684e47ef85900f8e156efe07a3f13d6 [3] http://jsbin.com/vedihe/1/edit?html,css,output
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2 commit 5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2 Author: rego <rego@igalia.com> Date: Mon May 16 16:48:26 2016 [css-grid] Fix behavior of flexible track breadths This patch is fixing 2 issues that are interrelated: * Flex sizes are invalid on the min slot of minmax(). The syntax has been recently updated on the spec: <track-size> = <track-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) To fix this, the patch modifies consumeGridBreadth() in CSSPropertyParser, adding a new type of restriction "InflexibleSizeOnly". * Flex sizes outside minmax() behave as auto minimum. Flex sizes outside minmax() were previously behaving like minimum and maximum (e.g. 1fr => minmax(1fr, 1fr)). However the spec changed and now this would be invalid, so they should behave like auto minimum (e.g. minmax(auto, 1fr)). To achieve this the patch adds a new condition in LayoutGrid::gridTrackSize(); The patch includes new test cases checking specifically these 2 issues. In addition several tests results have been updated to reflect the new behavior. Also, some cases that are now invalid and were not testing anything new have been removed. BUG= 611407 , 611410 TEST=fast/css-grid-layout/flex-content-resolution-columns.html TEST=fast/css-grid-layout/flex-content-resolution-rows.html TEST=fast/css-grid-layout/grid-columns-rows-get-set.html Review-Url: https://codereview.chromium.org/1979603002 Cr-Commit-Position: refs/heads/master@{#393846} [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns.html [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns-expected.txt [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns.html [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows-expected.txt [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows.html [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content.html [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp [modify] https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2/third_party/WebKit/Source/core/layout/LayoutGrid.cpp
Comment 1 by r...@igalia.com
, May 12 2016