Commit c7e218d
Fix issue with flexShrink (#1855)
Summary:
X-link: facebook/react-native#53758
In cases where the remaining space for flex shrink is negative, we can get into a state where the `totalFlexShrinkScaledFactors` get's infintesimally small, but likely should just be floored to zero.
This manifests in issues where flexShrink nodes are suddenly given way too much space, and generally only manifests in an issue if these flexShrink nodes have self-measuring children (such as text).
Checking if the value is approximately zero appears to fix bugs for flexShrink.
Reviewed By: andrewdacenko
Differential Revision: D823136741 parent 6617be1 commit c7e218d
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
661 | 661 | | |
662 | 662 | | |
663 | 663 | | |
664 | | - | |
| 664 | + | |
| 665 | + | |
665 | 666 | | |
666 | 667 | | |
667 | 668 | | |
| |||
1533 | 1534 | | |
1534 | 1535 | | |
1535 | 1536 | | |
1536 | | - | |
| 1537 | + | |
| 1538 | + | |
1537 | 1539 | | |
1538 | | - | |
| 1540 | + | |
1539 | 1541 | | |
1540 | 1542 | | |
1541 | 1543 | | |
| |||
0 commit comments