diff --git a/packages/react-native/Libraries/Components/View/View.js b/packages/react-native/Libraries/Components/View/View.js index 7bf5f641944b..c2486bde14a5 100644 --- a/packages/react-native/Libraries/Components/View/View.js +++ b/packages/react-native/Libraries/Components/View/View.js @@ -10,7 +10,6 @@ import type {ViewProps} from './ViewPropTypes'; -import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags'; import TextAncestorContext from '../../Text/TextAncestorContext'; import ViewNativeComponent from './ViewNativeComponent'; import * as React from 'react'; @@ -29,93 +28,88 @@ component View( ) { const hasTextAncestor = use(TextAncestorContext); - let resolvedProps = props; - if (!ReactNativeFeatureFlags.enableNativeViewPropTransformations()) { - const { - accessibilityState, - accessibilityValue, - 'aria-busy': ariaBusy, - 'aria-checked': ariaChecked, - 'aria-disabled': ariaDisabled, - 'aria-expanded': ariaExpanded, - 'aria-hidden': ariaHidden, - 'aria-label': ariaLabel, - 'aria-labelledby': ariaLabelledBy, - 'aria-live': ariaLive, - 'aria-selected': ariaSelected, - 'aria-valuemax': ariaValueMax, - 'aria-valuemin': ariaValueMin, - 'aria-valuenow': ariaValueNow, - 'aria-valuetext': ariaValueText, - id, - tabIndex, - ...otherProps - } = props; - - const processedProps = otherProps as {...ViewProps}; - - const parsedAriaLabelledBy = ariaLabelledBy?.split(/\s*,\s*/g); - if (parsedAriaLabelledBy !== undefined) { - processedProps.accessibilityLabelledBy = parsedAriaLabelledBy; - } - - if (ariaLabel !== undefined) { - processedProps.accessibilityLabel = ariaLabel; - } + const { + accessibilityState, + accessibilityValue, + 'aria-busy': ariaBusy, + 'aria-checked': ariaChecked, + 'aria-disabled': ariaDisabled, + 'aria-expanded': ariaExpanded, + 'aria-hidden': ariaHidden, + 'aria-label': ariaLabel, + 'aria-labelledby': ariaLabelledBy, + 'aria-live': ariaLive, + 'aria-selected': ariaSelected, + 'aria-valuemax': ariaValueMax, + 'aria-valuemin': ariaValueMin, + 'aria-valuenow': ariaValueNow, + 'aria-valuetext': ariaValueText, + id, + tabIndex, + ...otherProps + } = props; + + const resolvedProps = otherProps as {...ViewProps}; + + const parsedAriaLabelledBy = ariaLabelledBy?.split(/\s*,\s*/g); + if (parsedAriaLabelledBy !== undefined) { + resolvedProps.accessibilityLabelledBy = parsedAriaLabelledBy; + } - if (ariaLive !== undefined) { - processedProps.accessibilityLiveRegion = - ariaLive === 'off' ? 'none' : ariaLive; - } + if (ariaLabel !== undefined) { + resolvedProps.accessibilityLabel = ariaLabel; + } - if (ariaHidden !== undefined) { - processedProps.accessibilityElementsHidden = ariaHidden; - if (ariaHidden === true) { - processedProps.importantForAccessibility = 'no-hide-descendants'; - } - } + if (ariaLive !== undefined) { + resolvedProps.accessibilityLiveRegion = + ariaLive === 'off' ? 'none' : ariaLive; + } - if (id !== undefined) { - processedProps.nativeID = id; + if (ariaHidden !== undefined) { + resolvedProps.accessibilityElementsHidden = ariaHidden; + if (ariaHidden === true) { + resolvedProps.importantForAccessibility = 'no-hide-descendants'; } + } - if (tabIndex !== undefined) { - processedProps.focusable = !tabIndex; - } + if (id !== undefined) { + resolvedProps.nativeID = id; + } - if ( - accessibilityState != null || - ariaBusy != null || - ariaChecked != null || - ariaDisabled != null || - ariaExpanded != null || - ariaSelected != null - ) { - processedProps.accessibilityState = { - busy: ariaBusy ?? accessibilityState?.busy, - checked: ariaChecked ?? accessibilityState?.checked, - disabled: ariaDisabled ?? accessibilityState?.disabled, - expanded: ariaExpanded ?? accessibilityState?.expanded, - selected: ariaSelected ?? accessibilityState?.selected, - }; - } + if (tabIndex !== undefined) { + resolvedProps.focusable = !tabIndex; + } - if ( - accessibilityValue != null || - ariaValueMax != null || - ariaValueMin != null || - ariaValueNow != null || - ariaValueText != null - ) { - processedProps.accessibilityValue = { - max: ariaValueMax ?? accessibilityValue?.max, - min: ariaValueMin ?? accessibilityValue?.min, - now: ariaValueNow ?? accessibilityValue?.now, - text: ariaValueText ?? accessibilityValue?.text, - }; - } + if ( + accessibilityState != null || + ariaBusy != null || + ariaChecked != null || + ariaDisabled != null || + ariaExpanded != null || + ariaSelected != null + ) { + resolvedProps.accessibilityState = { + busy: ariaBusy ?? accessibilityState?.busy, + checked: ariaChecked ?? accessibilityState?.checked, + disabled: ariaDisabled ?? accessibilityState?.disabled, + expanded: ariaExpanded ?? accessibilityState?.expanded, + selected: ariaSelected ?? accessibilityState?.selected, + }; + } - resolvedProps = processedProps; + if ( + accessibilityValue != null || + ariaValueMax != null || + ariaValueMin != null || + ariaValueNow != null || + ariaValueText != null + ) { + resolvedProps.accessibilityValue = { + max: ariaValueMax ?? accessibilityValue?.max, + min: ariaValueMin ?? accessibilityValue?.min, + now: ariaValueNow ?? accessibilityValue?.now, + text: ariaValueText ?? accessibilityValue?.text, + }; } const actualView = diff --git a/packages/react-native/Libraries/Components/View/__tests__/View-itest.js b/packages/react-native/Libraries/Components/View/__tests__/View-itest.js index ea83fd0e7eb3..934e606a289d 100644 --- a/packages/react-native/Libraries/Components/View/__tests__/View-itest.js +++ b/packages/react-native/Libraries/Components/View/__tests__/View-itest.js @@ -5,7 +5,7 @@ * LICENSE file in the root directory of this source tree. * * @flow strict-local - * @fantom_flags enableNativeCSSParsing:* enableNativeViewPropTransformations:* + * @fantom_flags enableNativeCSSParsing:* * @format */ 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 c0a1a9a5cd73..9a2923e6ada8 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<<1eca66b21554b00725f2a9be894a0db9>> + * @generated SignedSource<<2c364dcadc5b346d3bb13cde2e5a060a>> */ /** @@ -270,12 +270,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun enableNativeCSSParsing(): Boolean = accessor.enableNativeCSSParsing() - /** - * When enabled, View.js passes aria-*, id, and tabIndex props directly to native, relying on C++ prop parsing instead of JS-side transformations. - */ - @JvmStatic - public fun enableNativeViewPropTransformations(): Boolean = accessor.enableNativeViewPropTransformations() - /** * Enable network event reporting hooks in each native platform through `NetworkReporter` (Web Perf APIs + CDP). This flag should be combined with `fuseboxNetworkInspectionEnabled` to enable Network CDP debugging. */ 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 a138abe7be3c..0d9c21b3980b 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<<76d977ea53cb2a37fc2ea8549e31cebd>> + * @generated SignedSource<> */ /** @@ -60,7 +60,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var enableModuleArgumentNSNullConversionIOSCache: Boolean? = null private var enableMutationObserverByDefaultCache: Boolean? = null private var enableNativeCSSParsingCache: Boolean? = null - private var enableNativeViewPropTransformationsCache: Boolean? = null private var enableNetworkEventReportingCache: Boolean? = null private var enablePreparedTextLayoutCache: Boolean? = null private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null @@ -473,15 +472,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun enableNativeViewPropTransformations(): Boolean { - var cached = enableNativeViewPropTransformationsCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.enableNativeViewPropTransformations() - enableNativeViewPropTransformationsCache = cached - } - return cached - } - override fun enableNetworkEventReporting(): Boolean { var cached = enableNetworkEventReportingCache 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 24abbbaa92ee..56f82561e144 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<<53cb8cbc9588ede52d45c3dc611b55c6>> */ /** @@ -108,8 +108,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun enableNativeCSSParsing(): Boolean - @DoNotStrip @JvmStatic public external fun enableNativeViewPropTransformations(): Boolean - @DoNotStrip @JvmStatic public external fun enableNetworkEventReporting(): Boolean @DoNotStrip @JvmStatic public external fun enablePreparedTextLayout(): 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 4075e0ac58d1..a3e9c4842dff 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<<9e5b3192d1bec953c116d959ad63283d>> + * @generated SignedSource<<8195238186a41519d277391e2295deb1>> */ /** @@ -103,8 +103,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun enableNativeCSSParsing(): Boolean = false - override fun enableNativeViewPropTransformations(): Boolean = false - override fun enableNetworkEventReporting(): Boolean = true override fun enablePreparedTextLayout(): 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 1284abcf7a4c..c4f4da6ebfb5 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<<378d6a8de497d26ebbbf55885be27a21>> + * @generated SignedSource<<85bd7b360d4ee759c77bfb15878e77aa>> */ /** @@ -64,7 +64,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var enableModuleArgumentNSNullConversionIOSCache: Boolean? = null private var enableMutationObserverByDefaultCache: Boolean? = null private var enableNativeCSSParsingCache: Boolean? = null - private var enableNativeViewPropTransformationsCache: Boolean? = null private var enableNetworkEventReportingCache: Boolean? = null private var enablePreparedTextLayoutCache: Boolean? = null private var enablePropsUpdateReconciliationAndroidCache: Boolean? = null @@ -517,16 +516,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } - override fun enableNativeViewPropTransformations(): Boolean { - var cached = enableNativeViewPropTransformationsCache - if (cached == null) { - cached = currentProvider.enableNativeViewPropTransformations() - accessedFeatureFlags.add("enableNativeViewPropTransformations") - enableNativeViewPropTransformationsCache = cached - } - return cached - } - override fun enableNetworkEventReporting(): Boolean { var cached = enableNetworkEventReportingCache 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 13a3b26839b4..0d4537ef36ce 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<<42e555a40da280b24f84e3ee5b45051d>> + * @generated SignedSource<<5783380c1b3c870a38c6ee3dd732f451>> */ /** @@ -103,8 +103,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun enableNativeCSSParsing(): Boolean - @DoNotStrip public fun enableNativeViewPropTransformations(): Boolean - @DoNotStrip public fun enableNetworkEventReporting(): Boolean @DoNotStrip public fun enablePreparedTextLayout(): Boolean 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 f586f2e3fcb5..f39568d1e552 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<> + * @generated SignedSource<<11d00fb61dfb4cb468fe4aaba1a0736a>> */ /** @@ -279,12 +279,6 @@ class ReactNativeFeatureFlagsJavaProvider return method(javaProvider_); } - bool enableNativeViewPropTransformations() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enableNativeViewPropTransformations"); - return method(javaProvider_); - } - bool enableNetworkEventReporting() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("enableNetworkEventReporting"); @@ -795,11 +789,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableNativeCSSParsing( return ReactNativeFeatureFlags::enableNativeCSSParsing(); } -bool JReactNativeFeatureFlagsCxxInterop::enableNativeViewPropTransformations( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::enableNativeViewPropTransformations(); -} - bool JReactNativeFeatureFlagsCxxInterop::enableNetworkEventReporting( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::enableNetworkEventReporting(); @@ -1206,9 +1195,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "enableNativeCSSParsing", JReactNativeFeatureFlagsCxxInterop::enableNativeCSSParsing), - makeNativeMethod( - "enableNativeViewPropTransformations", - JReactNativeFeatureFlagsCxxInterop::enableNativeViewPropTransformations), makeNativeMethod( "enableNetworkEventReporting", JReactNativeFeatureFlagsCxxInterop::enableNetworkEventReporting), 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 2b3741c71e80..0b55678c655d 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<> + * @generated SignedSource<<0259578fbf209e84eb04078189c9db41>> */ /** @@ -150,9 +150,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool enableNativeCSSParsing( facebook::jni::alias_ref); - static bool enableNativeViewPropTransformations( - facebook::jni::alias_ref); - static bool enableNetworkEventReporting( facebook::jni::alias_ref); diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp index a8bddab5889c..a0e7b64b1917 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<> */ /** @@ -186,10 +186,6 @@ bool ReactNativeFeatureFlags::enableNativeCSSParsing() { return getAccessor().enableNativeCSSParsing(); } -bool ReactNativeFeatureFlags::enableNativeViewPropTransformations() { - return getAccessor().enableNativeViewPropTransformations(); -} - bool ReactNativeFeatureFlags::enableNetworkEventReporting() { return getAccessor().enableNetworkEventReporting(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index b0c8f5bb492b..485ef6c32191 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<<8b4288e3f5a8b26951150a3c75ad4356>> + * @generated SignedSource<<1c2977ef001d5236286fbece9751b085>> */ /** @@ -239,11 +239,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool enableNativeCSSParsing(); - /** - * When enabled, View.js passes aria-*, id, and tabIndex props directly to native, relying on C++ prop parsing instead of JS-side transformations. - */ - RN_EXPORT static bool enableNativeViewPropTransformations(); - /** * Enable network event reporting hooks in each native platform through `NetworkReporter` (Web Perf APIs + CDP). This flag should be combined with `fuseboxNetworkInspectionEnabled` to enable Network CDP debugging. */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index 0f1a8ac663c3..d8a2a7a4789a 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<<46ab3d7c8beee792b6886d5618056c1f>> */ /** @@ -749,24 +749,6 @@ bool ReactNativeFeatureFlagsAccessor::enableNativeCSSParsing() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::enableNativeViewPropTransformations() { - auto flagValue = enableNativeViewPropTransformations_.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(40, "enableNativeViewPropTransformations"); - - flagValue = currentProvider_->enableNativeViewPropTransformations(); - enableNativeViewPropTransformations_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::enableNetworkEventReporting() { auto flagValue = enableNetworkEventReporting_.load(); @@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNetworkEventReporting() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(41, "enableNetworkEventReporting"); + markFlagAsAccessed(40, "enableNetworkEventReporting"); flagValue = currentProvider_->enableNetworkEventReporting(); enableNetworkEventReporting_ = flagValue; @@ -794,7 +776,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(42, "enablePreparedTextLayout"); + markFlagAsAccessed(41, "enablePreparedTextLayout"); flagValue = currentProvider_->enablePreparedTextLayout(); enablePreparedTextLayout_ = flagValue; @@ -812,7 +794,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(43, "enablePropsUpdateReconciliationAndroid"); + markFlagAsAccessed(42, "enablePropsUpdateReconciliationAndroid"); flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid(); enablePropsUpdateReconciliationAndroid_ = flagValue; @@ -830,7 +812,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSchedulerDelegateInvalidation() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(44, "enableSchedulerDelegateInvalidation"); + markFlagAsAccessed(43, "enableSchedulerDelegateInvalidation"); flagValue = currentProvider_->enableSchedulerDelegateInvalidation(); enableSchedulerDelegateInvalidation_ = flagValue; @@ -848,7 +830,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(45, "enableSwiftUIBasedFilters"); + markFlagAsAccessed(44, "enableSwiftUIBasedFilters"); flagValue = currentProvider_->enableSwiftUIBasedFilters(); enableSwiftUIBasedFilters_ = flagValue; @@ -866,7 +848,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(46, "enableViewCulling"); + markFlagAsAccessed(45, "enableViewCulling"); flagValue = currentProvider_->enableViewCulling(); enableViewCulling_ = flagValue; @@ -884,7 +866,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(47, "enableViewRecycling"); + markFlagAsAccessed(46, "enableViewRecycling"); flagValue = currentProvider_->enableViewRecycling(); enableViewRecycling_ = flagValue; @@ -902,7 +884,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(48, "enableViewRecyclingForImage"); + markFlagAsAccessed(47, "enableViewRecyclingForImage"); flagValue = currentProvider_->enableViewRecyclingForImage(); enableViewRecyclingForImage_ = flagValue; @@ -920,7 +902,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(49, "enableViewRecyclingForScrollView"); + markFlagAsAccessed(48, "enableViewRecyclingForScrollView"); flagValue = currentProvider_->enableViewRecyclingForScrollView(); enableViewRecyclingForScrollView_ = flagValue; @@ -938,7 +920,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(50, "enableViewRecyclingForText"); + markFlagAsAccessed(49, "enableViewRecyclingForText"); flagValue = currentProvider_->enableViewRecyclingForText(); enableViewRecyclingForText_ = flagValue; @@ -956,7 +938,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(51, "enableViewRecyclingForView"); + markFlagAsAccessed(50, "enableViewRecyclingForView"); flagValue = currentProvider_->enableViewRecyclingForView(); enableViewRecyclingForView_ = flagValue; @@ -974,7 +956,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(52, "enableVirtualViewContainerStateExperimental"); + markFlagAsAccessed(51, "enableVirtualViewContainerStateExperimental"); flagValue = currentProvider_->enableVirtualViewContainerStateExperimental(); enableVirtualViewContainerStateExperimental_ = flagValue; @@ -992,7 +974,7 @@ bool ReactNativeFeatureFlagsAccessor::enableVirtualViewDebugFeatures() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(53, "enableVirtualViewDebugFeatures"); + markFlagAsAccessed(52, "enableVirtualViewDebugFeatures"); flagValue = currentProvider_->enableVirtualViewDebugFeatures(); enableVirtualViewDebugFeatures_ = flagValue; @@ -1010,7 +992,7 @@ bool ReactNativeFeatureFlagsAccessor::fixDifferentiatorParentTagForUnflattenCase // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(54, "fixDifferentiatorParentTagForUnflattenCase"); + markFlagAsAccessed(53, "fixDifferentiatorParentTagForUnflattenCase"); flagValue = currentProvider_->fixDifferentiatorParentTagForUnflattenCase(); fixDifferentiatorParentTagForUnflattenCase_ = flagValue; @@ -1028,7 +1010,7 @@ bool ReactNativeFeatureFlagsAccessor::fixFindShadowNodeByTagRaceCondition() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(55, "fixFindShadowNodeByTagRaceCondition"); + markFlagAsAccessed(54, "fixFindShadowNodeByTagRaceCondition"); flagValue = currentProvider_->fixFindShadowNodeByTagRaceCondition(); fixFindShadowNodeByTagRaceCondition_ = flagValue; @@ -1046,7 +1028,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(56, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); + markFlagAsAccessed(55, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact(); fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue; @@ -1064,7 +1046,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(57, "fixYogaFlexBasisFitContentInMainAxis"); + markFlagAsAccessed(56, "fixYogaFlexBasisFitContentInMainAxis"); flagValue = currentProvider_->fixYogaFlexBasisFitContentInMainAxis(); fixYogaFlexBasisFitContentInMainAxis_ = flagValue; @@ -1082,7 +1064,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(58, "fuseboxAssertSingleHostState"); + markFlagAsAccessed(57, "fuseboxAssertSingleHostState"); flagValue = currentProvider_->fuseboxAssertSingleHostState(); fuseboxAssertSingleHostState_ = flagValue; @@ -1100,7 +1082,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(59, "fuseboxEnabledRelease"); + markFlagAsAccessed(58, "fuseboxEnabledRelease"); flagValue = currentProvider_->fuseboxEnabledRelease(); fuseboxEnabledRelease_ = flagValue; @@ -1118,7 +1100,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(60, "fuseboxFrameRecordingEnabled"); + markFlagAsAccessed(59, "fuseboxFrameRecordingEnabled"); flagValue = currentProvider_->fuseboxFrameRecordingEnabled(); fuseboxFrameRecordingEnabled_ = flagValue; @@ -1136,7 +1118,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(61, "fuseboxNetworkInspectionEnabled"); + markFlagAsAccessed(60, "fuseboxNetworkInspectionEnabled"); flagValue = currentProvider_->fuseboxNetworkInspectionEnabled(); fuseboxNetworkInspectionEnabled_ = flagValue; @@ -1154,7 +1136,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(62, "fuseboxScreenshotCaptureEnabled"); + markFlagAsAccessed(61, "fuseboxScreenshotCaptureEnabled"); flagValue = currentProvider_->fuseboxScreenshotCaptureEnabled(); fuseboxScreenshotCaptureEnabled_ = flagValue; @@ -1172,7 +1154,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(63, "hideOffscreenVirtualViewsOnIOS"); + markFlagAsAccessed(62, "hideOffscreenVirtualViewsOnIOS"); flagValue = currentProvider_->hideOffscreenVirtualViewsOnIOS(); hideOffscreenVirtualViewsOnIOS_ = flagValue; @@ -1190,7 +1172,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(64, "overrideBySynchronousMountPropsAtMountingAndroid"); + markFlagAsAccessed(63, "overrideBySynchronousMountPropsAtMountingAndroid"); flagValue = currentProvider_->overrideBySynchronousMountPropsAtMountingAndroid(); overrideBySynchronousMountPropsAtMountingAndroid_ = flagValue; @@ -1208,7 +1190,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(65, "perfIssuesEnabled"); + markFlagAsAccessed(64, "perfIssuesEnabled"); flagValue = currentProvider_->perfIssuesEnabled(); perfIssuesEnabled_ = flagValue; @@ -1226,7 +1208,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(66, "perfMonitorV2Enabled"); + markFlagAsAccessed(65, "perfMonitorV2Enabled"); flagValue = currentProvider_->perfMonitorV2Enabled(); perfMonitorV2Enabled_ = flagValue; @@ -1244,7 +1226,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(67, "preparedTextCacheSize"); + markFlagAsAccessed(66, "preparedTextCacheSize"); flagValue = currentProvider_->preparedTextCacheSize(); preparedTextCacheSize_ = flagValue; @@ -1262,7 +1244,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(68, "preventShadowTreeCommitExhaustion"); + markFlagAsAccessed(67, "preventShadowTreeCommitExhaustion"); flagValue = currentProvider_->preventShadowTreeCommitExhaustion(); preventShadowTreeCommitExhaustion_ = flagValue; @@ -1280,7 +1262,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(69, "redBoxV2Android"); + markFlagAsAccessed(68, "redBoxV2Android"); flagValue = currentProvider_->redBoxV2Android(); redBoxV2Android_ = flagValue; @@ -1298,7 +1280,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(70, "redBoxV2IOS"); + markFlagAsAccessed(69, "redBoxV2IOS"); flagValue = currentProvider_->redBoxV2IOS(); redBoxV2IOS_ = 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::syncAndroidClipBoundsWithOverflow() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(74, "syncAndroidClipBoundsWithOverflow"); + markFlagAsAccessed(73, "syncAndroidClipBoundsWithOverflow"); flagValue = currentProvider_->syncAndroidClipBoundsWithOverflow(); syncAndroidClipBoundsWithOverflow_ = 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::useOptimizedViewRegistryOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(83, "useOptimizedViewRegistryOnAndroid"); + markFlagAsAccessed(82, "useOptimizedViewRegistryOnAndroid"); flagValue = currentProvider_->useOptimizedViewRegistryOnAndroid(); useOptimizedViewRegistryOnAndroid_ = flagValue; @@ -1550,7 +1532,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(84, "useSharedAnimatedBackend"); + markFlagAsAccessed(83, "useSharedAnimatedBackend"); flagValue = currentProvider_->useSharedAnimatedBackend(); useSharedAnimatedBackend_ = flagValue; @@ -1568,7 +1550,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(85, "useTraitHiddenOnAndroid"); + markFlagAsAccessed(84, "useTraitHiddenOnAndroid"); flagValue = currentProvider_->useTraitHiddenOnAndroid(); useTraitHiddenOnAndroid_ = flagValue; @@ -1586,7 +1568,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(86, "useTurboModuleInterop"); + markFlagAsAccessed(85, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -1604,7 +1586,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(87, "useTurboModules"); + markFlagAsAccessed(86, "useTurboModules"); flagValue = currentProvider_->useTurboModules(); useTurboModules_ = flagValue; @@ -1622,7 +1604,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(88, "useUnorderedMapInDifferentiator"); + markFlagAsAccessed(87, "useUnorderedMapInDifferentiator"); flagValue = currentProvider_->useUnorderedMapInDifferentiator(); useUnorderedMapInDifferentiator_ = flagValue; @@ -1640,7 +1622,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(89, "viewCullingOutsetRatio"); + markFlagAsAccessed(88, "viewCullingOutsetRatio"); flagValue = currentProvider_->viewCullingOutsetRatio(); viewCullingOutsetRatio_ = flagValue; @@ -1658,7 +1640,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(90, "viewTransitionEnabled"); + markFlagAsAccessed(89, "viewTransitionEnabled"); flagValue = currentProvider_->viewTransitionEnabled(); viewTransitionEnabled_ = flagValue; @@ -1676,7 +1658,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(91, "virtualViewPrerenderRatio"); + markFlagAsAccessed(90, "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 67a5012fe00e..e317fe340682 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<<17621e5f711352812633c125b7858537>> + * @generated SignedSource<<54567a60aa479f5a441bf48866f1d7ec>> */ /** @@ -72,7 +72,6 @@ class ReactNativeFeatureFlagsAccessor { bool enableModuleArgumentNSNullConversionIOS(); bool enableMutationObserverByDefault(); bool enableNativeCSSParsing(); - bool enableNativeViewPropTransformations(); bool enableNetworkEventReporting(); bool enablePreparedTextLayout(); bool enablePropsUpdateReconciliationAndroid(); @@ -135,7 +134,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 92> accessedFeatureFlags_; + std::array, 91> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> cdpInteractionMetricsEnabled_; @@ -177,7 +176,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> enableModuleArgumentNSNullConversionIOS_; std::atomic> enableMutationObserverByDefault_; std::atomic> enableNativeCSSParsing_; - std::atomic> enableNativeViewPropTransformations_; std::atomic> enableNetworkEventReporting_; std::atomic> enablePreparedTextLayout_; std::atomic> enablePropsUpdateReconciliationAndroid_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index ecc79d832fe4..31abb32df8f2 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<<3d1718afe5b2ed63a918ffe09a4a36b1>> + * @generated SignedSource<> */ /** @@ -187,10 +187,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return false; } - bool enableNativeViewPropTransformations() override { - return false; - } - bool enableNetworkEventReporting() override { return true; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index 2bc41176d59c..96cb9ffed078 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<<23e79788b0820f61ba95288412367247>> + * @generated SignedSource<> */ /** @@ -405,15 +405,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::enableNativeCSSParsing(); } - bool enableNativeViewPropTransformations() override { - auto value = values_["enableNativeViewPropTransformations"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::enableNativeViewPropTransformations(); - } - bool enableNetworkEventReporting() override { auto value = values_["enableNetworkEventReporting"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 400e4bea814d..38ce01d4ad8f 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<<87316e34516ebbbb34ae384e5a61376b>> + * @generated SignedSource<<47f30ed4ad2e27e8252b491c9988a7d6>> */ /** @@ -65,7 +65,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool enableModuleArgumentNSNullConversionIOS() = 0; virtual bool enableMutationObserverByDefault() = 0; virtual bool enableNativeCSSParsing() = 0; - virtual bool enableNativeViewPropTransformations() = 0; virtual bool enableNetworkEventReporting() = 0; virtual bool enablePreparedTextLayout() = 0; virtual bool enablePropsUpdateReconciliationAndroid() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index 8c49f21652bd..d9e5289e50f4 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<<80e1d4551c51800c138f16228cfae9f6>> + * @generated SignedSource<<6c0133b3df0de2d37d947e382cf75be0>> */ /** @@ -244,11 +244,6 @@ bool NativeReactNativeFeatureFlags::enableNativeCSSParsing( return ReactNativeFeatureFlags::enableNativeCSSParsing(); } -bool NativeReactNativeFeatureFlags::enableNativeViewPropTransformations( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::enableNativeViewPropTransformations(); -} - bool NativeReactNativeFeatureFlags::enableNetworkEventReporting( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::enableNetworkEventReporting(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index a3703ec36073..5cc34a24582d 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<<1df283aec4b56f36271a187341e7103d>> + * @generated SignedSource<> */ /** @@ -116,8 +116,6 @@ class NativeReactNativeFeatureFlags bool enableNativeCSSParsing(jsi::Runtime& runtime); - bool enableNativeViewPropTransformations(jsi::Runtime& runtime); - bool enableNetworkEventReporting(jsi::Runtime& runtime); bool enablePreparedTextLayout(jsi::Runtime& runtime); diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp index 9bf1bb2b65b8..f21c86773726 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp @@ -15,24 +15,6 @@ namespace facebook::react { -static AccessibilityLabelledBy parseCommaSeparatedList(const std::string& str) { - AccessibilityLabelledBy result; - size_t pos = 0; - while (pos < str.size()) { - auto commaPos = str.find(',', pos); - if (commaPos == std::string::npos) { - commaPos = str.size(); - } - auto start = str.find_first_not_of(' ', pos); - if (start < commaPos) { - auto end = str.find_last_not_of(' ', commaPos - 1); - result.value.push_back(str.substr(start, end - start + 1)); - } - pos = commaPos + 1; - } - return result; -} - AccessibilityProps::AccessibilityProps( const PropsParserContext& context, const AccessibilityProps& sourceProps, @@ -234,14 +216,7 @@ AccessibilityProps::AccessibilityProps( rawProps, "testID", sourceProps.testId, - "")), - canonicalAccessibilityLabel_(sourceProps.canonicalAccessibilityLabel_), - canonicalAccessibilityLiveRegion_( - sourceProps.canonicalAccessibilityLiveRegion_), - canonicalImportantForAccessibility_( - sourceProps.canonicalImportantForAccessibility_), - canonicalAccessibilityElementsHidden_( - sourceProps.canonicalAccessibilityElementsHidden_) { + "")) { // It is a (severe!) perf deoptimization to request props out-of-order. // Thus, since we need to request the same prop twice here // (accessibilityRole) we "must" do them subsequently here to prevent @@ -279,244 +254,6 @@ AccessibilityProps::AccessibilityProps( } else { fromRawValue(context, *precedentRoleValue, accessibilityTraits); } - - if (ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - static auto defaults = AccessibilityProps{}; - - // Update canonical values from explicit props if present. - // These track the user-set accessibility* prop values separately - // from any aria-* override, so we can restore them when an - // aria-* alias is cleared. - auto* explicitLabel = rawProps.at("accessibilityLabel", nullptr, nullptr); - if (explicitLabel != nullptr) { - canonicalAccessibilityLabel_ = explicitLabel->hasValue() - ? accessibilityLabel - : defaults.accessibilityLabel; - } - - auto* explicitLiveRegion = - rawProps.at("accessibilityLiveRegion", nullptr, nullptr); - if (explicitLiveRegion != nullptr) { - canonicalAccessibilityLiveRegion_ = explicitLiveRegion->hasValue() - ? accessibilityLiveRegion - : defaults.accessibilityLiveRegion; - } - - auto* explicitIFA = - rawProps.at("importantForAccessibility", nullptr, nullptr); - if (explicitIFA != nullptr) { - canonicalImportantForAccessibility_ = explicitIFA->hasValue() - ? importantForAccessibility - : defaults.importantForAccessibility; - } - - auto* explicitAEH = - rawProps.at("accessibilityElementsHidden", nullptr, nullptr); - if (explicitAEH != nullptr) { - canonicalAccessibilityElementsHidden_ = explicitAEH->hasValue() - ? accessibilityElementsHidden - : defaults.accessibilityElementsHidden; - } - - // aria-label -> accessibilityLabel - auto* ariaLabel = rawProps.at("aria-label", nullptr, nullptr); - if (ariaLabel != nullptr) { - if (ariaLabel->hasValue()) { - fromRawValue(context, *ariaLabel, accessibilityLabel); - } else { - accessibilityLabel = canonicalAccessibilityLabel_; - } - } - - // aria-labelledby -> accessibilityLabelledBy (comma-split string -> - // array) - auto* ariaLabelledBy = rawProps.at("aria-labelledby", nullptr, nullptr); - if (ariaLabelledBy != nullptr) { - if (ariaLabelledBy->hasValue()) { - if (ariaLabelledBy->hasType()) { - accessibilityLabelledBy = - parseCommaSeparatedList((std::string)*ariaLabelledBy); - } else { - fromRawValue(context, *ariaLabelledBy, accessibilityLabelledBy); - } - } else { - accessibilityLabelledBy = defaults.accessibilityLabelledBy; - } - } - - // aria-live -> accessibilityLiveRegion (map "off" -> None) - auto* ariaLive = rawProps.at("aria-live", nullptr, nullptr); - if (ariaLive != nullptr) { - if (ariaLive->hasValue()) { - if (ariaLive->hasType()) { - auto str = (std::string)*ariaLive; - if (str == "off") { - accessibilityLiveRegion = AccessibilityLiveRegion::None; - } else { - fromRawValue(context, *ariaLive, accessibilityLiveRegion); - } - } - } else { - accessibilityLiveRegion = canonicalAccessibilityLiveRegion_; - } - } - - // aria-hidden -> accessibilityElementsHidden + - // importantForAccessibility - auto* ariaHidden = rawProps.at("aria-hidden", nullptr, nullptr); - if (ariaHidden != nullptr) { - if (ariaHidden->hasValue()) { - fromRawValue(context, *ariaHidden, accessibilityElementsHidden); - if (accessibilityElementsHidden) { - importantForAccessibility = - ImportantForAccessibility::NoHideDescendants; - } else { - importantForAccessibility = canonicalImportantForAccessibility_; - } - } else { - accessibilityElementsHidden = canonicalAccessibilityElementsHidden_; - importantForAccessibility = canonicalImportantForAccessibility_; - } - } - - // aria-busy -> accessibilityState.busy - auto* ariaBusy = rawProps.at("aria-busy", nullptr, nullptr); - if (ariaBusy != nullptr) { - if (ariaBusy->hasValue()) { - if (!accessibilityState.has_value()) { - accessibilityState = AccessibilityState{}; - } - fromRawValue(context, *ariaBusy, accessibilityState->busy); - } else { - if (accessibilityState.has_value()) { - accessibilityState->busy = AccessibilityState{}.busy; - } - } - } - - // aria-checked -> accessibilityState.checked - auto* ariaChecked = rawProps.at("aria-checked", nullptr, nullptr); - if (ariaChecked != nullptr) { - if (ariaChecked->hasValue()) { - if (!accessibilityState.has_value()) { - accessibilityState = AccessibilityState{}; - } - if (ariaChecked->hasType()) { - if ((std::string)*ariaChecked == "mixed") { - accessibilityState->checked = AccessibilityState::Mixed; - } - } else if (ariaChecked->hasType()) { - accessibilityState->checked = (bool)*ariaChecked - ? AccessibilityState::Checked - : AccessibilityState::Unchecked; - } - } else { - if (accessibilityState.has_value()) { - accessibilityState->checked = AccessibilityState{}.checked; - } - } - } - - // aria-disabled -> accessibilityState.disabled - auto* ariaDisabled = rawProps.at("aria-disabled", nullptr, nullptr); - if (ariaDisabled != nullptr) { - if (ariaDisabled->hasValue()) { - if (!accessibilityState.has_value()) { - accessibilityState = AccessibilityState{}; - } - fromRawValue(context, *ariaDisabled, accessibilityState->disabled); - } else { - if (accessibilityState.has_value()) { - accessibilityState->disabled = AccessibilityState{}.disabled; - } - } - } - - // aria-expanded -> accessibilityState.expanded - auto* ariaExpanded = rawProps.at("aria-expanded", nullptr, nullptr); - if (ariaExpanded != nullptr) { - if (ariaExpanded->hasValue()) { - if (!accessibilityState.has_value()) { - accessibilityState = AccessibilityState{}; - } - fromRawValue(context, *ariaExpanded, accessibilityState->expanded); - } else { - if (accessibilityState.has_value()) { - accessibilityState->expanded = AccessibilityState{}.expanded; - } - } - } - - // aria-selected -> accessibilityState.selected - auto* ariaSelected = rawProps.at("aria-selected", nullptr, nullptr); - if (ariaSelected != nullptr) { - if (ariaSelected->hasValue()) { - if (!accessibilityState.has_value()) { - accessibilityState = AccessibilityState{}; - } - fromRawValue(context, *ariaSelected, accessibilityState->selected); - } else { - if (accessibilityState.has_value()) { - accessibilityState->selected = AccessibilityState{}.selected; - } - } - } - - // If all aria-state fields have been reset to defaults, clear the - // optional entirely so the view reports no accessibilityState. - if (accessibilityState.has_value() && - *accessibilityState == AccessibilityState{}) { - accessibilityState = std::nullopt; - } - - // aria-valuemax -> accessibilityValue.max - auto* ariaValueMax = rawProps.at("aria-valuemax", nullptr, nullptr); - if (ariaValueMax != nullptr) { - if (ariaValueMax->hasValue()) { - if (ariaValueMax->hasType()) { - accessibilityValue.max = (int)*ariaValueMax; - } - } else { - accessibilityValue.max = std::nullopt; - } - } - - // aria-valuemin -> accessibilityValue.min - auto* ariaValueMin = rawProps.at("aria-valuemin", nullptr, nullptr); - if (ariaValueMin != nullptr) { - if (ariaValueMin->hasValue()) { - if (ariaValueMin->hasType()) { - accessibilityValue.min = (int)*ariaValueMin; - } - } else { - accessibilityValue.min = std::nullopt; - } - } - - // aria-valuenow -> accessibilityValue.now - auto* ariaValueNow = rawProps.at("aria-valuenow", nullptr, nullptr); - if (ariaValueNow != nullptr) { - if (ariaValueNow->hasValue()) { - if (ariaValueNow->hasType()) { - accessibilityValue.now = (int)*ariaValueNow; - } - } else { - accessibilityValue.now = std::nullopt; - } - } - - // aria-valuetext -> accessibilityValue.text - auto* ariaValueText = rawProps.at("aria-valuetext", nullptr, nullptr); - if (ariaValueText != nullptr) { - if (ariaValueText->hasValue()) { - if (ariaValueText->hasType()) { - accessibilityValue.text = (std::string)*ariaValueText; - } - } else { - accessibilityValue.text = std::nullopt; - } - } - } } } @@ -530,56 +267,27 @@ void AccessibilityProps::setProp( switch (hash) { RAW_SET_PROP_SWITCH_CASE_BASIC(accessible); RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityState); - case CONSTEXPR_RAW_PROPS_KEY_HASH("accessibilityLabel"): { - fromRawValue( - context, value, accessibilityLabel, defaults.accessibilityLabel); - canonicalAccessibilityLabel_ = accessibilityLabel; - return; - } - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityOrder); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabelledBy); - case CONSTEXPR_RAW_PROPS_KEY_HASH("accessibilityLiveRegion"): { - fromRawValue( - context, - value, - accessibilityLiveRegion, - defaults.accessibilityLiveRegion); - canonicalAccessibilityLiveRegion_ = accessibilityLiveRegion; - return; - } - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityHint); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLanguage); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityShowsLargeContentViewer); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLargeContentTitle); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityValue); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityActions); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityViewIsModal); - case CONSTEXPR_RAW_PROPS_KEY_HASH("accessibilityElementsHidden"): { - fromRawValue( - context, - value, - accessibilityElementsHidden, - defaults.accessibilityElementsHidden); - canonicalAccessibilityElementsHidden_ = accessibilityElementsHidden; - return; - } - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityIgnoresInvertColors); - RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityRespondsToUserInteraction); - RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityTap); - RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityMagicTap); - RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityEscape); - RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityAction); - case CONSTEXPR_RAW_PROPS_KEY_HASH("importantForAccessibility"): { - fromRawValue( - context, - value, - importantForAccessibility, - defaults.importantForAccessibility); - canonicalImportantForAccessibility_ = importantForAccessibility; - return; - } - RAW_SET_PROP_SWITCH_CASE_BASIC(role); - RAW_SET_PROP_SWITCH_CASE(testId, "testID"); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabel); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityOrder); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLabelledBy); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLiveRegion); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityHint); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLanguage); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityShowsLargeContentViewer); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLargeContentTitle); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityValue); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityActions); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityViewIsModal); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityElementsHidden); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityIgnoresInvertColors); + RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityRespondsToUserInteraction); + RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityTap); + RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityMagicTap); + RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityEscape); + RAW_SET_PROP_SWITCH_CASE_BASIC(onAccessibilityAction); + RAW_SET_PROP_SWITCH_CASE_BASIC(importantForAccessibility); + RAW_SET_PROP_SWITCH_CASE_BASIC(role); + RAW_SET_PROP_SWITCH_CASE(testId, "testID"); case CONSTEXPR_RAW_PROPS_KEY_HASH("accessibilityRole"): { AccessibilityTraits traits = AccessibilityTraits::None; std::string roleString; @@ -592,223 +300,6 @@ void AccessibilityProps::setProp( accessibilityRole = roleString; return; } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-label"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - fromRawValue(context, value, accessibilityLabel); - } else { - accessibilityLabel = canonicalAccessibilityLabel_; - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-labelledby"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (value.hasType()) { - accessibilityLabelledBy = parseCommaSeparatedList((std::string)value); - } else { - fromRawValue(context, value, accessibilityLabelledBy); - } - } else { - accessibilityLabelledBy = defaults.accessibilityLabelledBy; - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-live"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (value.hasType()) { - auto str = (std::string)value; - if (str == "off") { - accessibilityLiveRegion = AccessibilityLiveRegion::None; - } else { - fromRawValue(context, value, accessibilityLiveRegion); - } - } - } else { - accessibilityLiveRegion = canonicalAccessibilityLiveRegion_; - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-hidden"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - fromRawValue(context, value, accessibilityElementsHidden); - if (accessibilityElementsHidden) { - importantForAccessibility = - ImportantForAccessibility::NoHideDescendants; - } else { - importantForAccessibility = canonicalImportantForAccessibility_; - } - } else { - accessibilityElementsHidden = canonicalAccessibilityElementsHidden_; - importantForAccessibility = canonicalImportantForAccessibility_; - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-busy"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (!accessibilityState.has_value()) { - accessibilityState = AccessibilityState{}; - } - fromRawValue(context, value, accessibilityState->busy); - } else { - if (accessibilityState.has_value()) { - accessibilityState->busy = AccessibilityState{}.busy; - if (*accessibilityState == AccessibilityState{}) { - accessibilityState = std::nullopt; - } - } - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-checked"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (!accessibilityState.has_value()) { - accessibilityState = AccessibilityState{}; - } - if (value.hasType()) { - if ((std::string)value == "mixed") { - accessibilityState->checked = AccessibilityState::Mixed; - } - } else if (value.hasType()) { - accessibilityState->checked = (bool)value - ? AccessibilityState::Checked - : AccessibilityState::Unchecked; - } - } else { - if (accessibilityState.has_value()) { - accessibilityState->checked = AccessibilityState{}.checked; - if (*accessibilityState == AccessibilityState{}) { - accessibilityState = std::nullopt; - } - } - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-disabled"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (!accessibilityState.has_value()) { - accessibilityState = AccessibilityState{}; - } - fromRawValue(context, value, accessibilityState->disabled); - } else { - if (accessibilityState.has_value()) { - accessibilityState->disabled = AccessibilityState{}.disabled; - if (*accessibilityState == AccessibilityState{}) { - accessibilityState = std::nullopt; - } - } - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-expanded"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (!accessibilityState.has_value()) { - accessibilityState = AccessibilityState{}; - } - fromRawValue(context, value, accessibilityState->expanded); - } else { - if (accessibilityState.has_value()) { - accessibilityState->expanded = AccessibilityState{}.expanded; - if (*accessibilityState == AccessibilityState{}) { - accessibilityState = std::nullopt; - } - } - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-selected"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (!accessibilityState.has_value()) { - accessibilityState = AccessibilityState{}; - } - fromRawValue(context, value, accessibilityState->selected); - } else { - if (accessibilityState.has_value()) { - accessibilityState->selected = AccessibilityState{}.selected; - if (*accessibilityState == AccessibilityState{}) { - accessibilityState = std::nullopt; - } - } - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-valuemax"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (value.hasType()) { - accessibilityValue.max = (int)value; - } - } else { - accessibilityValue.max = std::nullopt; - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-valuemin"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (value.hasType()) { - accessibilityValue.min = (int)value; - } - } else { - accessibilityValue.min = std::nullopt; - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-valuenow"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (value.hasType()) { - accessibilityValue.now = (int)value; - } - } else { - accessibilityValue.now = std::nullopt; - } - return; - } - case CONSTEXPR_RAW_PROPS_KEY_HASH("aria-valuetext"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - if (value.hasType()) { - accessibilityValue.text = (std::string)value; - } - } else { - accessibilityValue.text = std::nullopt; - } - return; - } } } diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.h b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.h index 625b71707174..c664b8461e2f 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/AccessibilityProps.h @@ -62,15 +62,6 @@ class AccessibilityProps { #if RN_DEBUG_STRING_CONVERTIBLE SharedDebugStringConvertibleList getDebugProps() const; #endif - - private: - // Canonical prop values for overlap detection between aria-* and - // accessibility* props. These track the values from the explicit - // accessibility* props, separate from any aria-* override. - std::string canonicalAccessibilityLabel_; - AccessibilityLiveRegion canonicalAccessibilityLiveRegion_{AccessibilityLiveRegion::None}; - ImportantForAccessibility canonicalImportantForAccessibility_{ImportantForAccessibility::Auto}; - bool canonicalAccessibilityElementsHidden_{false}; }; } // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp index f430a9570978..55ee399741cd 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp @@ -141,23 +141,7 @@ HostPlatformViewProps::HostPlatformViewProps( rawProps, "nextFocusUp", sourceProps.nextFocusUp, - {})) { - if (!ReactNativeFeatureFlags::enableCppPropsIteratorSetter()) { - if (ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - // tabIndex -> focusable - auto* tabIndexValue = rawProps.at("tabIndex", nullptr, nullptr); - if (tabIndexValue != nullptr) { - if (tabIndexValue->hasValue()) { - int tabIndex = 0; - fromRawValue(context, *tabIndexValue, tabIndex); - focusable = tabIndex == 0; - } else { - focusable = {}; - } - } - } - } -} + {})) {} #define VIEW_EVENT_CASE(eventType) \ case CONSTEXPR_RAW_PROPS_KEY_HASH("on" #eventType): { \ @@ -197,19 +181,6 @@ void HostPlatformViewProps::setProp( RAW_SET_PROP_SWITCH_CASE_BASIC(nextFocusLeft); RAW_SET_PROP_SWITCH_CASE_BASIC(nextFocusRight); RAW_SET_PROP_SWITCH_CASE_BASIC(nextFocusUp); - case CONSTEXPR_RAW_PROPS_KEY_HASH("tabIndex"): { - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - if (value.hasValue()) { - int tabIndex = 0; - fromRawValue(context, value, tabIndex); - focusable = tabIndex == 0; - } else { - focusable = defaults.focusable; - } - return; - } } } diff --git a/packages/react-native/ReactCommon/react/renderer/core/Props.cpp b/packages/react-native/ReactCommon/react/renderer/core/Props.cpp index 3b7d126bb6d7..f5553a117c6a 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/Props.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/Props.cpp @@ -33,19 +33,6 @@ void Props::initialize( ? sourceProps.nativeId : convertRawProp(context, rawProps, "nativeID", sourceProps.nativeId, {}); - if (!ReactNativeFeatureFlags::enableCppPropsIteratorSetter()) { - if (ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - // id -> nativeId - auto* idValue = rawProps.at("id", nullptr, nullptr); - if (idValue != nullptr) { - if (idValue->hasValue()) { - fromRawValue(context, *idValue, nativeId); - } else { - nativeId = {}; - } - } - } - } #ifdef RN_SERIALIZABLE_STATE if (!ReactNativeFeatureFlags::enableExclusivePropsUpdateAndroid()) { initializeDynamicProps(sourceProps, rawProps, filterObjectKeys); @@ -62,12 +49,6 @@ void Props::setProp( case CONSTEXPR_RAW_PROPS_KEY_HASH("nativeID"): fromRawValue(context, value, nativeId, {}); return; - case CONSTEXPR_RAW_PROPS_KEY_HASH("id"): - if (!ReactNativeFeatureFlags::enableNativeViewPropTransformations()) { - return; - } - fromRawValue(context, value, nativeId, {}); - return; } } diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index e930a4f00898..509ce27adbdb 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -472,17 +472,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'none', }, - enableNativeViewPropTransformations: { - defaultValue: false, - metadata: { - dateAdded: '2026-02-26', - description: - 'When enabled, View.js passes aria-*, id, and tabIndex props directly to native, relying on C++ prop parsing instead of JS-side transformations.', - expectedReleaseValue: true, - purpose: 'experimentation', - }, - ossReleaseStage: 'none', - }, enableNetworkEventReporting: { defaultValue: true, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index 9be1938a6448..7788c71c12e1 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<<349263e08085c42598f13da74ffbf584>> + * @generated SignedSource<<89d78c20b91f582c248ac49747f54d96>> * @flow strict * @noformat */ @@ -87,7 +87,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ enableModuleArgumentNSNullConversionIOS: Getter, enableMutationObserverByDefault: Getter, enableNativeCSSParsing: Getter, - enableNativeViewPropTransformations: Getter, enableNetworkEventReporting: Getter, enablePreparedTextLayout: Getter, enablePropsUpdateReconciliationAndroid: Getter, @@ -365,10 +364,6 @@ export const enableMutationObserverByDefault: Getter = createNativeFlag * Parse CSS strings using the Fabric CSS parser instead of ViewConfig processing */ export const enableNativeCSSParsing: Getter = createNativeFlagGetter('enableNativeCSSParsing', false); -/** - * When enabled, View.js passes aria-*, id, and tabIndex props directly to native, relying on C++ prop parsing instead of JS-side transformations. - */ -export const enableNativeViewPropTransformations: Getter = createNativeFlagGetter('enableNativeViewPropTransformations', false); /** * Enable network event reporting hooks in each native platform through `NetworkReporter` (Web Perf APIs + CDP). This flag should be combined with `fuseboxNetworkInspectionEnabled` to enable Network CDP debugging. */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index 77b4f560fdf2..e1d3f780b04c 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<<1fe579457854f95d09dd24e4578dbc65>> + * @generated SignedSource<<21f350a2add70d60dcd664d9c8fcb335>> * @flow strict * @noformat */ @@ -65,7 +65,6 @@ export interface Spec extends TurboModule { +enableModuleArgumentNSNullConversionIOS?: () => boolean; +enableMutationObserverByDefault?: () => boolean; +enableNativeCSSParsing?: () => boolean; - +enableNativeViewPropTransformations?: () => boolean; +enableNetworkEventReporting?: () => boolean; +enablePreparedTextLayout?: () => boolean; +enablePropsUpdateReconciliationAndroid?: () => boolean;