Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Issue 2287113004: [css-grid] Implement fit-content track size (Closed)

Created:
4 years, 3 months ago by svillar
Modified:
4 years, 3 months ago
CC:
chromium-reviews, jfernandez, szager+layoutwatch_chromium.org, blink-reviews-style_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
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[css-grid] Implement fit-content track size This CL implements the new <fit-content> track size which is defined as follows: "Represents the formula min(max-content, max(auto, argument)), which is calculated similar to auto (i.e. minmax(auto, max-content)), except that the track size is clamped at argument if it is greater than the auto minimum." From the parsing POV fit-content was implemented as a new type of function which only takes one argument. That forced us to refactor some code because minmax() was the only allowed function for <track-size>s so far. The implementation key is a new attribute in GridTrack called growthLimitCap which is precisely the attribute of fit-content(). Some parts of the track sizing algorithm were adapted to this change like for example the sorting of tracks by growth potential (we need to consider the caps). BUG=618972 Committed: https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63 Cr-Commit-Position: refs/heads/master@{#415676}

Patch Set 1 #

Total comments: 36

Patch Set 2 : Patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1599 lines, -78 lines) Patch
A third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-columns.html View 1 1 chunk +347 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-columns-expected.html View 1 1 chunk +346 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-rows.html View 1 chunk +347 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-rows-expected.html View 1 chunk +343 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-get-set.html View 1 5 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-auto-columns-rows-get-set-expected.txt View 1 3 chunks +6 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set.html View 1 2 chunks +7 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt View 1 3 chunks +20 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js View 1 3 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 chunk +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSPropertyParser.cpp View 1 3 chunks +24 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/css/resolver/StyleBuilderConverter.cpp View 1 1 chunk +9 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.h View 2 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutGrid.cpp View 1 22 chunks +102 lines, -51 lines 0 comments Download
M third_party/WebKit/Source/core/style/GridTrackSize.h View 1 2 chunks +19 lines, -16 lines 0 comments Download

Messages

Total messages: 18 (7 generated)
svillar
4 years, 3 months ago (2016-08-29 10:31:14 UTC) #3
eae
https://codereview.chromium.org/2287113004/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/2287113004/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode655 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:655: LayoutUnit maxSize = std::max(LayoutUnit(), sizingData.availableSpace()); LayoutUnit maxSize = sizingData.availableSpace().clampNegativeToZero(); ...
4 years, 3 months ago (2016-08-29 18:19:40 UTC) #4
svillar
https://codereview.chromium.org/2287113004/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp File third_party/WebKit/Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/2287113004/diff/1/third_party/WebKit/Source/core/layout/LayoutGrid.cpp#newcode655 third_party/WebKit/Source/core/layout/LayoutGrid.cpp:655: LayoutUnit maxSize = std::max(LayoutUnit(), sizingData.availableSpace()); On 2016/08/29 18:19:40, eae ...
4 years, 3 months ago (2016-08-29 20:01:55 UTC) #5
cbiesinger
lgtm https://codereview.chromium.org/2287113004/diff/1/third_party/WebKit/Source/core/style/GridTrackSize.h File third_party/WebKit/Source/core/style/GridTrackSize.h (right): https://codereview.chromium.org/2287113004/diff/1/third_party/WebKit/Source/core/style/GridTrackSize.h#newcode79 third_party/WebKit/Source/core/style/GridTrackSize.h:79: GridLength maxTrackBreadth() const { return !isFitContent() ? m_maxTrackBreadth ...
4 years, 3 months ago (2016-08-29 20:07:08 UTC) #6
eae
Oh right, I misread it. Thanks for the clarificaiton! LGTM
4 years, 3 months ago (2016-08-29 22:31:27 UTC) #7
Manuel Rego
Please add a reference to bug #618972 in the description. The patch looks good to ...
4 years, 3 months ago (2016-08-31 07:24:29 UTC) #8
svillar
Thanks for the awesome review as usual. https://codereview.chromium.org/2287113004/diff/1/third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-columns-expected.html File third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-columns-expected.html (right): https://codereview.chromium.org/2287113004/diff/1/third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-columns-expected.html#newcode69 third_party/WebKit/LayoutTests/fast/css-grid-layout/fit-content-columns-expected.html:69: <div class="grid ...
4 years, 3 months ago (2016-08-31 09:50:05 UTC) #9
cbiesinger
https://codereview.chromium.org/2287113004/diff/1/third_party/WebKit/Source/core/style/GridTrackSize.h File third_party/WebKit/Source/core/style/GridTrackSize.h (right): https://codereview.chromium.org/2287113004/diff/1/third_party/WebKit/Source/core/style/GridTrackSize.h#newcode117 third_party/WebKit/Source/core/style/GridTrackSize.h:117: GridLength m_maxTrackBreadth; On 2016/08/31 09:50:04, svillar wrote: > On ...
4 years, 3 months ago (2016-08-31 15:18:44 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2287113004/20001
4 years, 3 months ago (2016-08-31 15:43:32 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 3 months ago (2016-08-31 17:40:39 UTC) #16
commit-bot: I haz the power
4 years, 3 months ago (2016-08-31 17:43:15 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/1993c05386140afe56921048784bf3ca449f4b63
Cr-Commit-Position: refs/heads/master@{#415676}

Powered by Google App Engine
This is Rietveld 408576698