The SmallestTrackStart method returns a signed int which is never positive, representing the smallest untranslated start among all grid items, clamped by 0 as a maximum. In practice, though, what we usually want is the index of the first explicit track/line among all tracks/lines, or equivalently, the number of leading implicit tracks/lines. That number is precisely minus the return value of SmallestTrackStart. Thus, in grid layout there were various std::abs() to invert the value. But it's a bit confusing to have an API which returns a non-positive integer, which then needs to be made non-negative. Therefore, we should rename SmallestTrackStart to ExplicitGridStart, and make it return an unsigned int. Chromium did this in https://crrev.com/777768
Created attachment 404333 [details] Patch
Comment on attachment 404333 [details] Patch r=me, wait for green EWSs before landing.
Committed r264403: <https://trac.webkit.org/changeset/264403> All reviewed patches have been landed. Closing bug and clearing flags on attachment 404333 [details].
<rdar://problem/65613208>