Fix some comments

This commit is contained in:
Martin Haug 2021-11-24 20:07:44 +01:00
parent 0ad0fa5a05
commit 5677766715
2 changed files with 8 additions and 2 deletions

View File

@ -31,7 +31,7 @@ impl Linear {
Self { rel, abs }
}
/// Resolve this relative to the given `length`.
/// Resolve this linear's relative component to the given `length`.
pub fn resolve(self, length: Length) -> Length {
self.rel.resolve(length) + self.abs
}

View File

@ -190,9 +190,15 @@ impl<'a> GridLayouter<'a> {
/// Determine all column sizes.
fn measure_columns(&mut self, ctx: &mut LayoutContext) {
enum Case {
/// The column sizing is only determined by specified linear sizes.
PurelyLinear,
/// The column sizing would be affected by the region size if it was
/// smaller.
Fitting,
/// The column sizing is affected by the region size.
Exact,
/// The column sizing would be affected by the region size if it was
/// larger.
Overflowing,
}
@ -284,7 +290,7 @@ impl<'a> GridLayouter<'a> {
let mut regions =
Regions::one(size, self.regions.base, Spec::splat(false));
// For fractional rows, we can already resolve the correct
// For linear rows, we can already resolve the correct
// base, for auto it's already correct and for fr we could
// only guess anyway.
if let TrackSizing::Linear(v) = self.rows[y] {