Description[css-grid] Use Optional to represent indefinite lengths
Blink has been using LayoutUnit(-1) to represent indefinite sizes or more in
general, sizes that cannot be resolved. That's unfortunate because it forces
us to use that magic number and also because negative LayoutUnits are valid
outcomes of some operations.
In our particular case, that was forcing us to check the SizingOperation
argument in the GridTrackSizingAlgorithm to know whether the passed
available and free sizes where actually indefinite or not. Actually that was
not totally correct as this was based on the assumption that we were doing
intrinsic size computations (preferred widths) whenever the sizes where
indefinite which is not correct for all the cases (it's true for widths but
a height:auto grid container would have indefinite height and require
indefinite size computations).
This does not require any additional tests as we are not changing any
behaviour. It's a step forward in the process of decoupling the concepts of
definite/indefinite sizes and intrinsicSize/layout operations.
Review-Url: https://codereview.chromium.org/2808453002
Cr-Commit-Position: refs/heads/master@{#462881}
Committed: https://chromium.googlesource.com/chromium/src/+/55b4817a2d8e7d13f51fd30b461c946671361d76
Patch Set 1 #
Total comments: 16
Patch Set 2 : Changes after review #
Messages
Total messages: 13 (5 generated)
|