Chromium Code Reviews
Help | Chromium Project | Gerrit Changes | Sign in
(577)

Issue 1979603002: [css-grid] Fix behavior of flexible track breadths (Closed)

Created:
3 years, 8 months ago by Manuel Rego
Modified:
3 years, 8 months ago
CC:
chromium-reviews, jfernandez, szager+layoutwatch_chromium.org, zoltan1, svillar, blink-reviews-css, pdr+renderingwatchlist_chromium.org, Manuel Rego, leviw+renderwatch, dglazkov+blink, apavlov+blink_chromium.org, jchaffraix+rendering, darktears, blink-reviews, eae+blinkwatch, blink-reviews-layout_chromium.org, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[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 Committed: https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2 Cr-Commit-Position: refs/heads/master@{#393846}

Patch Set 1 #

Total comments: 4

Patch Set 2 : New version fixing comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -110 lines) Patch
M third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns.html View 3 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns.html View 2 chunks +6 lines, -28 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns-expected.txt View 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows.html View 2 chunks +5 lines, -41 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows-expected.txt View 1 chunk +8 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt View 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content.html View 2 chunks +0 lines, -10 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt View 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html View 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt View 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js View 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js View 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 2 chunks +5 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (4 generated)
Manuel Rego
3 years, 8 months ago (2016-05-13 14:30:54 UTC) #2
cbiesinger
lgtm
3 years, 8 months ago (2016-05-13 21:26:45 UTC) #3
Timothy Loh
lgtm, although I only looked at the CSS parser change and not the test changes
3 years, 8 months ago (2016-05-16 04:57:29 UTC) #4
svillar
The patch looks good but I have a suggestion. https://codereview.chromium.org/1979603002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1979603002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode748 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:748: ...
3 years, 8 months ago (2016-05-16 14:27:43 UTC) #5
Manuel Rego
Thanks for the reviews. https://codereview.chromium.org/1979603002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1979603002/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode748 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:748: // Flex sizes are invalid ...
3 years, 8 months ago (2016-05-16 15:01:49 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1979603002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1979603002/20001
3 years, 8 months ago (2016-05-16 15:02:07 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001)
3 years, 8 months ago (2016-05-16 16:48:37 UTC) #10
commit-bot: I haz the power
3 years, 8 months ago (2016-05-16 16:50:09 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5ab36ed9abb8f19c79d7c9bd09ca02460aad50c2
Cr-Commit-Position: refs/heads/master@{#393846}

Powered by Google App Engine
This is Rietveld 408576698