Description[CSS Grid Layout] Incorrect sizing of tracks with non-spanning items
Content sized tracks with non-spanning grid items were not properly sized
because the growth limit (maxBreadth) was sometimes infinity (-1) after
calling resolveContentBasedTrackSizingFunctions() when it should not. This
CL adds an special initialization phase for non-spanning grid items as the
new track sizing algorithm describes.
Granted, that was handled in the old algorithm in distributeSpaceToTracks()
as a special case. The problem is that it regressed after the optimization
added in r179621 because that method is no longer called when the space to
distribute is 0.
That's why we could fix this by allowing calls to distributeSpaceToTracks()
with spaceToDistribute>=0 but by fixing it with an explicit initialization
we get two nice side effects:
1) our implementation is now closer to the new algorithm and
the initialization is now explicit in the code instead of a
side effect of calling distributeSpaceToTracks() with no
space to be distributed.
2) the performance of auto-grid-lots-of-data.html improves
dramatically (296 vs 508 runs/s) mainly because the handling
of non-spanning grid items is greatly simplified (we save
sortings, hash lookups, function calls...).
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=188457
Patch Set 1 #
Total comments: 6
Patch Set 2 : Rebased + Test fixes #
Total comments: 4
Patch Set 3 : Patch for landing #Patch Set 4 : Patch for landing v2 #Patch Set 5 : Patch for landing v3 #
Messages
Total messages: 19 (6 generated)
|