You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b160320
Browse filesBrowse the repository at this point in the historyBrowse files
Only compute automatic minimum sizes for flex items that grow or shrink (#59906)
Summary:
X-link: react/yoga#2073
X-link: meta/litho#1095
With CSS Flexbox §4.5 automatic minimum sizing enabled, `resolveFlexibleLength` computed every in-flow item's automatic minimum main size up front, for every flex line on every layout pass. The value is only read when an item is bounded while growing or shrinking (`boundAxisWithAutoMin`). So a line with no free space to distribute, or an item that does not flex, paid for a min-content probe whose result was thrown away. For text, each probe scans and measures every word.
The floor is now computed the first time an item is bounded on a line and cached on the item until the next line resets it. Layout results are unchanged; items that never grow or shrink no longer run the probe. The resolved flag lives in `LayoutResults`'s existing bitfield, so node size does not grow.
Changelog:
[General][Changed] - Skip the automatic minimum size probe for flex items that neither grow nor shrink
Reviewed By: fbcbl
Differential Revision: D130643092
Pull Request resolved: #59906
0 commit comments