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 215d0b8cc47..81c00d0ef1e 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<<7385ae14a1980ddefd036ba808459a11>> + * @generated SignedSource<> */ /** @@ -172,12 +172,6 @@ public object ReactNativeFeatureFlags { @JvmStatic public fun enableViewRecyclingForView(): Boolean = accessor.enableViewRecyclingForView() - /** - * When enabled, rawProps in Props will not include Yoga specific props. - */ - @JvmStatic - public fun excludeYogaFromRawProps(): Boolean = accessor.excludeYogaFromRawProps() - /** * Fixes a bug in Differentiator where parent views may be referenced before they're created */ 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 052f85065e4..9b17c105a18 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<<33b79b398811a36129c3da6af16ff827>> + * @generated SignedSource<> */ /** @@ -44,7 +44,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces private var enableViewRecyclingCache: Boolean? = null private var enableViewRecyclingForTextCache: Boolean? = null private var enableViewRecyclingForViewCache: Boolean? = null - private var excludeYogaFromRawPropsCache: Boolean? = null private var fixDifferentiatorEmittingUpdatesWithWrongParentTagCache: Boolean? = null private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null private var fixMountingCoordinatorReportedPendingTransactionsOnAndroidCache: Boolean? = null @@ -279,15 +278,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces return cached } - override fun excludeYogaFromRawProps(): Boolean { - var cached = excludeYogaFromRawPropsCache - if (cached == null) { - cached = ReactNativeFeatureFlagsCxxInterop.excludeYogaFromRawProps() - excludeYogaFromRawPropsCache = cached - } - return cached - } - override fun fixDifferentiatorEmittingUpdatesWithWrongParentTag(): Boolean { var cached = fixDifferentiatorEmittingUpdatesWithWrongParentTagCache 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 e61103a64c1..f6477a227f5 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<<1e7421f38e1dd6629e42492b2c7a4ee1>> */ /** @@ -76,8 +76,6 @@ public object ReactNativeFeatureFlagsCxxInterop { @DoNotStrip @JvmStatic public external fun enableViewRecyclingForView(): Boolean - @DoNotStrip @JvmStatic public external fun excludeYogaFromRawProps(): Boolean - @DoNotStrip @JvmStatic public external fun fixDifferentiatorEmittingUpdatesWithWrongParentTag(): Boolean @DoNotStrip @JvmStatic public external fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): 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 b4eb9452d07..ca492be3ebc 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<<720cf7d788048f52cc3609c9c8a98e4a>> + * @generated SignedSource<<0f22538afea52085aaf605e8608eaff8>> */ /** @@ -71,8 +71,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi override fun enableViewRecyclingForView(): Boolean = true - override fun excludeYogaFromRawProps(): Boolean = false - override fun fixDifferentiatorEmittingUpdatesWithWrongParentTag(): Boolean = true override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): 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 24c5bd396f6..bfc297d89fa 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<> + * @generated SignedSource<<1693dced312625bbfedce5f2dfa9816c>> */ /** @@ -48,7 +48,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc private var enableViewRecyclingCache: Boolean? = null private var enableViewRecyclingForTextCache: Boolean? = null private var enableViewRecyclingForViewCache: Boolean? = null - private var excludeYogaFromRawPropsCache: Boolean? = null private var fixDifferentiatorEmittingUpdatesWithWrongParentTagCache: Boolean? = null private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null private var fixMountingCoordinatorReportedPendingTransactionsOnAndroidCache: Boolean? = null @@ -307,16 +306,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc return cached } - override fun excludeYogaFromRawProps(): Boolean { - var cached = excludeYogaFromRawPropsCache - if (cached == null) { - cached = currentProvider.excludeYogaFromRawProps() - accessedFeatureFlags.add("excludeYogaFromRawProps") - excludeYogaFromRawPropsCache = cached - } - return cached - } - override fun fixDifferentiatorEmittingUpdatesWithWrongParentTag(): Boolean { var cached = fixDifferentiatorEmittingUpdatesWithWrongParentTagCache 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 01f66bf4e3e..1be5ddf2db7 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<<9437aa04a250507b66bee88bd09a20eb>> + * @generated SignedSource<<2f2bbf0a92c3af728de6ea38dc374b94>> */ /** @@ -71,8 +71,6 @@ public interface ReactNativeFeatureFlagsProvider { @DoNotStrip public fun enableViewRecyclingForView(): Boolean - @DoNotStrip public fun excludeYogaFromRawProps(): Boolean - @DoNotStrip public fun fixDifferentiatorEmittingUpdatesWithWrongParentTag(): Boolean @DoNotStrip public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): 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 2a058be46d3..1131bc8acbb 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<<438925ebf728d365d208367b72de2135>> + * @generated SignedSource<<14c3186a1395a23befb73fc9da972de7>> */ /** @@ -183,12 +183,6 @@ class ReactNativeFeatureFlagsProviderHolder return method(javaProvider_); } - bool excludeYogaFromRawProps() override { - static const auto method = - getReactNativeFeatureFlagsProviderJavaClass()->getMethod("excludeYogaFromRawProps"); - return method(javaProvider_); - } - bool fixDifferentiatorEmittingUpdatesWithWrongParentTag() override { static const auto method = getReactNativeFeatureFlagsProviderJavaClass()->getMethod("fixDifferentiatorEmittingUpdatesWithWrongParentTag"); @@ -415,11 +409,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableViewRecyclingForView( return ReactNativeFeatureFlags::enableViewRecyclingForView(); } -bool JReactNativeFeatureFlagsCxxInterop::excludeYogaFromRawProps( - facebook::jni::alias_ref /*unused*/) { - return ReactNativeFeatureFlags::excludeYogaFromRawProps(); -} - bool JReactNativeFeatureFlagsCxxInterop::fixDifferentiatorEmittingUpdatesWithWrongParentTag( facebook::jni::alias_ref /*unused*/) { return ReactNativeFeatureFlags::fixDifferentiatorEmittingUpdatesWithWrongParentTag(); @@ -608,9 +597,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() { makeNativeMethod( "enableViewRecyclingForView", JReactNativeFeatureFlagsCxxInterop::enableViewRecyclingForView), - makeNativeMethod( - "excludeYogaFromRawProps", - JReactNativeFeatureFlagsCxxInterop::excludeYogaFromRawProps), makeNativeMethod( "fixDifferentiatorEmittingUpdatesWithWrongParentTag", JReactNativeFeatureFlagsCxxInterop::fixDifferentiatorEmittingUpdatesWithWrongParentTag), 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 eb77b4489be..b95d995bc49 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<<5edcb3baccc7a27525ba6ca43b2aab8a>> */ /** @@ -102,9 +102,6 @@ class JReactNativeFeatureFlagsCxxInterop static bool enableViewRecyclingForView( facebook::jni::alias_ref); - static bool excludeYogaFromRawProps( - facebook::jni::alias_ref); - static bool fixDifferentiatorEmittingUpdatesWithWrongParentTag( 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 5a7721d8bfc..23639ca4d33 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<<98c62bb40ef9c03af6e3e2d758cef7ec>> */ /** @@ -122,10 +122,6 @@ bool ReactNativeFeatureFlags::enableViewRecyclingForView() { return getAccessor().enableViewRecyclingForView(); } -bool ReactNativeFeatureFlags::excludeYogaFromRawProps() { - return getAccessor().excludeYogaFromRawProps(); -} - bool ReactNativeFeatureFlags::fixDifferentiatorEmittingUpdatesWithWrongParentTag() { return getAccessor().fixDifferentiatorEmittingUpdatesWithWrongParentTag(); } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h index c2e42f43934..72ddff55792 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<<4b900e66889d8f2effc015e24ccaf929>> + * @generated SignedSource<<452dc78526d49a23c5052bd1ecd130d2>> */ /** @@ -159,11 +159,6 @@ class ReactNativeFeatureFlags { */ RN_EXPORT static bool enableViewRecyclingForView(); - /** - * When enabled, rawProps in Props will not include Yoga specific props. - */ - RN_EXPORT static bool excludeYogaFromRawProps(); - /** * Fixes a bug in Differentiator where parent views may be referenced before they're created */ diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp index a4e2b04d146..e4b33b35fdc 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<<7f13688e9deae01bb9a66f3b037ed56a>> + * @generated SignedSource<> */ /** @@ -461,24 +461,6 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecyclingForView() { return flagValue.value(); } -bool ReactNativeFeatureFlagsAccessor::excludeYogaFromRawProps() { - auto flagValue = excludeYogaFromRawProps_.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(24, "excludeYogaFromRawProps"); - - flagValue = currentProvider_->excludeYogaFromRawProps(); - excludeYogaFromRawProps_ = flagValue; - } - - return flagValue.value(); -} - bool ReactNativeFeatureFlagsAccessor::fixDifferentiatorEmittingUpdatesWithWrongParentTag() { auto flagValue = fixDifferentiatorEmittingUpdatesWithWrongParentTag_.load(); @@ -488,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::fixDifferentiatorEmittingUpdatesWithWrongP // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(25, "fixDifferentiatorEmittingUpdatesWithWrongParentTag"); + markFlagAsAccessed(24, "fixDifferentiatorEmittingUpdatesWithWrongParentTag"); flagValue = currentProvider_->fixDifferentiatorEmittingUpdatesWithWrongParentTag(); fixDifferentiatorEmittingUpdatesWithWrongParentTag_ = flagValue; @@ -506,7 +488,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(26, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); + markFlagAsAccessed(25, "fixMappingOfEventPrioritiesBetweenFabricAndReact"); flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact(); fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue; @@ -524,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMountingCoordinatorReportedPendingTrans // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(27, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid"); + markFlagAsAccessed(26, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid"); flagValue = currentProvider_->fixMountingCoordinatorReportedPendingTransactionsOnAndroid(); fixMountingCoordinatorReportedPendingTransactionsOnAndroid_ = flagValue; @@ -542,7 +524,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(28, "fuseboxEnabledRelease"); + markFlagAsAccessed(27, "fuseboxEnabledRelease"); flagValue = currentProvider_->fuseboxEnabledRelease(); fuseboxEnabledRelease_ = flagValue; @@ -560,7 +542,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(29, "fuseboxNetworkInspectionEnabled"); + markFlagAsAccessed(28, "fuseboxNetworkInspectionEnabled"); flagValue = currentProvider_->fuseboxNetworkInspectionEnabled(); fuseboxNetworkInspectionEnabled_ = flagValue; @@ -578,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::lazyAnimationCallbacks() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(30, "lazyAnimationCallbacks"); + markFlagAsAccessed(29, "lazyAnimationCallbacks"); flagValue = currentProvider_->lazyAnimationCallbacks(); lazyAnimationCallbacks_ = flagValue; @@ -596,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::removeTurboModuleManagerDelegateMutex() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(31, "removeTurboModuleManagerDelegateMutex"); + markFlagAsAccessed(30, "removeTurboModuleManagerDelegateMutex"); flagValue = currentProvider_->removeTurboModuleManagerDelegateMutex(); removeTurboModuleManagerDelegateMutex_ = flagValue; @@ -614,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::throwExceptionInsteadOfDeadlockOnTurboModu // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(32, "throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS"); + markFlagAsAccessed(31, "throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS"); flagValue = currentProvider_->throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS(); throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS_ = flagValue; @@ -632,7 +614,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(33, "traceTurboModulePromiseRejectionsOnAndroid"); + markFlagAsAccessed(32, "traceTurboModulePromiseRejectionsOnAndroid"); flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid(); traceTurboModulePromiseRejectionsOnAndroid_ = flagValue; @@ -650,7 +632,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(34, "useAlwaysAvailableJSErrorHandling"); + markFlagAsAccessed(33, "useAlwaysAvailableJSErrorHandling"); flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling(); useAlwaysAvailableJSErrorHandling_ = flagValue; @@ -668,7 +650,7 @@ bool ReactNativeFeatureFlagsAccessor::useEditTextStockAndroidFocusBehavior() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(35, "useEditTextStockAndroidFocusBehavior"); + markFlagAsAccessed(34, "useEditTextStockAndroidFocusBehavior"); flagValue = currentProvider_->useEditTextStockAndroidFocusBehavior(); useEditTextStockAndroidFocusBehavior_ = flagValue; @@ -686,7 +668,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(36, "useFabricInterop"); + markFlagAsAccessed(35, "useFabricInterop"); flagValue = currentProvider_->useFabricInterop(); useFabricInterop_ = flagValue; @@ -704,7 +686,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(37, "useNativeViewConfigsInBridgelessMode"); + markFlagAsAccessed(36, "useNativeViewConfigsInBridgelessMode"); flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode(); useNativeViewConfigsInBridgelessMode_ = flagValue; @@ -722,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(38, "useOptimizedEventBatchingOnAndroid"); + markFlagAsAccessed(37, "useOptimizedEventBatchingOnAndroid"); flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid(); useOptimizedEventBatchingOnAndroid_ = flagValue; @@ -740,7 +722,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() { // be accessing the provider multiple times but the end state of this // instance and the returned flag value would be the same. - markFlagAsAccessed(39, "useRawPropsJsiValue"); + markFlagAsAccessed(38, "useRawPropsJsiValue"); flagValue = currentProvider_->useRawPropsJsiValue(); useRawPropsJsiValue_ = flagValue; @@ -758,7 +740,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(40, "useTurboModuleInterop"); + markFlagAsAccessed(39, "useTurboModuleInterop"); flagValue = currentProvider_->useTurboModuleInterop(); useTurboModuleInterop_ = flagValue; @@ -776,7 +758,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(41, "useTurboModules"); + markFlagAsAccessed(40, "useTurboModules"); flagValue = currentProvider_->useTurboModules(); useTurboModules_ = flagValue; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h index 8676fe00d25..25ec36b18d1 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<<4e1004375c9baf18799712865c345be5>> + * @generated SignedSource<> */ /** @@ -56,7 +56,6 @@ class ReactNativeFeatureFlagsAccessor { bool enableViewRecycling(); bool enableViewRecyclingForText(); bool enableViewRecyclingForView(); - bool excludeYogaFromRawProps(); bool fixDifferentiatorEmittingUpdatesWithWrongParentTag(); bool fixMappingOfEventPrioritiesBetweenFabricAndReact(); bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid(); @@ -85,7 +84,7 @@ class ReactNativeFeatureFlagsAccessor { std::unique_ptr currentProvider_; bool wasOverridden_; - std::array, 42> accessedFeatureFlags_; + std::array, 41> accessedFeatureFlags_; std::atomic> commonTestFlag_; std::atomic> disableMountItemReorderingAndroid_; @@ -111,7 +110,6 @@ class ReactNativeFeatureFlagsAccessor { std::atomic> enableViewRecycling_; std::atomic> enableViewRecyclingForText_; std::atomic> enableViewRecyclingForView_; - std::atomic> excludeYogaFromRawProps_; std::atomic> fixDifferentiatorEmittingUpdatesWithWrongParentTag_; std::atomic> fixMappingOfEventPrioritiesBetweenFabricAndReact_; std::atomic> fixMountingCoordinatorReportedPendingTransactionsOnAndroid_; diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h index 23a81ae0fd1..844da14bea7 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<<8a8ab98861bae26f9b560a91cbb81626>> + * @generated SignedSource<<132471a831b3041cc6cae8915de33982>> */ /** @@ -123,10 +123,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider { return true; } - bool excludeYogaFromRawProps() override { - return false; - } - bool fixDifferentiatorEmittingUpdatesWithWrongParentTag() override { return true; } diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h index 16926befbf6..a628c82a4ce 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<<52f682b1103d4ff9444da86525f088bb>> + * @generated SignedSource<> */ /** @@ -261,15 +261,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef return ReactNativeFeatureFlagsDefaults::enableViewRecyclingForView(); } - bool excludeYogaFromRawProps() override { - auto value = values_["excludeYogaFromRawProps"]; - if (!value.isNull()) { - return value.getBool(); - } - - return ReactNativeFeatureFlagsDefaults::excludeYogaFromRawProps(); - } - bool fixDifferentiatorEmittingUpdatesWithWrongParentTag() override { auto value = values_["fixDifferentiatorEmittingUpdatesWithWrongParentTag"]; if (!value.isNull()) { diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h index a3c015fe969..9237e69e41d 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.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<<825e61e4b94a95c4700a52a1d9cadb74>> + * @generated SignedSource<<7bd8ef01ed492807df85a3d4a7f6a55c>> */ /** @@ -98,8 +98,6 @@ class ReactNativeFeatureFlagsOverridesOSSCanary : public ReactNativeFeatureFlags - - diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h index 0d63daa28ba..aca1e3fe4b2 100644 --- a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h +++ b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.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<<25f75edcfc62e5ce24c2d1bd10244e40>> */ /** @@ -105,8 +105,6 @@ class ReactNativeFeatureFlagsOverridesOSSExperimental : public ReactNativeFeatur - - diff --git a/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h b/packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h index 3e12f03b74b..263c9d01f48 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<> + * @generated SignedSource<> */ /** @@ -49,7 +49,6 @@ class ReactNativeFeatureFlagsProvider { virtual bool enableViewRecycling() = 0; virtual bool enableViewRecyclingForText() = 0; virtual bool enableViewRecyclingForView() = 0; - virtual bool excludeYogaFromRawProps() = 0; virtual bool fixDifferentiatorEmittingUpdatesWithWrongParentTag() = 0; virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact() = 0; virtual bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid() = 0; diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp index f701c52ce8e..f4c6259cb76 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<> + * @generated SignedSource<<2e88c46eee92923e11e44bc63a297f91>> */ /** @@ -164,11 +164,6 @@ bool NativeReactNativeFeatureFlags::enableViewRecyclingForView( return ReactNativeFeatureFlags::enableViewRecyclingForView(); } -bool NativeReactNativeFeatureFlags::excludeYogaFromRawProps( - jsi::Runtime& /*runtime*/) { - return ReactNativeFeatureFlags::excludeYogaFromRawProps(); -} - bool NativeReactNativeFeatureFlags::fixDifferentiatorEmittingUpdatesWithWrongParentTag( jsi::Runtime& /*runtime*/) { return ReactNativeFeatureFlags::fixDifferentiatorEmittingUpdatesWithWrongParentTag(); diff --git a/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h b/packages/react-native/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h index 35af9b3ae8d..daf6d3cfd14 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<<1a82faa89018f5722a57fe5098b69324>> + * @generated SignedSource<<976dc1d9e9df5d843d796ba71fab2e27>> */ /** @@ -85,8 +85,6 @@ class NativeReactNativeFeatureFlags bool enableViewRecyclingForView(jsi::Runtime& runtime); - bool excludeYogaFromRawProps(jsi::Runtime& runtime); - bool fixDifferentiatorEmittingUpdatesWithWrongParentTag(jsi::Runtime& runtime); bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime& runtime); diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp index cc3234eaf71..c35c0b5ac6e 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp @@ -25,8 +25,6 @@ namespace facebook::react { -static_assert(RawPropsFilterable); - static int FabricDefaultYogaLog( const YGConfigConstRef /*unused*/, const YGNodeConstRef /*unused*/, @@ -785,13 +783,6 @@ Rect YogaLayoutableShadowNode::getContentBounds() const { return contentBounds; } -/*static*/ void YogaLayoutableShadowNode::filterRawProps(RawProps& rawProps) { - if (ReactNativeFeatureFlags::excludeYogaFromRawProps()) { - // TODO: this shouldn't live in RawProps - rawProps.filterYogaStylePropsInDynamicConversion(); - } -} - #pragma mark - Yoga Connectors YGNodeRef YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector( diff --git a/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h b/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h index 4c1c5a02a2b..4bba73ddf04 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h +++ b/packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h @@ -85,8 +85,6 @@ class YogaLayoutableShadowNode : public LayoutableShadowNode { Rect getContentBounds() const; - static void filterRawProps(RawProps& rawProps); - protected: /* * Yoga config associated (only) with this particular node. diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawProps.cpp b/packages/react-native/ReactCommon/react/renderer/core/RawProps.cpp index 7ed03caffe9..725d68ff371 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/RawProps.cpp @@ -14,96 +14,6 @@ namespace facebook::react { -namespace { -inline bool isYogaStyleProp(const std::string& prop) { - const static std::unordered_set yogaStylePropNames = { - {"direction", - "flexDirection", - "justifyContent", - "alignContent", - "alignItems", - "alignSelf", - "position", - "flexWrap", - "display", - "flex", - "flexGrow", - "flexShrink", - "flexBasis", - "margin", - "padding", - "rowGap", - "columnGap", - "gap", - // TODO: T163711275 also filter out width/height when SVG no longer read - // them from RawProps - "minWidth", - "maxWidth", - "minHeight", - "maxHeight", - "aspectRatio", - - // edges - "left", - "right", - "top", - "bottom", - "start", - "end", - - // variants of inset - "inset", - "insetStart", - "insetEnd", - "insetInline", - "insetInlineStart", - "insetInlineEnd", - "insetBlock", - "insetBlockEnd", - "insetBlockStart", - "insetVertical", - "insetHorizontal", - "insetTop", - "insetBottom", - "insetLeft", - "insetRight", - - // variants of margin - "marginStart", - "marginEnd", - "marginInline", - "marginInlineStart", - "marginInlineEnd", - "marginBlock", - "marginBlockStart", - "marginBlockEnd", - "marginVertical", - "marginHorizontal", - "marginTop", - "marginBottom", - "marginLeft", - "marginRight", - - // variants of padding - "paddingStart", - "paddingEnd", - "paddingInline", - "paddingInlineStart", - "paddingInlineEnd", - "paddingBlock", - "paddingBlockStart", - "paddingBlockEnd", - "paddingVertical", - "paddingHorizontal", - "paddingTop", - "paddingBottom", - "paddingLeft", - "paddingRight"}}; - - return yogaStylePropNames.find(prop) != yogaStylePropNames.end(); -} -} // namespace - /* * Creates an object with given `runtime` and `value`. */ @@ -142,7 +52,6 @@ RawProps::RawProps(const RawProps& other) noexcept { } else if (mode_ == Mode::Dynamic) { dynamic_ = other.dynamic_; } - ignoreYogaStyleProps_ = other.ignoreYogaStyleProps_; } void RawProps::parse(const RawPropsParser& parser) noexcept { @@ -171,13 +80,10 @@ folly::dynamic RawProps::toDynamic( case Mode::Empty: return folly::dynamic::object(); case Mode::JSI: { - if (ignoreYogaStyleProps_ || filterObjectKeys != nullptr) { + if (filterObjectKeys != nullptr) { // We need to filter props return jsi::dynamicFromValue( *runtime_, value_, [&](const std::string& key) { - if (ignoreYogaStyleProps_ && isYogaStyleProp(key)) { - return true; - } if (filterObjectKeys) { return filterObjectKeys(key); } @@ -193,10 +99,6 @@ folly::dynamic RawProps::toDynamic( } } -void RawProps::filterYogaStylePropsInDynamicConversion() noexcept { - ignoreYogaStyleProps_ = true; -} - /* * Returns `true` if the object is empty. * Empty `RawProps` does not have any stored data. diff --git a/packages/react-native/ReactCommon/react/renderer/core/RawProps.h b/packages/react-native/ReactCommon/react/renderer/core/RawProps.h index efe63e927be..31f15a3eaf2 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/RawProps.h +++ b/packages/react-native/ReactCommon/react/renderer/core/RawProps.h @@ -82,15 +82,6 @@ class RawProps final { const std::function& filterObjectKeys = nullptr) const; - /* - * Once called, Yoga style props will be filtered out during conversion to - * folly::dynamic. folly::dynamic conversion is only used on Android and props - * specific to Yoga do not need to be send over JNI to Android. - * This is a performance optimisation to minimise traffic between C++ and - * Java. - */ - void filterYogaStylePropsInDynamicConversion() noexcept; - /* * Returns `true` if the object is empty. * Empty `RawProps` does not have any stored data. @@ -135,8 +126,6 @@ class RawProps final { */ mutable std::vector keyIndexToValueIndex_; mutable std::vector values_; - - bool ignoreYogaStyleProps_{false}; }; /* diff --git a/packages/react-native/ReactCommon/react/renderer/core/tests/RawPropsTest.cpp b/packages/react-native/ReactCommon/react/renderer/core/tests/RawPropsTest.cpp index 5326feafad9..2986409989e 100644 --- a/packages/react-native/ReactCommon/react/renderer/core/tests/RawPropsTest.cpp +++ b/packages/react-native/ReactCommon/react/renderer/core/tests/RawPropsTest.cpp @@ -464,39 +464,3 @@ TEST(RawPropsTest, copyJSIRawProps) { EXPECT_NEAR( copyProps->derivedFloatValue, originalProps->derivedFloatValue, 0.00001); } - -TEST(RawPropsTest, filterYogaRawProps) { - auto runtime = facebook::hermes::makeHermesRuntime(); - - ContextContainer contextContainer{}; - PropsParserContext parserContext{-1, contextContainer}; - - auto object = jsi::Object(*runtime); - object.setProperty(*runtime, "floatValue", 10.0); - object.setProperty(*runtime, "flex", 1); - - auto rawProps = RawProps(*runtime, jsi::Value(*runtime, object)); - - EXPECT_FALSE(rawProps.isEmpty()); - - auto dynamicProps = (folly::dynamic)rawProps; - - EXPECT_EQ(dynamicProps["floatValue"], 10.0); - EXPECT_EQ(dynamicProps["flex"], 1); - - rawProps.filterYogaStylePropsInDynamicConversion(); - - dynamicProps = (folly::dynamic)rawProps; - - EXPECT_EQ(dynamicProps["floatValue"], 10.0); - EXPECT_EQ(dynamicProps["flex"], nullptr); - - // The fact that filterYogaStylePropsInDynamicConversion should - // must apply to a copy as well. - auto copy = RawProps(rawProps); - - auto dynamicPropsFromCopy = (folly::dynamic)copy; - - EXPECT_EQ(dynamicPropsFromCopy["floatValue"], 10.0); - EXPECT_EQ(dynamicPropsFromCopy["flex"], nullptr); -} diff --git a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js index d2e090ec1b1..750ef7673da 100644 --- a/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js +++ b/packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js @@ -301,17 +301,6 @@ const definitions: FeatureFlagDefinitions = { }, ossReleaseStage: 'none', }, - excludeYogaFromRawProps: { - defaultValue: false, - metadata: { - dateAdded: '2024-07-22', - description: - 'When enabled, rawProps in Props will not include Yoga specific props.', - expectedReleaseValue: true, - purpose: 'experimentation', - }, - ossReleaseStage: 'none', - }, fixDifferentiatorEmittingUpdatesWithWrongParentTag: { defaultValue: true, metadata: { diff --git a/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/ReactNativeFeatureFlags.js index a876989ea73..071aece80eb 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<<28bf0120b44887b9cf23eeca6afdd945>> + * @generated SignedSource<<4f1befe0cec24eeb531d7ecca6bc451b>> * @flow strict */ @@ -72,7 +72,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{ enableViewRecycling: Getter, enableViewRecyclingForText: Getter, enableViewRecyclingForView: Getter, - excludeYogaFromRawProps: Getter, fixDifferentiatorEmittingUpdatesWithWrongParentTag: Getter, fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter, fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter, @@ -262,10 +261,6 @@ export const enableViewRecyclingForText: Getter = createNativeFlagGette * Enables View Recycling for via ReactViewGroup/ReactViewManager. */ export const enableViewRecyclingForView: Getter = createNativeFlagGetter('enableViewRecyclingForView', true); -/** - * When enabled, rawProps in Props will not include Yoga specific props. - */ -export const excludeYogaFromRawProps: Getter = createNativeFlagGetter('excludeYogaFromRawProps', false); /** * Fixes a bug in Differentiator where parent views may be referenced before they're created */ diff --git a/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js b/packages/react-native/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js index a94502b6db2..55a635d3de4 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<> + * @generated SignedSource<> * @flow strict */ @@ -48,7 +48,6 @@ export interface Spec extends TurboModule { +enableViewRecycling?: () => boolean; +enableViewRecyclingForText?: () => boolean; +enableViewRecyclingForView?: () => boolean; - +excludeYogaFromRawProps?: () => boolean; +fixDifferentiatorEmittingUpdatesWithWrongParentTag?: () => boolean; +fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean; +fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean;