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
Messages
Total messages: 19 (4 generated)
|