Implements some parts of "Resolve Intrinsic Track Sizes" algorithm from spec to make it more spec compliant.