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

Issue 1010213002: [CSS Grid Layout] Support marking tracks as infinitely growable (Closed)

Created:
5 years, 9 months ago by svillar
Modified:
5 years, 5 months ago
CC:
blink-reviews, blink-reviews-rendering, Dominik Röttsches, eae+blinkwatch, jchaffraix+rendering, jfernandez, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, Manuel Rego, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

[CSS Grid Layout] Support marking tracks as infinitely growable As explained here http://lists.w3.org/Archives/Public/www-style/2014Mar/0512.html we sometimes need to consider that some tracks are infinitely growable even when they are really not, in order to produce more "natural" results. For example the following case: grid-template-columns: auto auto; item 1 in column 1 with min-content = max-content = 10px; item 2 in columns 1-2 with min-content = 30, max-content = 100px; will outcome (45px, 55px) without this patch. But considering the second column as infinitely growable the result is (10px, 90px), a more "natural" result because column 1 just needs to be 10px to accommodate item 1. From now on we can flag GridTracks so that they can infinitely grow even when the growth limit is finite. In order to completely support the feature some changes were required: * m_plannedIncrease became m_plannedSize because we need to store both the old and new values of the track size in order to decide if a track should be considered infinitely growable. Consequently m_increaseDuringDistribution became m_sizeDuringDistribution. * distributeSpaceToTracks() is now unconditionally called even though the extra space is 0. That's because it computes the plannedSize value. * a new templatized function called markAsInfinitelyGrowableForTrackSizeComputationPhase() marks/unmarks tracks as infinitely growable only during the max functions resolution. Apart from that all the GridTrack's public attributes were made private so that accessors are now provided for getting/setting their values. Also AccumulatorSetterFunction was removed as it is no longer needed. BUG=455724 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=197976

Patch Set 1 #

Total comments: 6

Patch Set 2 : Addressed review comments #

Patch Set 3 : Rebased against master. Using new templatized methods. #

Total comments: 20
Unified diffs Side-by-side diffs Delta from patch set Stats (+138 lines, -57 lines) Patch
A LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html View 1 2 1 chunk +36 lines, -0 lines 6 comments Download
A LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable-expected.txt View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M Source/core/layout/LayoutGrid.h View 1 2 1 chunk +0 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutGrid.cpp View 1 2 14 chunks +91 lines, -55 lines 14 comments Download

Messages

Total messages: 19 (4 generated)
svillar
5 years, 9 months ago (2015-03-17 14:45:42 UTC) #2
Julien - ping for review
I would prefer for the specification to be updated before we land this. It's hard ...
5 years, 9 months ago (2015-03-25 18:40:43 UTC) #3
svillar
On 2015/03/25 18:40:43, Julien Chaffraix - PST wrote: > I would prefer for the specification ...
5 years, 9 months ago (2015-03-26 09:10:30 UTC) #4
svillar
Julien this is an excerpt from the specs. As you can see what I have ...
5 years, 8 months ago (2015-03-31 18:32:29 UTC) #5
svillar
@cbiesinger, @jchaffraix ping
5 years, 8 months ago (2015-04-07 15:06:20 UTC) #6
Julien - ping for review
https://codereview.chromium.org/1010213002/diff/1/Source/core/layout/LayoutGrid.cpp File Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1010213002/diff/1/Source/core/layout/LayoutGrid.cpp#newcode97 Source/core/layout/LayoutGrid.cpp:97: m_plannedSize = plannedSize; It seems weird to allow the ...
5 years, 8 months ago (2015-04-08 18:58:56 UTC) #7
svillar
Thanks for the review. https://codereview.chromium.org/1010213002/diff/1/Source/core/layout/LayoutGrid.cpp File Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1010213002/diff/1/Source/core/layout/LayoutGrid.cpp#newcode97 Source/core/layout/LayoutGrid.cpp:97: m_plannedSize = plannedSize; On 2015/04/08 ...
5 years, 8 months ago (2015-04-10 09:43:09 UTC) #8
svillar
Sorry for rebasing the code before posting a new patch but the patch was getting ...
5 years, 7 months ago (2015-05-11 10:47:27 UTC) #10
svillar
@jchaffraix: this is a new version of the patch rebased against master. Hope you could ...
5 years, 6 months ago (2015-06-12 16:03:48 UTC) #11
svillar
Adding some comments to help the review process https://codereview.chromium.org/1010213002/diff/40001/Source/core/layout/LayoutGrid.cpp File Source/core/layout/LayoutGrid.cpp (right): https://codereview.chromium.org/1010213002/diff/40001/Source/core/layout/LayoutGrid.cpp#newcode814 Source/core/layout/LayoutGrid.cpp:814: return ...
5 years, 6 months ago (2015-06-12 16:07:08 UTC) #12
Manuel Rego
Non-owner LGTM. I've added some minor comments and suggestions inline. https://codereview.chromium.org/1010213002/diff/40001/LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html File LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html (right): https://codereview.chromium.org/1010213002/diff/40001/LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html#newcode23 ...
5 years, 6 months ago (2015-06-26 11:09:48 UTC) #14
svillar
Many thanks for the review!!! https://codereview.chromium.org/1010213002/diff/40001/LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html File LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html (right): https://codereview.chromium.org/1010213002/diff/40001/LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html#newcode23 LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html:23: <div class="firstRowBothColumn">XXXXXX XXX</div> On ...
5 years, 5 months ago (2015-06-29 07:08:27 UTC) #15
Manuel Rego
https://codereview.chromium.org/1010213002/diff/40001/LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html File LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html (right): https://codereview.chromium.org/1010213002/diff/40001/LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html#newcode23 LayoutTests/fast/css-grid-layout/mark-as-infinitely-growable.html:23: <div class="firstRowBothColumn">XXXXXX XXX</div> I mean weird from an outsider ...
5 years, 5 months ago (2015-06-29 07:46:43 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1010213002/40001
5 years, 5 months ago (2015-06-29 09:43:42 UTC) #18
commit-bot: I haz the power
5 years, 5 months ago (2015-06-29 10:54:39 UTC) #19
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=197976

Powered by Google App Engine
This is Rietveld 408576698