mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51180 Android's TextLayoutManager may return widths greather than the max measure constraint. Yoga will clamp these, but this sort of issue points to a logic bug, and creates issues when we are looking at caching text measurements based on constraint reuse. Let's debug assert that we don't do that, and fix a case of rounding up at a pixel boundary, to ensure that it doesn't go above max width. This should theoretically be safe, since Yoga is already doing this clamping, which is what dictates final size of the TextView. Changelog: [Internal] Reviewed By: rshest Differential Revision: D74291373 fbshipit-source-id: 44166f2e47323384cb00f3cf4c32f398e298a63e