diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt index 4235f29476b..d609f89a0e7 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt @@ -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<<3a6a61e2cc2bf01a35ab5c3919462ad5>> + * @generated SignedSource<> */ /** @@ -60,6 +60,12 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun deferTextInputTruncationIOS(): Boolean = accessor.deferTextInputTruncationIOS() + /** + * When a TextInput requests no keyboard suggestions (e.g. autoCorrect={false}) on Android, do not apply the default composing-text style (an underline) to text the keyboard is still composing. Styling supplied by the keyboard is kept. + */ + @JvmStatic + public fun disableDefaultComposingTextStyleWithoutSuggestionsAndroid(): Boolean = accessor.disableDefaultComposingTextStyleWithoutSuggestionsAndroid() + /** * Dispatch view commands in mount item order. */ diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt index 1369551650b..b0a7ae151ef 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt @@ -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<> + * @generated SignedSource<> */ /** @@ -25,6 +25,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var cxxNativeAnimatedEnabledCache: Boolean? = null private var defaultTextToOverflowHiddenCache: Boolean? = null private var deferTextInputTruncationIOSCache: Boolean? = null + private var disableDefaultComposingTextStyleWithoutSuggestionsAndroidCache: Boolean? = null private var disableEarlyViewCommandExecutionCache: Boolean? = null private var disableIdleEventDispatchFrameCallbackRearmAndroidCache: Boolean? = null private var disableIdleMountItemFrameCallbackRearmAndroidCache: Boolean? = null @@ -170,6 +171,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } + override fun disableDefaultComposingTextStyleWithoutSuggestionsAndroid(): Boolean { + var cached = disableDefaultComposingTextStyleWithoutSuggestionsAndroidCache + if (cached == null) { + cached = ReactNativeFeatureFlagsCxxInterop.disableDefaultComposingTextStyleWithoutSuggestionsAndroid() + disableDefaultComposingTextStyleWithoutSuggestionsAndroidCache = cached + } + return cached + } + override fun disableEarlyViewCommandExecution(): Boolean { var cached = disableEarlyViewCommandExecutionCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt index 605434477a7..b06d9c6ba93 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt @@ -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<> + * @generated SignedSource<<6f7a6d9409eb5948275135351877bf7d>> */ /** @@ -38,6 +38,8 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun deferTextInputTruncationIOS(): Boolean + @DoNotStrip @JvmStatic public external fun disableDefaultComposingTextStyleWithoutSuggestionsAndroid(): Boolean + @DoNotStrip @JvmStatic public external fun disableEarlyViewCommandExecution(): Boolean @DoNotStrip @JvmStatic public external fun disableIdleEventDispatchFrameCallbackRearmAndroid(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt index 536ffc40b81..35414c7703a 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt @@ -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<<834b0e9533cbc775a1c12b86140d718d>> + * @generated SignedSource<<53b5e5f6c3730d0f17e079d52474318a>> */ /** @@ -33,6 +33,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun deferTextInputTruncationIOS(): Boolean = false + override fun disableDefaultComposingTextStyleWithoutSuggestionsAndroid(): Boolean = false + override fun disableEarlyViewCommandExecution(): Boolean = false override fun disableIdleEventDispatchFrameCallbackRearmAndroid(): Boolean = false diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt index b03e57fa3d9..0c232c24d43 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt @@ -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<<15c65d4497fd9f36f8902efb2812b3b2>> + * @generated SignedSource<> */ /** @@ -29,6 +29,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var cxxNativeAnimatedEnabledCache: Boolean? = null private var defaultTextToOverflowHiddenCache: Boolean? = null private var deferTextInputTruncationIOSCache: Boolean? = null + private var disableDefaultComposingTextStyleWithoutSuggestionsAndroidCache: Boolean? = null private var disableEarlyViewCommandExecutionCache: Boolean? = null private var disableIdleEventDispatchFrameCallbackRearmAndroidCache: Boolean? = null private var disableIdleMountItemFrameCallbackRearmAndroidCache: Boolean? = null @@ -179,6 +180,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } + override fun disableDefaultComposingTextStyleWithoutSuggestionsAndroid(): Boolean { + var cached = disableDefaultComposingTextStyleWithoutSuggestionsAndroidCache + if (cached == null) { + cached = currentProvider.disableDefaultComposingTextStyleWithoutSuggestionsAndroid() + accessedFeatureFlags.add("disableDefaultComposingTextStyleWithoutSuggestionsAndroid") + disableDefaultComposingTextStyleWithoutSuggestionsAndroidCache = cached + } + return cached + } + override fun disableEarlyViewCommandExecution(): Boolean { var cached = disableEarlyViewCommandExecutionCache if (cached == null) { diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt index 8e45070b5b8..2f3e2c9176d 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt @@ -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<<89f683cb28a7d1ef52c86faa96f1107c>> + * @generated SignedSource<> */ /** @@ -33,6 +33,8 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun deferTextInputTruncationIOS(): Boolean + @DoNotStrip public fun disableDefaultComposingTextStyleWithoutSuggestionsAndroid(): Boolean + @DoNotStrip public fun disableEarlyViewCommandExecution(): Boolean @DoNotStrip public fun disableIdleEventDispatchFrameCallbackRearmAndroid(): Boolean diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/NoDefaultComposingStyleInputConnectionWrapper.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/NoDefaultComposingStyleInputConnectionWrapper.kt new file mode 100644 index 00000000000..fdceb66b45a --- /dev/null +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/NoDefaultComposingStyleInputConnectionWrapper.kt @@ -0,0 +1,67 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.react.views.textinput + +import android.os.Build +import android.text.Spannable +import android.text.SpannableString +import android.text.Spanned +import android.text.style.CharacterStyle +import android.view.inputmethod.InputConnection +import android.view.inputmethod.InputConnectionWrapper +import android.view.inputmethod.TextAttribute +import androidx.annotation.RequiresApi + +/** + * Keeps [android.view.inputmethod.BaseInputConnection] from applying the theme's default composing + * style (`android:candidatesTextStyleSpans`, an underline by default) to composing text. Styling + * supplied by the IME is kept. + */ +internal class NoDefaultComposingStyleInputConnectionWrapper( + target: InputConnection, + private val editText: ReactEditText, +) : InputConnectionWrapper(target, false) { + + override fun setComposingText(text: CharSequence, newCursorPosition: Int): Boolean = + super.setComposingText(asSpannable(text), newCursorPosition) + + @RequiresApi(Build.VERSION_CODES.TIRAMISU) + override fun setComposingText( + text: CharSequence, + newCursorPosition: Int, + textAttribute: TextAttribute?, + ): Boolean = super.setComposingText(asSpannable(text), newCursorPosition, textAttribute) + + override fun setComposingRegion(start: Int, end: Int): Boolean { + val consumed = super.setComposingRegion(start, end) + removeDefaultComposingStyle() + return consumed + } + + @RequiresApi(Build.VERSION_CODES.TIRAMISU) + override fun setComposingRegion(start: Int, end: Int, textAttribute: TextAttribute?): Boolean { + val consumed = super.setComposingRegion(start, end, textAttribute) + removeDefaultComposingStyle() + return consumed + } + + // The default style is only added to composing text that is not already Spannable. + private fun asSpannable(text: CharSequence): CharSequence = + text as? Spannable ?: SpannableString(text) + + // setComposingRegion clears every composing span and then applies only the default style, so any + // composing CharacterStyle left in the region is the default one. + private fun removeDefaultComposingStyle() { + val text = editText.text ?: return + for (span in text.getSpans(0, text.length, CharacterStyle::class.java)) { + if ((text.getSpanFlags(span) and Spanned.SPAN_COMPOSING) != 0) { + text.removeSpan(span) + } + } + } +} diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt index 90b29341832..18ad25253ed 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt @@ -420,6 +420,13 @@ public open class ReactEditText public constructor(context: Context) : AppCompat checkNotNull(eventDispatcher), ) } + if ( + inputConnection != null && + (inputType and InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS) != 0 && + ReactNativeFeatureFlags.disableDefaultComposingTextStyleWithoutSuggestionsAndroid() + ) { + inputConnection = NoDefaultComposingStyleInputConnectionWrapper(inputConnection, this) + } if (isMultiline && (shouldBlurOnReturn() || shouldSubmitOnReturn())) { // Remove IME_FLAG_NO_ENTER_ACTION to keep the original IME_OPTION diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp index 05171db7995..2eb8932a6e8 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp @@ -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<<407c8e5915db07bb6cc2b9ba4449750a>> + * @generated SignedSource<> */ /** @@ -69,6 +69,12 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } + bool disableDefaultComposingTextStyleWithoutSuggestionsAndroid() override { + static const auto method = + getReactNativeFeatureFlagsProviderJavaClass()->getMethod("disableDefaultComposingTextStyleWithoutSuggestionsAndroid"); + return method(javaProvider_); + } + bool disableEarlyViewCommandExecution() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("disableEarlyViewCommandExecution"); @@ -692,6 +698,11 @@ bool JReactNativeFeatureFlagsCxxInterop::deferTextInputTruncationIOS( return ReactNativeFeatureFlags::deferTextInputTruncationIOS(); } +bool JReactNativeFeatureFlagsCxxInterop::disableDefaultComposingTextStyleWithoutSuggestionsAndroid( + facebook::jni::alias_ref /*unused*/) { + return ReactNativeFeatureFlags::disableDefaultComposingTextStyleWithoutSuggestionsAndroid(); +} + bool JReactNativeFeatureFlagsCxxInterop::disableEarlyViewCommandExecution( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::disableEarlyViewCommandExecution(); @@ -1233,6 +1244,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "deferTextInputTruncationIOS", JReactNativeFeatureFlagsCxxInterop::deferTextInputTruncationIOS), + makeNativeMethod( + "disableDefaultComposingTextStyleWithoutSuggestionsAndroid", + JReactNativeFeatureFlagsCxxInterop::disableDefaultComposingTextStyleWithoutSuggestionsAndroid), makeNativeMethod( "disableEarlyViewCommandExecution", JReactNativeFeatureFlagsCxxInterop::disableEarlyViewCommandExecution), diff --git a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h index 8a3d8c458db..282a9e89551 100644 --- a/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +++ b/packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h @@ -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<<7cb5d49e9124d56b3e242e2023db8649>> + * @generated SignedSource<<3c61dcb890c85e67c13902559d9e03da>> */ /** @@ -45,6 +45,9 @@ class JReactNativeFeatureFlagsCxxInterop static bool deferTextInputTruncationIOS( facebook::jni::alias_ref); + static bool disableDefaultComposingTextStyleWithoutSuggestionsAndroid( + facebook::jni::alias_ref); + static bool disableEarlyViewCommandExecution( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/textinput/NoDefaultComposingStyleInputConnectionWrapperTest.kt b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/textinput/NoDefaultComposingStyleInputConnectionWrapperTest.kt new file mode 100644 index 00000000000..445372390bd --- /dev/null +++ b/packages/react-native/ReactAndroid/src/test/java/com/facebook/react/views/textinput/NoDefaultComposingStyleInputConnectionWrapperTest.kt @@ -0,0 +1,126 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package com.facebook.react.views.textinput + +import android.text.SpannableString +import android.text.Spanned +import android.text.style.UnderlineSpan +import android.util.DisplayMetrics +import android.view.inputmethod.BaseInputConnection +import android.view.inputmethod.EditorInfo +import android.view.inputmethod.InputConnection +import androidx.core.content.res.ResourcesCompat.ID_NULL +import com.facebook.react.bridge.JavaOnlyMap +import com.facebook.react.bridge.ReactTestHelper.createTestReactApplicationContext +import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags +import com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsDefaults +import com.facebook.react.internal.featureflags.ReactNativeFeatureFlagsForTests +import com.facebook.react.uimanager.DisplayMetricsHolder +import com.facebook.react.uimanager.ReactStylesDiffMap +import com.facebook.react.uimanager.ThemedReactContext +import com.facebook.testutils.shadows.ShadowSoLoader +import org.assertj.core.api.Assertions.assertThat +import org.junit.Before +import org.junit.Test +import org.junit.runner.RunWith +import org.robolectric.RobolectricTestRunner +import org.robolectric.annotation.Config + +@RunWith(RobolectricTestRunner::class) +@Config(shadows = [ShadowSoLoader::class]) +class NoDefaultComposingStyleInputConnectionWrapperTest { + + private lateinit var manager: ReactTextInputManager + private lateinit var view: ReactEditText + private var flagEnabled = true + + @Before + fun setup() { + ReactNativeFeatureFlagsForTests.setUp() + ReactNativeFeatureFlags.override( + object : ReactNativeFeatureFlagsDefaults() { + override fun disableDefaultComposingTextStyleWithoutSuggestionsAndroid(): Boolean = + flagEnabled + }, + ) + val context = createTestReactApplicationContext() + val themedContext = ThemedReactContext(context, context.baseContext, null, ID_NULL) + manager = ReactTextInputManager() + DisplayMetricsHolder.setScreenDisplayMetrics(DisplayMetrics()) + view = manager.createViewInstance(themedContext) + } + + @Test + fun composingText_withoutSuggestions_hasNoDefaultStyle() { + val inputConnection = createInputConnection(flagEnabled = true, autoCorrect = false) + + inputConnection.setComposingText("hello", 1) + + assertThat(underlines()).isEmpty() + assertComposingRegion(0, 5) + } + + @Test + fun composingRegion_withoutSuggestions_hasNoDefaultStyle() { + val inputConnection = createInputConnection(flagEnabled = true, autoCorrect = false) + inputConnection.commitText("hello world", 1) + + inputConnection.setComposingRegion(0, 5) + + assertThat(underlines()).isEmpty() + assertComposingRegion(0, 5) + } + + @Test + fun composingText_withoutSuggestions_keepsImeStyle() { + val inputConnection = createInputConnection(flagEnabled = true, autoCorrect = false) + val imeText = + SpannableString("hello").apply { + setSpan(UnderlineSpan(), 0, length, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE) + } + + inputConnection.setComposingText(imeText, 1) + + assertThat(underlines()).hasSize(1) + } + + @Test + fun composingText_withSuggestions_keepsDefaultStyle() { + val inputConnection = createInputConnection(flagEnabled = true, autoCorrect = true) + + inputConnection.setComposingText("hello", 1) + + assertThat(underlines()).isNotEmpty() + } + + @Test + fun composingText_withFlagDisabled_keepsDefaultStyle() { + val inputConnection = createInputConnection(flagEnabled = false, autoCorrect = false) + + inputConnection.setComposingText("hello", 1) + + assertThat(underlines()).isNotEmpty() + } + + private fun createInputConnection(flagEnabled: Boolean, autoCorrect: Boolean): InputConnection { + this.flagEnabled = flagEnabled + manager.updateProperties(view, ReactStylesDiffMap(JavaOnlyMap.of("autoCorrect", autoCorrect))) + return checkNotNull(view.onCreateInputConnection(EditorInfo())) + } + + private fun underlines(): Array { + val text = checkNotNull(view.text) + return text.getSpans(0, text.length, UnderlineSpan::class.java) + } + + private fun assertComposingRegion(start: Int, end: Int) { + val text = checkNotNull(view.text) + assertThat(BaseInputConnection.getComposingSpanStart(text)).isEqualTo(start) + assertThat(BaseInputConnection.getComposingSpanEnd(text)).isEqualTo(end) + } +} diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index 8b4970ef87f..e047457021d 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp @@ -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<> + * @generated SignedSource<> */ /** @@ -46,6 +46,10 @@ bool ReactNativeFeatureFlags::deferTextInputTruncationIOS() { return getAccessor().deferTextInputTruncationIOS(); } +bool ReactNativeFeatureFlags::disableDefaultComposingTextStyleWithoutSuggestionsAndroid() { + return getAccessor().disableDefaultComposingTextStyleWithoutSuggestionsAndroid(); +} + bool ReactNativeFeatureFlags::disableEarlyViewCommandExecution() { return getAccessor().disableEarlyViewCommandExecution(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index dd6d63f7373..e17c87526fd 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h @@ -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<<2ddd9296377ea4c1fd9c84883fbde049>> + * @generated SignedSource<<2a40172b6a5f0a7de9ca5a219a3277da>> */ /** @@ -66,6 +66,11 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool deferTextInputTruncationIOS(); + /** + * When a TextInput requests no keyboard suggestions (e.g. autoCorrect={false}) on Android, do not apply the default composing-text style (an underline) to text the keyboard is still composing. Styling supplied by the keyboard is kept. + */ + RN_EXPORT static bool disableDefaultComposingTextStyleWithoutSuggestionsAndroid(); + /** * Dispatch view commands in mount item order. */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 461adbb5f51..3b112d5f714 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp @@ -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<> + * @generated SignedSource<> */ /** @@ -119,6 +119,24 @@ bool ReactNativeFeatureFlagsAccessor::deferTextInputTruncationIOS() { return flagValue.value(); } +bool ReactNativeFeatureFlagsAccessor::disableDefaultComposingTextStyleWithoutSuggestionsAndroid() { + auto flagValue = disableDefaultComposingTextStyleWithoutSuggestionsAndroid_.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(5, "disableDefaultComposingTextStyleWithoutSuggestionsAndroid"); + + flagValue = currentProvider_->disableDefaultComposingTextStyleWithoutSuggestionsAndroid(); + disableDefaultComposingTextStyleWithoutSuggestionsAndroid_ = flagValue; + } + + return flagValue.value(); +} + bool ReactNativeFeatureFlagsAccessor::disableEarlyViewCommandExecution() { auto flagValue = disableEarlyViewCommandExecution_.load(); @@ -128,7 +146,7 @@ bool ReactNativeFeatureFlagsAccessor::disableEarlyViewCommandExecution() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(5, "disableEarlyViewCommandExecution"); + markFlagAsAccessed(6, "disableEarlyViewCommandExecution"); flagValue = currentProvider_->disableEarlyViewCommandExecution(); disableEarlyViewCommandExecution_ = flagValue; @@ -146,7 +164,7 @@ bool ReactNativeFeatureFlagsAccessor::disableIdleEventDispatchFrameCallbackRearm // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(6, "disableIdleEventDispatchFrameCallbackRearmAndroid"); + markFlagAsAccessed(7, "disableIdleEventDispatchFrameCallbackRearmAndroid"); flagValue = currentProvider_->disableIdleEventDispatchFrameCallbackRearmAndroid(); disableIdleEventDispatchFrameCallbackRearmAndroid_ = flagValue; @@ -164,7 +182,7 @@ bool ReactNativeFeatureFlagsAccessor::disableIdleMountItemFrameCallbackRearmAndr // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(7, "disableIdleMountItemFrameCallbackRearmAndroid"); + markFlagAsAccessed(8, "disableIdleMountItemFrameCallbackRearmAndroid"); flagValue = currentProvider_->disableIdleMountItemFrameCallbackRearmAndroid(); disableIdleMountItemFrameCallbackRearmAndroid_ = flagValue; @@ -182,7 +200,7 @@ bool ReactNativeFeatureFlagsAccessor::disableImageViewPreallocationAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(8, "disableImageViewPreallocationAndroid"); + markFlagAsAccessed(9, "disableImageViewPreallocationAndroid"); flagValue = currentProvider_->disableImageViewPreallocationAndroid(); disableImageViewPreallocationAndroid_ = flagValue; @@ -200,7 +218,7 @@ bool ReactNativeFeatureFlagsAccessor::disableMountItemReorderingAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(9, "disableMountItemReorderingAndroid"); + markFlagAsAccessed(10, "disableMountItemReorderingAndroid"); flagValue = currentProvider_->disableMountItemReorderingAndroid(); disableMountItemReorderingAndroid_ = flagValue; @@ -218,7 +236,7 @@ bool ReactNativeFeatureFlagsAccessor::disableTextLayoutManagerCacheAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(10, "disableTextLayoutManagerCacheAndroid"); + markFlagAsAccessed(11, "disableTextLayoutManagerCacheAndroid"); flagValue = currentProvider_->disableTextLayoutManagerCacheAndroid(); disableTextLayoutManagerCacheAndroid_ = flagValue; @@ -236,7 +254,7 @@ bool ReactNativeFeatureFlagsAccessor::disableViewPreallocationAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(11, "disableViewPreallocationAndroid"); + markFlagAsAccessed(12, "disableViewPreallocationAndroid"); flagValue = currentProvider_->disableViewPreallocationAndroid(); disableViewPreallocationAndroid_ = flagValue; @@ -254,7 +272,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAccessibilityOrder() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(12, "enableAccessibilityOrder"); + markFlagAsAccessed(13, "enableAccessibilityOrder"); flagValue = currentProvider_->enableAccessibilityOrder(); enableAccessibilityOrder_ = flagValue; @@ -272,7 +290,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAccumulatedUpdatesInRawPropsAndroid( // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(13, "enableAccumulatedUpdatesInRawPropsAndroid"); + markFlagAsAccessed(14, "enableAccumulatedUpdatesInRawPropsAndroid"); flagValue = currentProvider_->enableAccumulatedUpdatesInRawPropsAndroid(); enableAccumulatedUpdatesInRawPropsAndroid_ = flagValue; @@ -290,7 +308,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAliasedTextRoleInheritance() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(14, "enableAliasedTextRoleInheritance"); + markFlagAsAccessed(15, "enableAliasedTextRoleInheritance"); flagValue = currentProvider_->enableAliasedTextRoleInheritance(); enableAliasedTextRoleInheritance_ = flagValue; @@ -308,7 +326,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAndroidTextMeasurementOptimizations( // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(15, "enableAndroidTextMeasurementOptimizations"); + markFlagAsAccessed(16, "enableAndroidTextMeasurementOptimizations"); flagValue = currentProvider_->enableAndroidTextMeasurementOptimizations(); enableAndroidTextMeasurementOptimizations_ = flagValue; @@ -326,7 +344,7 @@ bool ReactNativeFeatureFlagsAccessor::enableAsyncDiskCacheCheckInMultiSourceImag // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(16, "enableAsyncDiskCacheCheckInMultiSourceImageAndroid"); + markFlagAsAccessed(17, "enableAsyncDiskCacheCheckInMultiSourceImageAndroid"); flagValue = currentProvider_->enableAsyncDiskCacheCheckInMultiSourceImageAndroid(); enableAsyncDiskCacheCheckInMultiSourceImageAndroid_ = flagValue; @@ -344,7 +362,7 @@ bool ReactNativeFeatureFlagsAccessor::enableBridgelessArchitecture() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(17, "enableBridgelessArchitecture"); + markFlagAsAccessed(18, "enableBridgelessArchitecture"); flagValue = currentProvider_->enableBridgelessArchitecture(); enableBridgelessArchitecture_ = flagValue; @@ -362,7 +380,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCppPropsIteratorSetter() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(18, "enableCppPropsIteratorSetter"); + markFlagAsAccessed(19, "enableCppPropsIteratorSetter"); flagValue = currentProvider_->enableCppPropsIteratorSetter(); enableCppPropsIteratorSetter_ = flagValue; @@ -380,7 +398,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCustomFocusSearchOnClippedElementsAn // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(19, "enableCustomFocusSearchOnClippedElementsAndroid"); + markFlagAsAccessed(20, "enableCustomFocusSearchOnClippedElementsAndroid"); flagValue = currentProvider_->enableCustomFocusSearchOnClippedElementsAndroid(); enableCustomFocusSearchOnClippedElementsAndroid_ = flagValue; @@ -398,7 +416,7 @@ bool ReactNativeFeatureFlagsAccessor::enableDestroyShadowTreeRevisionAsync() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(20, "enableDestroyShadowTreeRevisionAsync"); + markFlagAsAccessed(21, "enableDestroyShadowTreeRevisionAsync"); flagValue = currentProvider_->enableDestroyShadowTreeRevisionAsync(); enableDestroyShadowTreeRevisionAsync_ = flagValue; @@ -416,7 +434,7 @@ bool ReactNativeFeatureFlagsAccessor::enableDoubleMeasurementFixAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(21, "enableDoubleMeasurementFixAndroid"); + markFlagAsAccessed(22, "enableDoubleMeasurementFixAndroid"); flagValue = currentProvider_->enableDoubleMeasurementFixAndroid(); enableDoubleMeasurementFixAndroid_ = flagValue; @@ -434,7 +452,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEagerRootViewAttachment() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(22, "enableEagerRootViewAttachment"); + markFlagAsAccessed(23, "enableEagerRootViewAttachment"); flagValue = currentProvider_->enableEagerRootViewAttachment(); enableEagerRootViewAttachment_ = flagValue; @@ -452,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::enableExclusivePropsUpdateAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(23, "enableExclusivePropsUpdateAndroid"); + markFlagAsAccessed(24, "enableExclusivePropsUpdateAndroid"); flagValue = currentProvider_->enableExclusivePropsUpdateAndroid(); enableExclusivePropsUpdateAndroid_ = flagValue; @@ -470,7 +488,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricCommitBranching() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(24, "enableFabricCommitBranching"); + markFlagAsAccessed(25, "enableFabricCommitBranching"); flagValue = currentProvider_->enableFabricCommitBranching(); enableFabricCommitBranching_ = flagValue; @@ -488,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricCommitBranchingMergeOnMainThre // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(25, "enableFabricCommitBranchingMergeOnMainThread"); + markFlagAsAccessed(26, "enableFabricCommitBranchingMergeOnMainThread"); flagValue = currentProvider_->enableFabricCommitBranchingMergeOnMainThread(); enableFabricCommitBranchingMergeOnMainThread_ = flagValue; @@ -506,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricLogs() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(26, "enableFabricLogs"); + markFlagAsAccessed(27, "enableFabricLogs"); flagValue = currentProvider_->enableFabricLogs(); enableFabricLogs_ = flagValue; @@ -524,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFlexboxAutoMinSizeInStrictMode() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(27, "enableFlexboxAutoMinSizeInStrictMode"); + markFlagAsAccessed(28, "enableFlexboxAutoMinSizeInStrictMode"); flagValue = currentProvider_->enableFlexboxAutoMinSizeInStrictMode(); enableFlexboxAutoMinSizeInStrictMode_ = flagValue; @@ -542,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFlushSync() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(28, "enableFlushSync"); + markFlagAsAccessed(29, "enableFlushSync"); flagValue = currentProvider_->enableFlushSync(); enableFlushSync_ = flagValue; @@ -560,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFollowUpMountItemDispatchAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(29, "enableFollowUpMountItemDispatchAndroid"); + markFlagAsAccessed(30, "enableFollowUpMountItemDispatchAndroid"); flagValue = currentProvider_->enableFollowUpMountItemDispatchAndroid(); enableFollowUpMountItemDispatchAndroid_ = flagValue; @@ -578,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIOSCompressedTextFrameAdjustment() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(30, "enableIOSCompressedTextFrameAdjustment"); + markFlagAsAccessed(31, "enableIOSCompressedTextFrameAdjustment"); flagValue = currentProvider_->enableIOSCompressedTextFrameAdjustment(); enableIOSCompressedTextFrameAdjustment_ = flagValue; @@ -596,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIOSTextBaselineOffsetPerLine() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(31, "enableIOSTextBaselineOffsetPerLine"); + markFlagAsAccessed(32, "enableIOSTextBaselineOffsetPerLine"); flagValue = currentProvider_->enableIOSTextBaselineOffsetPerLine(); enableIOSTextBaselineOffsetPerLine_ = flagValue; @@ -614,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIOSViewClipToPaddingBox() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(32, "enableIOSViewClipToPaddingBox"); + markFlagAsAccessed(33, "enableIOSViewClipToPaddingBox"); flagValue = currentProvider_->enableIOSViewClipToPaddingBox(); enableIOSViewClipToPaddingBox_ = flagValue; @@ -632,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImagePrefetchingAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(33, "enableImagePrefetchingAndroid"); + markFlagAsAccessed(34, "enableImagePrefetchingAndroid"); flagValue = currentProvider_->enableImagePrefetchingAndroid(); enableImagePrefetchingAndroid_ = flagValue; @@ -650,7 +668,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImageTransparentTintColor() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(34, "enableImageTransparentTintColor"); + markFlagAsAccessed(35, "enableImageTransparentTintColor"); flagValue = currentProvider_->enableImageTransparentTintColor(); enableImageTransparentTintColor_ = flagValue; @@ -668,7 +686,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImmediateUpdateModeForContentOffsetC // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(35, "enableImmediateUpdateModeForContentOffsetChanges"); + markFlagAsAccessed(36, "enableImmediateUpdateModeForContentOffsetChanges"); flagValue = currentProvider_->enableImmediateUpdateModeForContentOffsetChanges(); enableImmediateUpdateModeForContentOffsetChanges_ = flagValue; @@ -686,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImmediateUpdateModeForScrollContentV // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(36, "enableImmediateUpdateModeForScrollContentView"); + markFlagAsAccessed(37, "enableImmediateUpdateModeForScrollContentView"); flagValue = currentProvider_->enableImmediateUpdateModeForScrollContentView(); enableImmediateUpdateModeForScrollContentView_ = flagValue; @@ -704,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImperativeEvents() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(37, "enableImperativeEvents"); + markFlagAsAccessed(38, "enableImperativeEvents"); flagValue = currentProvider_->enableImperativeEvents(); enableImperativeEvents_ = flagValue; @@ -722,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImperativeFocus() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(38, "enableImperativeFocus"); + markFlagAsAccessed(39, "enableImperativeFocus"); flagValue = currentProvider_->enableImperativeFocus(); enableImperativeFocus_ = flagValue; @@ -740,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::enableInteractableResponderViews() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(39, "enableInteractableResponderViews"); + markFlagAsAccessed(40, "enableInteractableResponderViews"); flagValue = currentProvider_->enableInteractableResponderViews(); enableInteractableResponderViews_ = flagValue; @@ -758,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::enableInteractiveInlineButtons() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(40, "enableInteractiveInlineButtons"); + markFlagAsAccessed(41, "enableInteractiveInlineButtons"); flagValue = currentProvider_->enableInteractiveInlineButtons(); enableInteractiveInlineButtons_ = flagValue; @@ -776,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::enableInteropViewManagerClassLookUpOptimiz // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(41, "enableInteropViewManagerClassLookUpOptimizationIOS"); + markFlagAsAccessed(42, "enableInteropViewManagerClassLookUpOptimizationIOS"); flagValue = currentProvider_->enableInteropViewManagerClassLookUpOptimizationIOS(); enableInteropViewManagerClassLookUpOptimizationIOS_ = flagValue; @@ -794,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIntersectionObserverByDefault() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(42, "enableIntersectionObserverByDefault"); + markFlagAsAccessed(43, "enableIntersectionObserverByDefault"); flagValue = currentProvider_->enableIntersectionObserverByDefault(); enableIntersectionObserverByDefault_ = flagValue; @@ -812,7 +830,7 @@ bool ReactNativeFeatureFlagsAccessor::enableKeyEvents() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(43, "enableKeyEvents"); + markFlagAsAccessed(44, "enableKeyEvents"); flagValue = currentProvider_->enableKeyEvents(); enableKeyEvents_ = flagValue; @@ -830,7 +848,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(44, "enableLayoutAnimationsOnAndroid"); + markFlagAsAccessed(45, "enableLayoutAnimationsOnAndroid"); flagValue = currentProvider_->enableLayoutAnimationsOnAndroid(); enableLayoutAnimationsOnAndroid_ = flagValue; @@ -848,7 +866,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnIOS() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(45, "enableLayoutAnimationsOnIOS"); + markFlagAsAccessed(46, "enableLayoutAnimationsOnIOS"); flagValue = currentProvider_->enableLayoutAnimationsOnIOS(); enableLayoutAnimationsOnIOS_ = flagValue; @@ -866,7 +884,7 @@ bool ReactNativeFeatureFlagsAccessor::enableModuleArgumentNSNullConversionIOS() // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(46, "enableModuleArgumentNSNullConversionIOS"); + markFlagAsAccessed(47, "enableModuleArgumentNSNullConversionIOS"); flagValue = currentProvider_->enableModuleArgumentNSNullConversionIOS(); enableModuleArgumentNSNullConversionIOS_ = flagValue; @@ -884,7 +902,7 @@ bool ReactNativeFeatureFlagsAccessor::enableMountingCoordinatorPullModelAndroid( // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(47, "enableMountingCoordinatorPullModelAndroid"); + markFlagAsAccessed(48, "enableMountingCoordinatorPullModelAndroid"); flagValue = currentProvider_->enableMountingCoordinatorPullModelAndroid(); enableMountingCoordinatorPullModelAndroid_ = flagValue; @@ -902,7 +920,7 @@ bool ReactNativeFeatureFlagsAccessor::enableMutationObserverByDefault() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(48, "enableMutationObserverByDefault"); + markFlagAsAccessed(49, "enableMutationObserverByDefault"); flagValue = currentProvider_->enableMutationObserverByDefault(); enableMutationObserverByDefault_ = flagValue; @@ -920,7 +938,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNativeCSSParsing() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(49, "enableNativeCSSParsing"); + markFlagAsAccessed(50, "enableNativeCSSParsing"); flagValue = currentProvider_->enableNativeCSSParsing(); enableNativeCSSParsing_ = flagValue; @@ -938,7 +956,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreallocatedPropsDiffOnInsertAndroid // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(50, "enablePreallocatedPropsDiffOnInsertAndroid"); + markFlagAsAccessed(51, "enablePreallocatedPropsDiffOnInsertAndroid"); flagValue = currentProvider_->enablePreallocatedPropsDiffOnInsertAndroid(); enablePreallocatedPropsDiffOnInsertAndroid_ = flagValue; @@ -956,7 +974,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreparedTextLayout() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(51, "enablePreparedTextLayout"); + markFlagAsAccessed(52, "enablePreparedTextLayout"); flagValue = currentProvider_->enablePreparedTextLayout(); enablePreparedTextLayout_ = flagValue; @@ -974,7 +992,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(52, "enablePropsUpdateReconciliationAndroid"); + markFlagAsAccessed(53, "enablePropsUpdateReconciliationAndroid"); flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid(); enablePropsUpdateReconciliationAndroid_ = flagValue; @@ -992,7 +1010,7 @@ bool ReactNativeFeatureFlagsAccessor::enableResizeObserverByDefault() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(53, "enableResizeObserverByDefault"); + markFlagAsAccessed(54, "enableResizeObserverByDefault"); flagValue = currentProvider_->enableResizeObserverByDefault(); enableResizeObserverByDefault_ = flagValue; @@ -1010,7 +1028,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSwiftUIBasedFilters() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(54, "enableSwiftUIBasedFilters"); + markFlagAsAccessed(55, "enableSwiftUIBasedFilters"); flagValue = currentProvider_->enableSwiftUIBasedFilters(); enableSwiftUIBasedFilters_ = flagValue; @@ -1028,7 +1046,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewCulling() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(55, "enableViewCulling"); + markFlagAsAccessed(56, "enableViewCulling"); flagValue = currentProvider_->enableViewCulling(); enableViewCulling_ = flagValue; @@ -1046,7 +1064,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecycling() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(56, "enableViewRecycling"); + markFlagAsAccessed(57, "enableViewRecycling"); flagValue = currentProvider_->enableViewRecycling(); enableViewRecycling_ = flagValue; @@ -1064,7 +1082,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForImage() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(57, "enableViewRecyclingForImage"); + markFlagAsAccessed(58, "enableViewRecyclingForImage"); flagValue = currentProvider_->enableViewRecyclingForImage(); enableViewRecyclingForImage_ = flagValue; @@ -1082,7 +1100,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForScrollView() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(58, "enableViewRecyclingForScrollView"); + markFlagAsAccessed(59, "enableViewRecyclingForScrollView"); flagValue = currentProvider_->enableViewRecyclingForScrollView(); enableViewRecyclingForScrollView_ = flagValue; @@ -1100,7 +1118,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForText() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(59, "enableViewRecyclingForText"); + markFlagAsAccessed(60, "enableViewRecyclingForText"); flagValue = currentProvider_->enableViewRecyclingForText(); enableViewRecyclingForText_ = flagValue; @@ -1118,7 +1136,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForView() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(60, "enableViewRecyclingForView"); + markFlagAsAccessed(61, "enableViewRecyclingForView"); flagValue = currentProvider_->enableViewRecyclingForView(); enableViewRecyclingForView_ = flagValue; @@ -1136,7 +1154,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewContainerStateExperimenta // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(61, "enableVirtualViewContainerStateExperimental"); + markFlagAsAccessed(62, "enableVirtualViewContainerStateExperimental"); flagValue = currentProvider_->enableVirtualViewContainerStateExperimental(); enableVirtualViewContainerStateExperimental_ = flagValue; @@ -1154,7 +1172,7 @@ bool ReactNativeFeatureFlagsAccessor::fixBorderlessRippleAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(62, "fixBorderlessRippleAndroid"); + markFlagAsAccessed(63, "fixBorderlessRippleAndroid"); flagValue = currentProvider_->fixBorderlessRippleAndroid(); fixBorderlessRippleAndroid_ = flagValue; @@ -1172,7 +1190,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(63, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); + markFlagAsAccessed(64, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact(); fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue; @@ -1190,7 +1208,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMultilineContentJumpAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(64, "fixMultilineContentJumpAndroid"); + markFlagAsAccessed(65, "fixMultilineContentJumpAndroid"); flagValue = currentProvider_->fixMultilineContentJumpAndroid(); fixMultilineContentJumpAndroid_ = flagValue; @@ -1208,7 +1226,7 @@ bool ReactNativeFeatureFlagsAccessor::fixProgrammaticScrollMomentumEventsIOS() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(65, "fixProgrammaticScrollMomentumEventsIOS"); + markFlagAsAccessed(66, "fixProgrammaticScrollMomentumEventsIOS"); flagValue = currentProvider_->fixProgrammaticScrollMomentumEventsIOS(); fixProgrammaticScrollMomentumEventsIOS_ = flagValue; @@ -1226,7 +1244,7 @@ bool ReactNativeFeatureFlagsAccessor::fixTextInlineViewLineHeight() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(66, "fixTextInlineViewLineHeight"); + markFlagAsAccessed(67, "fixTextInlineViewLineHeight"); flagValue = currentProvider_->fixTextInlineViewLineHeight(); fixTextInlineViewLineHeight_ = flagValue; @@ -1244,7 +1262,7 @@ bool ReactNativeFeatureFlagsAccessor::fixTextLayoutOnPixelDensityChange() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(67, "fixTextLayoutOnPixelDensityChange"); + markFlagAsAccessed(68, "fixTextLayoutOnPixelDensityChange"); flagValue = currentProvider_->fixTextLayoutOnPixelDensityChange(); fixTextLayoutOnPixelDensityChange_ = flagValue; @@ -1262,7 +1280,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(68, "fixYogaFlexBasisFitContentInMainAxis"); + markFlagAsAccessed(69, "fixYogaFlexBasisFitContentInMainAxis"); flagValue = currentProvider_->fixYogaFlexBasisFitContentInMainAxis(); fixYogaFlexBasisFitContentInMainAxis_ = flagValue; @@ -1280,7 +1298,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(69, "fuseboxAssertSingleHostState"); + markFlagAsAccessed(70, "fuseboxAssertSingleHostState"); flagValue = currentProvider_->fuseboxAssertSingleHostState(); fuseboxAssertSingleHostState_ = flagValue; @@ -1298,7 +1316,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(70, "fuseboxEnabledRelease"); + markFlagAsAccessed(71, "fuseboxEnabledRelease"); flagValue = currentProvider_->fuseboxEnabledRelease(); fuseboxEnabledRelease_ = flagValue; @@ -1316,7 +1334,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(71, "fuseboxFrameRecordingEnabled"); + markFlagAsAccessed(72, "fuseboxFrameRecordingEnabled"); flagValue = currentProvider_->fuseboxFrameRecordingEnabled(); fuseboxFrameRecordingEnabled_ = flagValue; @@ -1334,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxScreenshotCaptureEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(72, "fuseboxScreenshotCaptureEnabled"); + markFlagAsAccessed(73, "fuseboxScreenshotCaptureEnabled"); flagValue = currentProvider_->fuseboxScreenshotCaptureEnabled(); fuseboxScreenshotCaptureEnabled_ = flagValue; @@ -1352,7 +1370,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxWebSocketEventsEnabled() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(73, "fuseboxWebSocketEventsEnabled"); + markFlagAsAccessed(74, "fuseboxWebSocketEventsEnabled"); flagValue = currentProvider_->fuseboxWebSocketEventsEnabled(); fuseboxWebSocketEventsEnabled_ = flagValue; @@ -1370,7 +1388,7 @@ bool ReactNativeFeatureFlagsAccessor::keepTimersRunningWhileHostPausedAndroid() // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(74, "keepTimersRunningWhileHostPausedAndroid"); + markFlagAsAccessed(75, "keepTimersRunningWhileHostPausedAndroid"); flagValue = currentProvider_->keepTimersRunningWhileHostPausedAndroid(); keepTimersRunningWhileHostPausedAndroid_ = flagValue; @@ -1388,7 +1406,7 @@ bool ReactNativeFeatureFlagsAccessor::optimizedAnimatedPropUpdates() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(75, "optimizedAnimatedPropUpdates"); + markFlagAsAccessed(76, "optimizedAnimatedPropUpdates"); flagValue = currentProvider_->optimizedAnimatedPropUpdates(); optimizedAnimatedPropUpdates_ = flagValue; @@ -1406,7 +1424,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(76, "overrideBySynchronousMountPropsAtMountingAndroid"); + markFlagAsAccessed(77, "overrideBySynchronousMountPropsAtMountingAndroid"); flagValue = currentProvider_->overrideBySynchronousMountPropsAtMountingAndroid(); overrideBySynchronousMountPropsAtMountingAndroid_ = flagValue; @@ -1424,7 +1442,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(77, "perfIssuesEnabled"); + markFlagAsAccessed(78, "perfIssuesEnabled"); flagValue = currentProvider_->perfIssuesEnabled(); perfIssuesEnabled_ = flagValue; @@ -1442,7 +1460,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(78, "perfMonitorV2Enabled"); + markFlagAsAccessed(79, "perfMonitorV2Enabled"); flagValue = currentProvider_->perfMonitorV2Enabled(); perfMonitorV2Enabled_ = flagValue; @@ -1460,7 +1478,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(79, "preparedTextCacheSize"); + markFlagAsAccessed(80, "preparedTextCacheSize"); flagValue = currentProvider_->preparedTextCacheSize(); preparedTextCacheSize_ = flagValue; @@ -1478,7 +1496,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(80, "preventShadowTreeCommitExhaustion"); + markFlagAsAccessed(81, "preventShadowTreeCommitExhaustion"); flagValue = currentProvider_->preventShadowTreeCommitExhaustion(); preventShadowTreeCommitExhaustion_ = flagValue; @@ -1496,7 +1514,7 @@ bool ReactNativeFeatureFlagsAccessor::redBoxV2Android() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(81, "redBoxV2Android"); + markFlagAsAccessed(82, "redBoxV2Android"); flagValue = currentProvider_->redBoxV2Android(); redBoxV2Android_ = flagValue; @@ -1514,7 +1532,7 @@ bool ReactNativeFeatureFlagsAccessor::redBoxV2IOS() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(82, "redBoxV2IOS"); + markFlagAsAccessed(83, "redBoxV2IOS"); flagValue = currentProvider_->redBoxV2IOS(); redBoxV2IOS_ = flagValue; @@ -1532,7 +1550,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(83, "shouldPressibilityUseW3CPointerEventsForHover"); + markFlagAsAccessed(84, "shouldPressibilityUseW3CPointerEventsForHover"); flagValue = currentProvider_->shouldPressibilityUseW3CPointerEventsForHover(); shouldPressibilityUseW3CPointerEventsForHover_ = flagValue; @@ -1550,7 +1568,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(84, "shouldTriggerResponderTransferOnScrollAndroid"); + markFlagAsAccessed(85, "shouldTriggerResponderTransferOnScrollAndroid"); flagValue = currentProvider_->shouldTriggerResponderTransferOnScrollAndroid(); shouldTriggerResponderTransferOnScrollAndroid_ = flagValue; @@ -1568,7 +1586,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(85, "skipActivityIdentityAssertionOnHostPause"); + markFlagAsAccessed(86, "skipActivityIdentityAssertionOnHostPause"); flagValue = currentProvider_->skipActivityIdentityAssertionOnHostPause(); skipActivityIdentityAssertionOnHostPause_ = flagValue; @@ -1586,7 +1604,7 @@ bool ReactNativeFeatureFlagsAccessor::skipNativePropsForViewManagerWithDelegateA // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(86, "skipNativePropsForViewManagerWithDelegateAndroid"); + markFlagAsAccessed(87, "skipNativePropsForViewManagerWithDelegateAndroid"); flagValue = currentProvider_->skipNativePropsForViewManagerWithDelegateAndroid(); skipNativePropsForViewManagerWithDelegateAndroid_ = flagValue; @@ -1604,7 +1622,7 @@ bool ReactNativeFeatureFlagsAccessor::skipUnchangedChildrenInDifferentiator() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(87, "skipUnchangedChildrenInDifferentiator"); + markFlagAsAccessed(88, "skipUnchangedChildrenInDifferentiator"); flagValue = currentProvider_->skipUnchangedChildrenInDifferentiator(); skipUnchangedChildrenInDifferentiator_ = flagValue; @@ -1622,7 +1640,7 @@ bool ReactNativeFeatureFlagsAccessor::syncAndroidClipBoundsWithOverflow() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(88, "syncAndroidClipBoundsWithOverflow"); + markFlagAsAccessed(89, "syncAndroidClipBoundsWithOverflow"); flagValue = currentProvider_->syncAndroidClipBoundsWithOverflow(); syncAndroidClipBoundsWithOverflow_ = flagValue; @@ -1640,7 +1658,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(89, "traceTurboModulePromiseRejectionsOnAndroid"); + markFlagAsAccessed(90, "traceTurboModulePromiseRejectionsOnAndroid"); flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid(); traceTurboModulePromiseRejectionsOnAndroid_ = flagValue; @@ -1658,7 +1676,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(90, "updateRuntimeShadowNodeReferencesOnCommit"); + markFlagAsAccessed(91, "updateRuntimeShadowNodeReferencesOnCommit"); flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit(); updateRuntimeShadowNodeReferencesOnCommit_ = flagValue; @@ -1676,7 +1694,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(91, "updateRuntimeShadowNodeReferencesOnCommitThread"); + markFlagAsAccessed(92, "updateRuntimeShadowNodeReferencesOnCommitThread"); flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommitThread(); updateRuntimeShadowNodeReferencesOnCommitThread_ = flagValue; @@ -1694,7 +1712,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(92, "useAlwaysAvailableJSErrorHandling"); + markFlagAsAccessed(93, "useAlwaysAvailableJSErrorHandling"); flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling(); useAlwaysAvailableJSErrorHandling_ = flagValue; @@ -1712,7 +1730,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(93, "useFabricInterop"); + markFlagAsAccessed(94, "useFabricInterop"); flagValue = currentProvider_->useFabricInterop(); useFabricInterop_ = flagValue; @@ -1730,7 +1748,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(94, "useNativeViewConfigsInBridgelessMode"); + markFlagAsAccessed(95, "useNativeViewConfigsInBridgelessMode"); flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); useNativeViewConfigsInBridgelessMode_ = flagValue; @@ -1748,7 +1766,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(95, "useNestedScrollViewAndroid"); + markFlagAsAccessed(96, "useNestedScrollViewAndroid"); flagValue = currentProvider_->useNestedScrollViewAndroid(); useNestedScrollViewAndroid_ = flagValue; @@ -1766,7 +1784,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(96, "useSharedAnimatedBackend"); + markFlagAsAccessed(97, "useSharedAnimatedBackend"); flagValue = currentProvider_->useSharedAnimatedBackend(); useSharedAnimatedBackend_ = flagValue; @@ -1784,7 +1802,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(97, "useTraitHiddenOnAndroid"); + markFlagAsAccessed(98, "useTraitHiddenOnAndroid"); flagValue = currentProvider_->useTraitHiddenOnAndroid(); useTraitHiddenOnAndroid_ = flagValue; @@ -1802,7 +1820,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(98, "useTurboModuleInterop"); + markFlagAsAccessed(99, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -1820,7 +1838,7 @@ bool ReactNativeFeatureFlagsAccessor::useWindowDensityForDisplayMetricsAndroid() // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(99, "useWindowDensityForDisplayMetricsAndroid"); + markFlagAsAccessed(100, "useWindowDensityForDisplayMetricsAndroid"); flagValue = currentProvider_->useWindowDensityForDisplayMetricsAndroid(); useWindowDensityForDisplayMetricsAndroid_ = flagValue; @@ -1838,7 +1856,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(100, "viewCullingOutsetRatio"); + markFlagAsAccessed(101, "viewCullingOutsetRatio"); flagValue = currentProvider_->viewCullingOutsetRatio(); viewCullingOutsetRatio_ = flagValue; @@ -1856,7 +1874,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(101, "viewTransitionEnabled"); + markFlagAsAccessed(102, "viewTransitionEnabled"); flagValue = currentProvider_->viewTransitionEnabled(); viewTransitionEnabled_ = flagValue; @@ -1874,7 +1892,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionUseHardwareBitmapAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(102, "viewTransitionUseHardwareBitmapAndroid"); + markFlagAsAccessed(103, "viewTransitionUseHardwareBitmapAndroid"); flagValue = currentProvider_->viewTransitionUseHardwareBitmapAndroid(); viewTransitionUseHardwareBitmapAndroid_ = flagValue; @@ -1892,7 +1910,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(103, "virtualViewPrerenderRatio"); + markFlagAsAccessed(104, "virtualViewPrerenderRatio"); flagValue = currentProvider_->virtualViewPrerenderRatio(); virtualViewPrerenderRatio_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index d4616bebccd..aad7786d869 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h @@ -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<<9f2e67fdc5a5e9e452b59c47ceb68411>> + * @generated SignedSource<> */ /** @@ -39,6 +39,7 @@ class ReactNativeFeatureFlagsAccessor { bool cxxNativeAnimatedEnabled(); bool defaultTextToOverflowHidden(); bool deferTextInputTruncationIOS(); + bool disableDefaultComposingTextStyleWithoutSuggestionsAndroid(); bool disableEarlyViewCommandExecution(); bool disableIdleEventDispatchFrameCallbackRearmAndroid(); bool disableIdleMountItemFrameCallbackRearmAndroid(); @@ -149,13 +150,14 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 104> accessedFeatureFlags_; + std::array, 105> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> cdpInteractionMetricsEnabled_; std::atomic> cxxNativeAnimatedEnabled_; std::atomic> defaultTextToOverflowHidden_; std::atomic> deferTextInputTruncationIOS_; + std::atomic> disableDefaultComposingTextStyleWithoutSuggestionsAndroid_; std::atomic> disableEarlyViewCommandExecution_; std::atomic> disableIdleEventDispatchFrameCallbackRearmAndroid_; std::atomic> disableIdleMountItemFrameCallbackRearmAndroid_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index c67cef573d7..5bbe3df7e9f 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h @@ -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<<7a81ab39c483265b1e958b1091a60778>> + * @generated SignedSource<> */ /** @@ -49,6 +49,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } + bool disableDefaultComposingTextStyleWithoutSuggestionsAndroid() override { + return false; + } + bool disableEarlyViewCommandExecution() override { return false; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index 65d27bd4f55..b959ed63706 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h @@ -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<<224a696e6d9f5af0cc450c8742d565e2>> + * @generated SignedSource<<88cf4e5633fac626efa62f4bad19e54f>> */ /** @@ -92,6 +92,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::deferTextInputTruncationIOS(); } + bool disableDefaultComposingTextStyleWithoutSuggestionsAndroid() override { + auto value = values_["disableDefaultComposingTextStyleWithoutSuggestionsAndroid"]; + if (!value.isNull()) { + return value.getBool(); + } + + return ReactNativeFeatureFlagsDefaults::disableDefaultComposingTextStyleWithoutSuggestionsAndroid(); + } + bool disableEarlyViewCommandExecution() override { auto value = values_["disableEarlyViewCommandExecution"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 7a33d63c5c3..e363ecb3295 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h @@ -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<<8aa886405e9e5978c6572980119d7ea9>> + * @generated SignedSource<> */ /** @@ -32,6 +32,7 @@ class ReactNativeFeatureFlagsProvider { virtual bool cxxNativeAnimatedEnabled() = 0; virtual bool defaultTextToOverflowHidden() = 0; virtual bool deferTextInputTruncationIOS() = 0; + virtual bool disableDefaultComposingTextStyleWithoutSuggestionsAndroid() = 0; virtual bool disableEarlyViewCommandExecution() = 0; virtual bool disableIdleEventDispatchFrameCallbackRearmAndroid() = 0; virtual bool disableIdleMountItemFrameCallbackRearmAndroid() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index 3184a83f67a..c5a72be6e04 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp @@ -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<<1b5afe4df88834163a9e8a39ca24dd15>> + * @generated SignedSource<<4437476a69cec7db170ce8c61c29b16e>> */ /** @@ -69,6 +69,11 @@ bool NativeReactNativeFeatureFlags::deferTextInputTruncationIOS( return ReactNativeFeatureFlags::deferTextInputTruncationIOS(); } +bool NativeReactNativeFeatureFlags::disableDefaultComposingTextStyleWithoutSuggestionsAndroid( + jsi::Runtime& /*runtime*/) { + return ReactNativeFeatureFlags::disableDefaultComposingTextStyleWithoutSuggestionsAndroid(); +} + bool NativeReactNativeFeatureFlags::disableEarlyViewCommandExecution( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::disableEarlyViewCommandExecution(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index c0d6598a33b..066a61a064f 100644 --- a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +++ b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h @@ -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<<9829941034a694056c0baf2f2e7e6574>> + * @generated SignedSource<> */ /** @@ -48,6 +48,8 @@ class NativeReactNativeFeatureFlags bool deferTextInputTruncationIOS(jsi::Runtime& runtime); + bool disableDefaultComposingTextStyleWithoutSuggestionsAndroid(jsi::Runtime& runtime); + bool disableEarlyViewCommandExecution(jsi::Runtime& runtime); bool disableIdleEventDispatchFrameCallbackRearmAndroid(jsi::Runtime& runtime); diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index e030600d90b..be54baa331c 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -104,6 +104,17 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'none', }, + disableDefaultComposingTextStyleWithoutSuggestionsAndroid: { + defaultValue: false, + metadata: { + dateAdded: '2026-11-25', + description: + 'When a TextInput requests no keyboard suggestions (e.g. autoCorrect={false}) on Android, do not apply the default composing-text style (an underline) to text the keyboard is still composing. Styling supplied by the keyboard is kept.', + expectedReleaseValue: true, + purpose: 'experimentation', + }, + ossReleaseStage: 'none', + }, disableEarlyViewCommandExecution: { defaultValue: false, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 60509629c60..8733172901f 100644 --- a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js @@ -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<<581558c9591efde03b925773bbf05e66>> + * @generated SignedSource<> * @flow strict * @noformat */ @@ -54,6 +54,7 @@ export type ReactNativeFeatureFlags = Readonly<{ cxxNativeAnimatedEnabled: Getter, defaultTextToOverflowHidden: Getter, deferTextInputTruncationIOS: Getter, + disableDefaultComposingTextStyleWithoutSuggestionsAndroid: Getter, disableEarlyViewCommandExecution: Getter, disableIdleEventDispatchFrameCallbackRearmAndroid: Getter, disableIdleMountItemFrameCallbackRearmAndroid: Getter, @@ -249,6 +250,10 @@ export const defaultTextToOverflowHidden: Getter = createNativeFlagGett * When enabled, iOS TextInput applies edits that JS transforms (e.g. maxLength truncation) incrementally after the UIKit text change delegate call returns, avoiding synchronous text and selection rewrites that can deadlock UIKeyboardTaskQueue. */ export const deferTextInputTruncationIOS: Getter = createNativeFlagGetter('deferTextInputTruncationIOS', false); +/** + * When a TextInput requests no keyboard suggestions (e.g. autoCorrect={false}) on Android, do not apply the default composing-text style (an underline) to text the keyboard is still composing. Styling supplied by the keyboard is kept. + */ +export const disableDefaultComposingTextStyleWithoutSuggestionsAndroid: Getter = createNativeFlagGetter('disableDefaultComposingTextStyleWithoutSuggestionsAndroid', false); /** * Dispatch view commands in mount item order. */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index e01580594e2..1d76256d6f2 100644 --- a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +++ b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js @@ -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<<5fc3f6a14b4e46e34e89fe358e57183b>> + * @generated SignedSource<<5c86fd498037c7f59f3ba251198dea84>> * @flow strict * @noformat */ @@ -30,6 +30,7 @@ export interface Spec extends TurboModule { readonly cxxNativeAnimatedEnabled?: () => boolean; readonly defaultTextToOverflowHidden?: () => boolean; readonly deferTextInputTruncationIOS?: () => boolean; + readonly disableDefaultComposingTextStyleWithoutSuggestionsAndroid?: () => boolean; readonly disableEarlyViewCommandExecution?: () => boolean; readonly disableIdleEventDispatchFrameCallbackRearmAndroid?: () => boolean; readonly disableIdleMountItemFrameCallbackRearmAndroid?: () => boolean;