Description[CSS Grid Layout] Tracks growing beyond limits when they should not
In particular it incorrectly grows some tracks beyond limits when handling
min-content and max-content base sizes. In those cases we should only grow
"any affected track that happens to also have an intrinsic max track sizing
function" or all of them if there are none.
The problem is that we're using a vector of indexes pointing to the vector
with the list of affected tracks. Those indexes become easily incorrect
because the first thing we do in distributeSpaceToTracks() is to sort the
vector with the affected tracks by growth potential.
Instead we now pass a vector with pointers to the list of tracks allowed to
grow over the limits. The size changes are now directly stored in the
GridTracks (it's called plannedIncrease) instead of in a separate vector, so
we don't need to worry about tracks being rearranged (and we also get rid of
the ugly vector of indexes pointing to another vector).
Apart from that I took the chance to "modernize" some of our loops with the
use of range-based loops and "auto".
BUG=449130
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188891
Patch Set 1 #
Total comments: 8
Patch Set 2 : Bring old-style loops back. Ensure that planned increases are applied. #
Total comments: 5
Patch Set 3 : Patch for landing #
Messages
Total messages: 12 (2 generated)
|