Delete fixTextClippingAndroid15useBoundsForWidth() (#56282)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/56282

Fixes https://github.com/facebook/react-native/issues/56185
Fixes https://github.com/facebook/react-native/issues/56186
Fixes https://github.com/facebook/react-native/issues/56187

Delete the `fixTextClippingAndroid15useBoundsForWidth()` feature flag and all code gated behind it. This flag was never shipped, and the new code path has been implicated in several bugs.

The change removes:
- The feature flag definition and all generated plumbing (C++, JNI, Kotlin, JS)
- The visual-bounds-based width measurement path in `TextLayoutManager.kt`
- The `setUseBoundsForWidth(true)` call in `buildLayout()`
- The MobileConfig parameter (`react_fabric.fix_text_clipping_android_15_use_bounds_for_width`)
- The Facebook Android and OSS Experimental overrides

The old advance-based width logic is retained as the sole code path.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D98427218

fbshipit-source-id: 7c322353d9c0a0548386a486ecd4280b73a66872
This commit is contained in:
Nick Gerleman authored and meta-codesync[bot] committed 2026-03-31 14:19:59 -07:00
1 parent aaa0684045
commit 5964a197a3
23 files changed
+57 -240

No files matched your search

@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<61964fd9ddf11ed5c2848da3f4d0b490>>
* @generated SignedSource<<c47da5069c3dfd7a287125bd0dfbc0c0>>
*/
/**
@@ -384,12 +384,6 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = accessor.fixMappingOfEventPrioritiesBetweenFabricAndReact()
/**
* Fix text clipping starting in Android 15 due to usage of useBoundsForWidth
*/
@JvmStatic
public fun fixTextClippingAndroid15useBoundsForWidth(): Boolean = accessor.fixTextClippingAndroid15useBoundsForWidth()
/**
* Fix flex basis computation to not apply FitContent constraint in the main axis for non-measure container nodes, preventing unnecessary re-measurement in scroll containers.
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<4ce2605ff71e60b6096a211ff902e994>>
* @generated SignedSource<<0d98c7f7d2762c248a9670a447b5a93e>>
*/
/**
@@ -79,7 +79,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var enableVirtualViewDebugFeaturesCache: Boolean? = null
private var fixFindShadowNodeByTagRaceConditionCache: Boolean? = null
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
private var fixTextClippingAndroid15useBoundsForWidthCache: Boolean? = null
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
private var fuseboxAssertSingleHostStateCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
@@ -643,15 +642,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}
override fun fixTextClippingAndroid15useBoundsForWidth(): Boolean {
var cached = fixTextClippingAndroid15useBoundsForWidthCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.fixTextClippingAndroid15useBoundsForWidth()
fixTextClippingAndroid15useBoundsForWidthCache = cached
}
return cached
}
override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean {
var cached = fixYogaFlexBasisFitContentInMainAxisCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<5f3573c9983cb54c5df527a3053ebbae>>
* @generated SignedSource<<01dbfbb85643951c562e2cf1725387ff>>
*/
/**
@@ -146,8 +146,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
@DoNotStrip @JvmStatic public external fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean
@DoNotStrip @JvmStatic public external fun fixTextClippingAndroid15useBoundsForWidth(): Boolean
@DoNotStrip @JvmStatic public external fun fixYogaFlexBasisFitContentInMainAxis(): Boolean
@DoNotStrip @JvmStatic public external fun fuseboxAssertSingleHostState(): Boolean
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<a822c8a92925244e2a302bd04f034fa0>>
* @generated SignedSource<<79077f7e8b2a7d435ac44c0a31ab87cc>>
*/
/**
@@ -141,8 +141,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = false
override fun fixTextClippingAndroid15useBoundsForWidth(): Boolean = false
override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean = false
override fun fuseboxAssertSingleHostState(): Boolean = true
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<e211fdbb92579b05507ea84ae42f22ff>>
* @generated SignedSource<<b6c95e5954a185b0ee8c0ae8dde4a74b>>
*/
/**
@@ -83,7 +83,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var enableVirtualViewDebugFeaturesCache: Boolean? = null
private var fixFindShadowNodeByTagRaceConditionCache: Boolean? = null
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
private var fixTextClippingAndroid15useBoundsForWidthCache: Boolean? = null
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
private var fuseboxAssertSingleHostStateCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
@@ -706,16 +705,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}
override fun fixTextClippingAndroid15useBoundsForWidth(): Boolean {
var cached = fixTextClippingAndroid15useBoundsForWidthCache
if (cached == null) {
cached = currentProvider.fixTextClippingAndroid15useBoundsForWidth()
accessedFeatureFlags.add("fixTextClippingAndroid15useBoundsForWidth")
fixTextClippingAndroid15useBoundsForWidthCache = cached
}
return cached
}
override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean {
var cached = fixYogaFlexBasisFitContentInMainAxisCache
if (cached == null) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<8531ce29d0e5362517d35559ebda623b>>
* @generated SignedSource<<dffc5db0f80501f6246f9d6087c6fb4a>>
*/
/**
@@ -27,7 +27,5 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android :
override fun enableSwiftUIBasedFilters(): Boolean = true
override fun fixTextClippingAndroid15useBoundsForWidth(): Boolean = true
override fun preventShadowTreeCommitExhaustion(): Boolean = true
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<540700c0c0f3259a093a98ad639478ba>>
* @generated SignedSource<<30a507b84b656705ee1abec794472d6b>>
*/
/**
@@ -141,8 +141,6 @@ public interface ReactNativeFeatureFlagsProvider {
@DoNotStrip public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean
@DoNotStrip public fun fixTextClippingAndroid15useBoundsForWidth(): Boolean
@DoNotStrip public fun fixYogaFlexBasisFitContentInMainAxis(): Boolean
@DoNotStrip public fun fuseboxAssertSingleHostState(): Boolean
@@ -36,7 +36,6 @@ import com.facebook.react.uimanager.PixelUtil
import com.facebook.react.uimanager.PixelUtil.dpToPx
import com.facebook.react.uimanager.PixelUtil.pxToDp
import com.facebook.react.uimanager.ReactAccessibilityDelegate
import com.facebook.react.util.AndroidVersion.VERSION_CODE_VANILLA_ICE_CREAM
import com.facebook.react.views.text.internal.span.CustomLetterSpacingSpan
import com.facebook.react.views.text.internal.span.CustomLineHeightSpan
import com.facebook.react.views.text.internal.span.CustomStyleSpan
@@ -634,63 +633,14 @@ internal object TextLayoutManager {
)
}
// Pre-Android 15: Use existing advance-based logic
if (
Build.VERSION.SDK_INT < VERSION_CODE_VANILLA_ICE_CREAM ||
!ReactNativeFeatureFlags.fixTextClippingAndroid15useBoundsForWidth()
) {
val desiredWidth = ceil(Layout.getDesiredWidth(text, paint)).toInt()
val layoutWidth =
when (widthYogaMeasureMode) {
YogaMeasureMode.EXACTLY -> floor(width).toInt()
YogaMeasureMode.AT_MOST -> min(desiredWidth, floor(width).toInt())
else -> desiredWidth
}
return buildLayout(
text,
layoutWidth,
includeFontPadding,
textBreakStrategy,
hyphenationFrequency,
alignment,
justificationMode,
ellipsizeMode,
maxNumberOfLines,
paint,
)
}
// Android 15+: Need to account for visual bounds
// Step 1: Create unconstrained layout to get visual bounds width
val unconstrainedLayout =
buildLayout(
text,
Int.MAX_VALUE / 2,
includeFontPadding,
textBreakStrategy,
hyphenationFrequency,
alignment,
justificationMode,
null,
ReactConstants.UNSET,
paint,
)
// Calculate visual bounds width from unconstrained layout
var desiredVisualWidth = 0f
for (i in 0 until unconstrainedLayout.lineCount) {
val lineWidth = unconstrainedLayout.getLineRight(i) - unconstrainedLayout.getLineLeft(i)
desiredVisualWidth = max(desiredVisualWidth, lineWidth)
}
val desiredWidth = ceil(Layout.getDesiredWidth(text, paint)).toInt()
val layoutWidth =
when (widthYogaMeasureMode) {
YogaMeasureMode.AT_MOST -> min(ceil(desiredVisualWidth).toInt(), floor(width).toInt())
else -> ceil(desiredVisualWidth).toInt()
YogaMeasureMode.EXACTLY -> floor(width).toInt()
YogaMeasureMode.AT_MOST -> min(desiredWidth, floor(width).toInt())
else -> desiredWidth
}
// Step 2: Create final layout with correct width
return buildLayout(
text,
layoutWidth,
@@ -737,16 +687,6 @@ internal object TextLayoutManager {
builder.setUseLineSpacingFromFallbacks(true)
}
// setUseBoundsForWidth added in API 35 — use reflection to support internal targets that
// compile against an SDK older than 35.
// https://developer.android.com/reference/android/text/StaticLayout.Builder#setUseBoundsForWidth(boolean)
if (
Build.VERSION.SDK_INT >= VERSION_CODE_VANILLA_ICE_CREAM &&
ReactNativeFeatureFlags.fixTextClippingAndroid15useBoundsForWidth()
) {
setUseBoundsForWidthMethod?.invoke(builder, true)
}
return builder.build()
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<6c088ccf18868fc6e54d83c7483b6607>>
* @generated SignedSource<<880f137911af6d2a9d383ebd68ddc300>>
*/
/**
@@ -393,12 +393,6 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}
bool fixTextClippingAndroid15useBoundsForWidth() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fixTextClippingAndroid15useBoundsForWidth");
return method(javaProvider_);
}
bool fixYogaFlexBasisFitContentInMainAxis() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fixYogaFlexBasisFitContentInMainAxis");
@@ -884,11 +878,6 @@ bool JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabri
return ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact();
}
bool JReactNativeFeatureFlagsCxxInterop::fixTextClippingAndroid15useBoundsForWidth(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth();
}
bool JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis();
@@ -1252,9 +1241,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"fixMappingOfEventPrioritiesBetweenFabricAndReact",
JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabricAndReact),
makeNativeMethod(
"fixTextClippingAndroid15useBoundsForWidth",
JReactNativeFeatureFlagsCxxInterop::fixTextClippingAndroid15useBoundsForWidth),
makeNativeMethod(
"fixYogaFlexBasisFitContentInMainAxis",
JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis),
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<73cfe749b34b786e25b683c499889e48>>
* @generated SignedSource<<906bda93de19c1836ce3df29e05db610>>
*/
/**
@@ -207,9 +207,6 @@ class JReactNativeFeatureFlagsCxxInterop
static bool fixMappingOfEventPrioritiesBetweenFabricAndReact(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool fixTextClippingAndroid15useBoundsForWidth(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
static bool fixYogaFlexBasisFitContentInMainAxis(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<a33f1aaed390cc914a55bd48906f1a11>>
* @generated SignedSource<<f86521eb5833e76014b3197a6ab23b60>>
*/
/**
@@ -262,10 +262,6 @@ bool ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact()
return getAccessor().fixMappingOfEventPrioritiesBetweenFabricAndReact();
}
bool ReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth() {
return getAccessor().fixTextClippingAndroid15useBoundsForWidth();
}
bool ReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis() {
return getAccessor().fixYogaFlexBasisFitContentInMainAxis();
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<6c175f21aaa8d084c7b0be0625d5d77d>>
* @generated SignedSource<<a218accbb46d69a2d1bf54e0213b3421>>
*/
/**
@@ -334,11 +334,6 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool fixMappingOfEventPrioritiesBetweenFabricAndReact();
/**
* Fix text clipping starting in Android 15 due to usage of useBoundsForWidth
*/
RN_EXPORT static bool fixTextClippingAndroid15useBoundsForWidth();
/**
* Fix flex basis computation to not apply FitContent constraint in the main axis for non-measure container nodes, preventing unnecessary re-measurement in scroll containers.
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<b13a093e1b52bbc5cf6d6d0871797e94>>
* @generated SignedSource<<2e68b8e5a0cbf6c4aa65067d071d35a2>>
*/
/**
@@ -1091,24 +1091,6 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::fixTextClippingAndroid15useBoundsForWidth() {
auto flagValue = fixTextClippingAndroid15useBoundsForWidth_.load();
if (!flagValue.has_value()) {
// This block is not exclusive but it is not necessary.
// If multiple threads try to initialize the feature flag, we would only
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(59, "fixTextClippingAndroid15useBoundsForWidth");
flagValue = currentProvider_->fixTextClippingAndroid15useBoundsForWidth();
fixTextClippingAndroid15useBoundsForWidth_ = flagValue;
}
return flagValue.value();
}
bool ReactNativeFeatureFlagsAccessor::fixYogaFlexBasisFitContentInMainAxis() {
auto flagValue = fixYogaFlexBasisFitContentInMainAxis_.load();
@@ -1118,7 +1100,7 @@ bool ReactNativeFeatureFlagsAccessor::fixYogaFlexBasisFitContentInMainAxis() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(60, "fixYogaFlexBasisFitContentInMainAxis");
markFlagAsAccessed(59, "fixYogaFlexBasisFitContentInMainAxis");
flagValue = currentProvider_->fixYogaFlexBasisFitContentInMainAxis();
fixYogaFlexBasisFitContentInMainAxis_ = flagValue;
@@ -1136,7 +1118,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxAssertSingleHostState() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(61, "fuseboxAssertSingleHostState");
markFlagAsAccessed(60, "fuseboxAssertSingleHostState");
flagValue = currentProvider_->fuseboxAssertSingleHostState();
fuseboxAssertSingleHostState_ = flagValue;
@@ -1154,7 +1136,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledRelease() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(62, "fuseboxEnabledRelease");
markFlagAsAccessed(61, "fuseboxEnabledRelease");
flagValue = currentProvider_->fuseboxEnabledRelease();
fuseboxEnabledRelease_ = flagValue;
@@ -1172,7 +1154,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxFrameRecordingEnabled() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(63, "fuseboxFrameRecordingEnabled");
markFlagAsAccessed(62, "fuseboxFrameRecordingEnabled");
flagValue = currentProvider_->fuseboxFrameRecordingEnabled();
fuseboxFrameRecordingEnabled_ = flagValue;
@@ -1190,7 +1172,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxNetworkInspectionEnabled() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(64, "fuseboxNetworkInspectionEnabled");
markFlagAsAccessed(63, "fuseboxNetworkInspectionEnabled");
flagValue = currentProvider_->fuseboxNetworkInspectionEnabled();
fuseboxNetworkInspectionEnabled_ = flagValue;
@@ -1208,7 +1190,7 @@ bool ReactNativeFeatureFlagsAccessor::hideOffscreenVirtualViewsOnIOS() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(65, "hideOffscreenVirtualViewsOnIOS");
markFlagAsAccessed(64, "hideOffscreenVirtualViewsOnIOS");
flagValue = currentProvider_->hideOffscreenVirtualViewsOnIOS();
hideOffscreenVirtualViewsOnIOS_ = flagValue;
@@ -1226,7 +1208,7 @@ bool ReactNativeFeatureFlagsAccessor::overrideBySynchronousMountPropsAtMountingA
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(66, "overrideBySynchronousMountPropsAtMountingAndroid");
markFlagAsAccessed(65, "overrideBySynchronousMountPropsAtMountingAndroid");
flagValue = currentProvider_->overrideBySynchronousMountPropsAtMountingAndroid();
overrideBySynchronousMountPropsAtMountingAndroid_ = flagValue;
@@ -1244,7 +1226,7 @@ bool ReactNativeFeatureFlagsAccessor::perfIssuesEnabled() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(67, "perfIssuesEnabled");
markFlagAsAccessed(66, "perfIssuesEnabled");
flagValue = currentProvider_->perfIssuesEnabled();
perfIssuesEnabled_ = flagValue;
@@ -1262,7 +1244,7 @@ bool ReactNativeFeatureFlagsAccessor::perfMonitorV2Enabled() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(68, "perfMonitorV2Enabled");
markFlagAsAccessed(67, "perfMonitorV2Enabled");
flagValue = currentProvider_->perfMonitorV2Enabled();
perfMonitorV2Enabled_ = flagValue;
@@ -1280,7 +1262,7 @@ double ReactNativeFeatureFlagsAccessor::preparedTextCacheSize() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(69, "preparedTextCacheSize");
markFlagAsAccessed(68, "preparedTextCacheSize");
flagValue = currentProvider_->preparedTextCacheSize();
preparedTextCacheSize_ = flagValue;
@@ -1298,7 +1280,7 @@ bool ReactNativeFeatureFlagsAccessor::preventShadowTreeCommitExhaustion() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(70, "preventShadowTreeCommitExhaustion");
markFlagAsAccessed(69, "preventShadowTreeCommitExhaustion");
flagValue = currentProvider_->preventShadowTreeCommitExhaustion();
preventShadowTreeCommitExhaustion_ = flagValue;
@@ -1316,7 +1298,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldPressibilityUseW3CPointerEventsForHo
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(71, "shouldPressibilityUseW3CPointerEventsForHover");
markFlagAsAccessed(70, "shouldPressibilityUseW3CPointerEventsForHover");
flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover();
shouldPressibilityUseW3CPointerEventsForHover_ = flagValue;
@@ -1334,7 +1316,7 @@ bool ReactNativeFeatureFlagsAccessor::shouldTriggerResponderTransferOnScrollAndr
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(72, "shouldTriggerResponderTransferOnScrollAndroid");
markFlagAsAccessed(71, "shouldTriggerResponderTransferOnScrollAndroid");
flagValue = currentProvider_->shouldTriggerResponderTransferOnScrollAndroid();
shouldTriggerResponderTransferOnScrollAndroid_ = flagValue;
@@ -1352,7 +1334,7 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause()
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(73, "skipActivityIdentityAssertionOnHostPause");
markFlagAsAccessed(72, "skipActivityIdentityAssertionOnHostPause");
flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause();
skipActivityIdentityAssertionOnHostPause_ = flagValue;
@@ -1370,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::syncAndroidClipToPaddingWithOverflow() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(74, "syncAndroidClipToPaddingWithOverflow");
markFlagAsAccessed(73, "syncAndroidClipToPaddingWithOverflow");
flagValue = currentProvider_->syncAndroidClipToPaddingWithOverflow();
syncAndroidClipToPaddingWithOverflow_ = flagValue;
@@ -1388,7 +1370,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(75, "traceTurboModulePromiseRejectionsOnAndroid");
markFlagAsAccessed(74, "traceTurboModulePromiseRejectionsOnAndroid");
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
@@ -1406,7 +1388,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(76, "updateRuntimeShadowNodeReferencesOnCommit");
markFlagAsAccessed(75, "updateRuntimeShadowNodeReferencesOnCommit");
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
@@ -1424,7 +1406,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommitT
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(77, "updateRuntimeShadowNodeReferencesOnCommitThread");
markFlagAsAccessed(76, "updateRuntimeShadowNodeReferencesOnCommitThread");
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommitThread();
updateRuntimeShadowNodeReferencesOnCommitThread_ = flagValue;
@@ -1442,7 +1424,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(78, "useAlwaysAvailableJSErrorHandling");
markFlagAsAccessed(77, "useAlwaysAvailableJSErrorHandling");
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
useAlwaysAvailableJSErrorHandling_ = flagValue;
@@ -1460,7 +1442,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(79, "useFabricInterop");
markFlagAsAccessed(78, "useFabricInterop");
flagValue = currentProvider_->useFabricInterop();
useFabricInterop_ = flagValue;
@@ -1478,7 +1460,7 @@ bool ReactNativeFeatureFlagsAccessor::useLISAlgorithmInDifferentiator() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(80, "useLISAlgorithmInDifferentiator");
markFlagAsAccessed(79, "useLISAlgorithmInDifferentiator");
flagValue = currentProvider_->useLISAlgorithmInDifferentiator();
useLISAlgorithmInDifferentiator_ = flagValue;
@@ -1496,7 +1478,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(81, "useNativeViewConfigsInBridgelessMode");
markFlagAsAccessed(80, "useNativeViewConfigsInBridgelessMode");
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
useNativeViewConfigsInBridgelessMode_ = flagValue;
@@ -1514,7 +1496,7 @@ bool ReactNativeFeatureFlagsAccessor::useNestedScrollViewAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(82, "useNestedScrollViewAndroid");
markFlagAsAccessed(81, "useNestedScrollViewAndroid");
flagValue = currentProvider_->useNestedScrollViewAndroid();
useNestedScrollViewAndroid_ = flagValue;
@@ -1532,7 +1514,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(83, "useSharedAnimatedBackend");
markFlagAsAccessed(82, "useSharedAnimatedBackend");
flagValue = currentProvider_->useSharedAnimatedBackend();
useSharedAnimatedBackend_ = flagValue;
@@ -1550,7 +1532,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(84, "useTraitHiddenOnAndroid");
markFlagAsAccessed(83, "useTraitHiddenOnAndroid");
flagValue = currentProvider_->useTraitHiddenOnAndroid();
useTraitHiddenOnAndroid_ = flagValue;
@@ -1568,7 +1550,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(85, "useTurboModuleInterop");
markFlagAsAccessed(84, "useTurboModuleInterop");
flagValue = currentProvider_->useTurboModuleInterop();
useTurboModuleInterop_ = flagValue;
@@ -1586,7 +1568,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(86, "useTurboModules");
markFlagAsAccessed(85, "useTurboModules");
flagValue = currentProvider_->useTurboModules();
useTurboModules_ = flagValue;
@@ -1604,7 +1586,7 @@ bool ReactNativeFeatureFlagsAccessor::useUnorderedMapInDifferentiator() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(87, "useUnorderedMapInDifferentiator");
markFlagAsAccessed(86, "useUnorderedMapInDifferentiator");
flagValue = currentProvider_->useUnorderedMapInDifferentiator();
useUnorderedMapInDifferentiator_ = flagValue;
@@ -1622,7 +1604,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(88, "viewCullingOutsetRatio");
markFlagAsAccessed(87, "viewCullingOutsetRatio");
flagValue = currentProvider_->viewCullingOutsetRatio();
viewCullingOutsetRatio_ = flagValue;
@@ -1640,7 +1622,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionEnabled() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(89, "viewTransitionEnabled");
markFlagAsAccessed(88, "viewTransitionEnabled");
flagValue = currentProvider_->viewTransitionEnabled();
viewTransitionEnabled_ = flagValue;
@@ -1658,7 +1640,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
// be accessing the provider multiple times but the end state of this
// instance and the returned flag value would be the same.
markFlagAsAccessed(90, "virtualViewPrerenderRatio");
markFlagAsAccessed(89, "virtualViewPrerenderRatio");
flagValue = currentProvider_->virtualViewPrerenderRatio();
virtualViewPrerenderRatio_ = flagValue;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<29e7a9ef1807aaecaf5440e024a5a2f2>>
* @generated SignedSource<<96104345e25766f663c6bcb6f1af036d>>
*/
/**
@@ -91,7 +91,6 @@ class ReactNativeFeatureFlagsAccessor {
bool enableVirtualViewDebugFeatures();
bool fixFindShadowNodeByTagRaceCondition();
bool fixMappingOfEventPrioritiesBetweenFabricAndReact();
bool fixTextClippingAndroid15useBoundsForWidth();
bool fixYogaFlexBasisFitContentInMainAxis();
bool fuseboxAssertSingleHostState();
bool fuseboxEnabledRelease();
@@ -134,7 +133,7 @@ class ReactNativeFeatureFlagsAccessor {
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
bool wasOverridden_;
std::array<std::atomic<const char*>, 91> accessedFeatureFlags_;
std::array<std::atomic<const char*>, 90> accessedFeatureFlags_;
std::atomic<std::optional<bool>> commonTestFlag_;
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
@@ -195,7 +194,6 @@ class ReactNativeFeatureFlagsAccessor {
std::atomic<std::optional<bool>> enableVirtualViewDebugFeatures_;
std::atomic<std::optional<bool>> fixFindShadowNodeByTagRaceCondition_;
std::atomic<std::optional<bool>> fixMappingOfEventPrioritiesBetweenFabricAndReact_;
std::atomic<std::optional<bool>> fixTextClippingAndroid15useBoundsForWidth_;
std::atomic<std::optional<bool>> fixYogaFlexBasisFitContentInMainAxis_;
std::atomic<std::optional<bool>> fuseboxAssertSingleHostState_;
std::atomic<std::optional<bool>> fuseboxEnabledRelease_;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<aabacee6a60e5939fdc52f692c3ae49c>>
* @generated SignedSource<<0a11729f1b111fde6049b982045cfa6f>>
*/
/**
@@ -263,10 +263,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
return false;
}
bool fixTextClippingAndroid15useBoundsForWidth() override {
return false;
}
bool fixYogaFlexBasisFitContentInMainAxis() override {
return false;
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<20a808bb8708d8088f3d7aae8d58b6b2>>
* @generated SignedSource<<a83664d06b336a11217fbf44fbb1658f>>
*/
/**
@@ -576,15 +576,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
return ReactNativeFeatureFlagsDefaults::fixMappingOfEventPrioritiesBetweenFabricAndReact();
}
bool fixTextClippingAndroid15useBoundsForWidth() override {
auto value = values_["fixTextClippingAndroid15useBoundsForWidth"];
if (!value.isNull()) {
return value.getBool();
}
return ReactNativeFeatureFlagsDefaults::fixTextClippingAndroid15useBoundsForWidth();
}
bool fixYogaFlexBasisFitContentInMainAxis() override {
auto value = values_["fixYogaFlexBasisFitContentInMainAxis"];
if (!value.isNull()) {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<6a047fa1d33ea17ebd7ba8d0680ee1cc>>
* @generated SignedSource<<c5b1dc86ec11d40e5d26ae8a6f0ee6ff>>
*/
/**
@@ -35,10 +35,6 @@ class ReactNativeFeatureFlagsOverridesOSSExperimental : public ReactNativeFeatur
return true;
}
bool fixTextClippingAndroid15useBoundsForWidth() override {
return true;
}
bool preventShadowTreeCommitExhaustion() override {
return true;
}
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<8c52d3da48fbc27e8e23493f81a93d55>>
* @generated SignedSource<<2d3b253c6d393f52b640c80893c575f5>>
*/
/**
@@ -84,7 +84,6 @@ class ReactNativeFeatureFlagsProvider {
virtual bool enableVirtualViewDebugFeatures() = 0;
virtual bool fixFindShadowNodeByTagRaceCondition() = 0;
virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact() = 0;
virtual bool fixTextClippingAndroid15useBoundsForWidth() = 0;
virtual bool fixYogaFlexBasisFitContentInMainAxis() = 0;
virtual bool fuseboxAssertSingleHostState() = 0;
virtual bool fuseboxEnabledRelease() = 0;
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<51f57b07e238ca9c13f4c7ec363eb9a0>>
* @generated SignedSource<<d4ee6a3bdce184436663da3ea2bd408f>>
*/
/**
@@ -339,11 +339,6 @@ bool NativeReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndR
return ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact();
}
bool NativeReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth();
}
bool NativeReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis(
jsi::Runtime& /*runtime*/) {
return ReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis();
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<8368d761c6a95fcdbf804681a2bf65d3>>
* @generated SignedSource<<0461c053059cd8e566296db2a3c9a82e>>
*/
/**
@@ -154,8 +154,6 @@ class NativeReactNativeFeatureFlags
bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime& runtime);
bool fixTextClippingAndroid15useBoundsForWidth(jsi::Runtime& runtime);
bool fixYogaFlexBasisFitContentInMainAxis(jsi::Runtime& runtime);
bool fuseboxAssertSingleHostState(jsi::Runtime& runtime);
@@ -678,17 +678,6 @@ const definitions: FeatureFlagDefinitions = {
},
ossReleaseStage: 'none',
},
fixTextClippingAndroid15useBoundsForWidth: {
defaultValue: false,
metadata: {
dateAdded: '2025-12-03',
description:
'Fix text clipping starting in Android 15 due to usage of useBoundsForWidth',
expectedReleaseValue: true,
purpose: 'experimentation',
},
ossReleaseStage: 'experimental',
},
fixYogaFlexBasisFitContentInMainAxis: {
defaultValue: false,
metadata: {
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<3f5bd11c861fc2e02627ba0f9941f4b7>>
* @generated SignedSource<<17bd69842b715020e73d2ff55f1b07ba>>
* @flow strict
* @noformat
*/
@@ -105,7 +105,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
enableVirtualViewDebugFeatures: Getter<boolean>,
fixFindShadowNodeByTagRaceCondition: Getter<boolean>,
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
fixTextClippingAndroid15useBoundsForWidth: Getter<boolean>,
fixYogaFlexBasisFitContentInMainAxis: Getter<boolean>,
fuseboxAssertSingleHostState: Getter<boolean>,
fuseboxEnabledRelease: Getter<boolean>,
@@ -434,10 +433,6 @@ export const fixFindShadowNodeByTagRaceCondition: Getter<boolean> = createNative
* Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
*/
export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> = createNativeFlagGetter('fixMappingOfEventPrioritiesBetweenFabricAndReact', false);
/**
* Fix text clipping starting in Android 15 due to usage of useBoundsForWidth
*/
export const fixTextClippingAndroid15useBoundsForWidth: Getter<boolean> = createNativeFlagGetter('fixTextClippingAndroid15useBoundsForWidth', false);
/**
* Fix flex basis computation to not apply FitContent constraint in the main axis for non-measure container nodes, preventing unnecessary re-measurement in scroll containers.
*/
@@ -4,7 +4,7 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @generated SignedSource<<971e04eed130adab56e3306a6a26ff1c>>
* @generated SignedSource<<9ce25b0fb29f19a0c26bbfab58bd5112>>
* @flow strict
* @noformat
*/
@@ -84,7 +84,6 @@ export interface Spec extends TurboModule {
+enableVirtualViewDebugFeatures?: () => boolean;
+fixFindShadowNodeByTagRaceCondition?: () => boolean;
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
+fixTextClippingAndroid15useBoundsForWidth?: () => boolean;
+fixYogaFlexBasisFitContentInMainAxis?: () => boolean;
+fuseboxAssertSingleHostState?: () => boolean;
+fuseboxEnabledRelease?: () => boolean;