Skip to content

Commit 8d4b7ff

Browse files
make track size const and improve comments
1 parent 0dc0552 commit 8d4b7ff

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

yoga/algorithm/grid/GridTrack.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,17 @@
1111

1212
namespace facebook::yoga {
1313

14-
// Represents a resolved grid track size during layout computation.
15-
// Includes variables used by the track sizing algorithm.
1614
// https://www.w3.org/TR/css-grid-1/#algo-track-sizing
1715
struct GridTrack {
18-
GridTrackSize trackSize;
16+
// Sizing functions for this track, immutable after construction
17+
const GridTrackSize trackSize;
18+
19+
// Mutable state used by the track sizing algorithm
20+
// https://www.w3.org/TR/css-grid-1/#base-size
1921
float baseSize = 0.0f;
22+
// https://www.w3.org/TR/css-grid-1/#growth-limit
2023
float growthLimit = 0.0f;
24+
// https://www.w3.org/TR/css-grid-1/#infinitely-growable
2125
bool infinitelyGrowable = false;
2226

2327
explicit GridTrack(const GridTrackSize& ts) : trackSize(ts) {}

0 commit comments

Comments
 (0)