Description[css-grid] Simplify grid track sizes parsing
Previously once we saw an auto-repeat function,
we passed the "FixedSizeOnly" restriction to the rest of methods.
That way we were sure that all the tracks after the auto-repeat
had fixed sizes.
But we needed to call allTracksAreFixedSized() to be sure that
the tracks before the auto-repeat had fixed sizes too.
Now we're introducing a new boolean allTracksAreFixedSized,
to check in advance if the declaration contains any track not fixed.
If that's the case and we found an auto-repeat method,
we consider it invalid.
With this approach we avoid the loop to verify
that all the tracks (before and after the auto-repeat) are fixed.
It also allows us to simplify the code and avoid passing
the restriction to all the methods parsing the track size.
No new tests, no change of behavior.
Committed: https://crrev.com/004c4fbec738cd7f8445fc5b8a349aea89630298
Cr-Commit-Position: refs/heads/master@{#395187}
Patch Set 1 #
Total comments: 4
Patch Set 2 : #Patch Set 3 : New version addressing review comments #Messages
Total messages: 12 (3 generated)
|