Refactor duplicate code into RenderFlexibleBox::mainAxisContentExtent