diff --git a/change/react-native-windows-b76bd659-a9fd-4078-b2f6-9ec7e8fd7663.json b/change/react-native-windows-b76bd659-a9fd-4078-b2f6-9ec7e8fd7663.json new file mode 100644 index 00000000000..14a8e0c679d --- /dev/null +++ b/change/react-native-windows-b76bd659-a9fd-4078-b2f6-9ec7e8fd7663.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Fix double onChange event in Fabric TextInput by checking m_comingFromState", + "packageName": "react-native-windows", + "email": "198982749+Copilot@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp index 348be04ac8a..6633a1e907f 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp @@ -1283,7 +1283,7 @@ void WindowsTextInputComponentView::OnTextUpdated() noexcept { m_state->updateState(std::move(data)); - if (m_eventEmitter && !m_comingFromJS) { + if (m_eventEmitter && !m_comingFromJS && !m_comingFromState) { // call onChange event auto emitter = std::static_pointer_cast(m_eventEmitter); facebook::react::WindowsTextInputEventEmitter::OnChange onChangeArgs; diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h index c16db25e250..72c38144398 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h @@ -98,7 +98,6 @@ struct WindowsTextInputComponentView void UpdateText(const std::string &str) noexcept; void OnTextUpdated() noexcept; void OnSelectionChanged(LONG start, LONG end) noexcept; - std::pair GetContentSize() const noexcept; std::string GetTextFromRichEdit() const noexcept; void updateCursorColor( const facebook::react::SharedColor &cursorColor, diff --git a/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h b/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h index 363987bd4fe..dd43b8b1c01 100644 --- a/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h +++ b/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h @@ -20,35 +20,35 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS SyncMethod{0, L"commonTestFlag"}, SyncMethod{1, L"commonTestFlagWithoutNativeImplementation"}, SyncMethod{2, L"animatedShouldSignalBatch"}, - SyncMethod{3, L"cxxNativeAnimatedEnabled"}, - SyncMethod{4, L"disableMountItemReorderingAndroid"}, - SyncMethod{5, L"enableAccumulatedUpdatesInRawPropsAndroid"}, - SyncMethod{6, L"enableBridgelessArchitecture"}, - SyncMethod{7, L"enableCppPropsIteratorSetter"}, - SyncMethod{8, L"enableEagerRootViewAttachment"}, - SyncMethod{9, L"enableFabricLogs"}, - SyncMethod{10, L"enableFabricRenderer"}, - SyncMethod{11, L"enableIOSViewClipToPaddingBox"}, - SyncMethod{12, L"enableImagePrefetchingAndroid"}, - SyncMethod{13, L"enableJSRuntimeGCOnMemoryPressureOnIOS"}, - SyncMethod{14, L"enableLayoutAnimationsOnAndroid"}, - SyncMethod{15, L"enableLayoutAnimationsOnIOS"}, - SyncMethod{16, L"enableLongTaskAPI"}, - SyncMethod{17, L"enableMainQueueModulesOnIOS"}, - SyncMethod{18, L"enableNativeCSSParsing"}, - SyncMethod{19, L"enableNewBackgroundAndBorderDrawables"}, - SyncMethod{20, L"enablePropsUpdateReconciliationAndroid"}, - SyncMethod{21, L"enableReportEventPaintTime"}, - SyncMethod{22, L"enableSynchronousStateUpdates"}, - SyncMethod{23, L"enableUIConsistency"}, - SyncMethod{24, L"enableViewCulling"}, - SyncMethod{25, L"enableViewRecycling"}, - SyncMethod{26, L"enableViewRecyclingForText"}, - SyncMethod{27, L"enableViewRecyclingForView"}, - SyncMethod{28, L"fixMappingOfEventPrioritiesBetweenFabricAndReact"}, - SyncMethod{29, L"fixMountingCoordinatorReportedPendingTransactionsOnAndroid"}, - SyncMethod{30, L"fuseboxEnabledRelease"}, - SyncMethod{31, L"fuseboxNetworkInspectionEnabled"}, + SyncMethod{3, L"disableMountItemReorderingAndroid"}, + SyncMethod{4, L"enableAccumulatedUpdatesInRawPropsAndroid"}, + SyncMethod{5, L"enableBridgelessArchitecture"}, + SyncMethod{6, L"enableCppPropsIteratorSetter"}, + SyncMethod{7, L"enableEagerRootViewAttachment"}, + SyncMethod{8, L"enableFabricLogs"}, + SyncMethod{9, L"enableFabricRenderer"}, + SyncMethod{10, L"enableIOSViewClipToPaddingBox"}, + SyncMethod{11, L"enableImagePrefetchingAndroid"}, + SyncMethod{12, L"enableJSRuntimeGCOnMemoryPressureOnIOS"}, + SyncMethod{13, L"enableLayoutAnimationsOnAndroid"}, + SyncMethod{14, L"enableLayoutAnimationsOnIOS"}, + SyncMethod{15, L"enableLongTaskAPI"}, + SyncMethod{16, L"enableNativeCSSParsing"}, + SyncMethod{17, L"enableNewBackgroundAndBorderDrawables"}, + SyncMethod{18, L"enablePropsUpdateReconciliationAndroid"}, + SyncMethod{19, L"enableReportEventPaintTime"}, + SyncMethod{20, L"enableSynchronousStateUpdates"}, + SyncMethod{21, L"enableUIConsistency"}, + SyncMethod{22, L"enableViewCulling"}, + SyncMethod{23, L"enableViewRecycling"}, + SyncMethod{24, L"enableViewRecyclingForText"}, + SyncMethod{25, L"enableViewRecyclingForView"}, + SyncMethod{26, L"fixDifferentiatorEmittingUpdatesWithWrongParentTag"}, + SyncMethod{27, L"fixMappingOfEventPrioritiesBetweenFabricAndReact"}, + SyncMethod{28, L"fixMountingCoordinatorReportedPendingTransactionsOnAndroid"}, + SyncMethod{29, L"fuseboxEnabledRelease"}, + SyncMethod{30, L"fuseboxNetworkInspectionEnabled"}, + SyncMethod{31, L"lazyAnimationCallbacks"}, SyncMethod{32, L"removeTurboModuleManagerDelegateMutex"}, SyncMethod{33, L"throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS"}, SyncMethod{34, L"traceTurboModulePromiseRejectionsOnAndroid"}, @@ -83,149 +83,149 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS " REACT_SYNC_METHOD(animatedShouldSignalBatch) static bool animatedShouldSignalBatch() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 3, - "cxxNativeAnimatedEnabled", - " REACT_SYNC_METHOD(cxxNativeAnimatedEnabled) bool cxxNativeAnimatedEnabled() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(cxxNativeAnimatedEnabled) static bool cxxNativeAnimatedEnabled() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, "disableMountItemReorderingAndroid", " REACT_SYNC_METHOD(disableMountItemReorderingAndroid) bool disableMountItemReorderingAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(disableMountItemReorderingAndroid) static bool disableMountItemReorderingAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 5, + 4, "enableAccumulatedUpdatesInRawPropsAndroid", " REACT_SYNC_METHOD(enableAccumulatedUpdatesInRawPropsAndroid) bool enableAccumulatedUpdatesInRawPropsAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableAccumulatedUpdatesInRawPropsAndroid) static bool enableAccumulatedUpdatesInRawPropsAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 6, + 5, "enableBridgelessArchitecture", " REACT_SYNC_METHOD(enableBridgelessArchitecture) bool enableBridgelessArchitecture() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableBridgelessArchitecture) static bool enableBridgelessArchitecture() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 7, + 6, "enableCppPropsIteratorSetter", " REACT_SYNC_METHOD(enableCppPropsIteratorSetter) bool enableCppPropsIteratorSetter() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableCppPropsIteratorSetter) static bool enableCppPropsIteratorSetter() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 8, + 7, "enableEagerRootViewAttachment", " REACT_SYNC_METHOD(enableEagerRootViewAttachment) bool enableEagerRootViewAttachment() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableEagerRootViewAttachment) static bool enableEagerRootViewAttachment() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 9, + 8, "enableFabricLogs", " REACT_SYNC_METHOD(enableFabricLogs) bool enableFabricLogs() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableFabricLogs) static bool enableFabricLogs() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 10, + 9, "enableFabricRenderer", " REACT_SYNC_METHOD(enableFabricRenderer) bool enableFabricRenderer() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableFabricRenderer) static bool enableFabricRenderer() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 11, + 10, "enableIOSViewClipToPaddingBox", " REACT_SYNC_METHOD(enableIOSViewClipToPaddingBox) bool enableIOSViewClipToPaddingBox() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableIOSViewClipToPaddingBox) static bool enableIOSViewClipToPaddingBox() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 12, + 11, "enableImagePrefetchingAndroid", " REACT_SYNC_METHOD(enableImagePrefetchingAndroid) bool enableImagePrefetchingAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableImagePrefetchingAndroid) static bool enableImagePrefetchingAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 13, + 12, "enableJSRuntimeGCOnMemoryPressureOnIOS", " REACT_SYNC_METHOD(enableJSRuntimeGCOnMemoryPressureOnIOS) bool enableJSRuntimeGCOnMemoryPressureOnIOS() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableJSRuntimeGCOnMemoryPressureOnIOS) static bool enableJSRuntimeGCOnMemoryPressureOnIOS() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 14, + 13, "enableLayoutAnimationsOnAndroid", " REACT_SYNC_METHOD(enableLayoutAnimationsOnAndroid) bool enableLayoutAnimationsOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableLayoutAnimationsOnAndroid) static bool enableLayoutAnimationsOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 15, + 14, "enableLayoutAnimationsOnIOS", " REACT_SYNC_METHOD(enableLayoutAnimationsOnIOS) bool enableLayoutAnimationsOnIOS() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableLayoutAnimationsOnIOS) static bool enableLayoutAnimationsOnIOS() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 16, + 15, "enableLongTaskAPI", " REACT_SYNC_METHOD(enableLongTaskAPI) bool enableLongTaskAPI() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableLongTaskAPI) static bool enableLongTaskAPI() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 17, - "enableMainQueueModulesOnIOS", - " REACT_SYNC_METHOD(enableMainQueueModulesOnIOS) bool enableMainQueueModulesOnIOS() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableMainQueueModulesOnIOS) static bool enableMainQueueModulesOnIOS() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 18, + 16, "enableNativeCSSParsing", " REACT_SYNC_METHOD(enableNativeCSSParsing) bool enableNativeCSSParsing() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableNativeCSSParsing) static bool enableNativeCSSParsing() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 19, + 17, "enableNewBackgroundAndBorderDrawables", " REACT_SYNC_METHOD(enableNewBackgroundAndBorderDrawables) bool enableNewBackgroundAndBorderDrawables() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableNewBackgroundAndBorderDrawables) static bool enableNewBackgroundAndBorderDrawables() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 20, + 18, "enablePropsUpdateReconciliationAndroid", " REACT_SYNC_METHOD(enablePropsUpdateReconciliationAndroid) bool enablePropsUpdateReconciliationAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enablePropsUpdateReconciliationAndroid) static bool enablePropsUpdateReconciliationAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 21, + 19, "enableReportEventPaintTime", " REACT_SYNC_METHOD(enableReportEventPaintTime) bool enableReportEventPaintTime() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableReportEventPaintTime) static bool enableReportEventPaintTime() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 22, + 20, "enableSynchronousStateUpdates", " REACT_SYNC_METHOD(enableSynchronousStateUpdates) bool enableSynchronousStateUpdates() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableSynchronousStateUpdates) static bool enableSynchronousStateUpdates() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 23, + 21, "enableUIConsistency", " REACT_SYNC_METHOD(enableUIConsistency) bool enableUIConsistency() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableUIConsistency) static bool enableUIConsistency() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 24, + 22, "enableViewCulling", " REACT_SYNC_METHOD(enableViewCulling) bool enableViewCulling() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableViewCulling) static bool enableViewCulling() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 25, + 23, "enableViewRecycling", " REACT_SYNC_METHOD(enableViewRecycling) bool enableViewRecycling() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableViewRecycling) static bool enableViewRecycling() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 26, + 24, "enableViewRecyclingForText", " REACT_SYNC_METHOD(enableViewRecyclingForText) bool enableViewRecyclingForText() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableViewRecyclingForText) static bool enableViewRecyclingForText() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 27, + 25, "enableViewRecyclingForView", " REACT_SYNC_METHOD(enableViewRecyclingForView) bool enableViewRecyclingForView() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableViewRecyclingForView) static bool enableViewRecyclingForView() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 28, + 26, + "fixDifferentiatorEmittingUpdatesWithWrongParentTag", + " REACT_SYNC_METHOD(fixDifferentiatorEmittingUpdatesWithWrongParentTag) bool fixDifferentiatorEmittingUpdatesWithWrongParentTag() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(fixDifferentiatorEmittingUpdatesWithWrongParentTag) static bool fixDifferentiatorEmittingUpdatesWithWrongParentTag() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 27, "fixMappingOfEventPrioritiesBetweenFabricAndReact", " REACT_SYNC_METHOD(fixMappingOfEventPrioritiesBetweenFabricAndReact) bool fixMappingOfEventPrioritiesBetweenFabricAndReact() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fixMappingOfEventPrioritiesBetweenFabricAndReact) static bool fixMappingOfEventPrioritiesBetweenFabricAndReact() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 29, + 28, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid", " REACT_SYNC_METHOD(fixMountingCoordinatorReportedPendingTransactionsOnAndroid) bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fixMountingCoordinatorReportedPendingTransactionsOnAndroid) static bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 30, + 29, "fuseboxEnabledRelease", " REACT_SYNC_METHOD(fuseboxEnabledRelease) bool fuseboxEnabledRelease() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fuseboxEnabledRelease) static bool fuseboxEnabledRelease() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 31, + 30, "fuseboxNetworkInspectionEnabled", " REACT_SYNC_METHOD(fuseboxNetworkInspectionEnabled) bool fuseboxNetworkInspectionEnabled() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fuseboxNetworkInspectionEnabled) static bool fuseboxNetworkInspectionEnabled() noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 31, + "lazyAnimationCallbacks", + " REACT_SYNC_METHOD(lazyAnimationCallbacks) bool lazyAnimationCallbacks() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(lazyAnimationCallbacks) static bool lazyAnimationCallbacks() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 32, "removeTurboModuleManagerDelegateMutex", diff --git a/vnext/codegen/rnwcoreJSI-generated.cpp b/vnext/codegen/rnwcoreJSI-generated.cpp index 1982057dd34..a00b4a1bb74 100644 --- a/vnext/codegen/rnwcoreJSI-generated.cpp +++ b/vnext/codegen/rnwcoreJSI-generated.cpp @@ -26,11 +26,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_animate rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->cxxNativeAnimatedEnabled( - rt - ); -} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableMountItemReorderingAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->disableMountItemReorderingAndroid( rt @@ -96,11 +91,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableL rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableMainQueueModulesOnIOS(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableMainQueueModulesOnIOS( - rt - ); -} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNativeCSSParsing(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->enableNativeCSSParsing( rt @@ -151,6 +141,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableV rt ); } +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixDifferentiatorEmittingUpdatesWithWrongParentTag(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->fixDifferentiatorEmittingUpdatesWithWrongParentTag( + rt + ); +} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->fixMappingOfEventPrioritiesBetweenFabricAndReact( rt @@ -171,6 +166,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fusebox rt ); } +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_lazyAnimationCallbacks(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->lazyAnimationCallbacks( + rt + ); +} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_removeTurboModuleManagerDelegateMutex(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->removeTurboModuleManagerDelegateMutex( rt @@ -232,7 +232,6 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI methodMap_["commonTestFlag"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlag}; methodMap_["commonTestFlagWithoutNativeImplementation"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlagWithoutNativeImplementation}; methodMap_["animatedShouldSignalBatch"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_animatedShouldSignalBatch}; - methodMap_["cxxNativeAnimatedEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_cxxNativeAnimatedEnabled}; methodMap_["disableMountItemReorderingAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableMountItemReorderingAndroid}; methodMap_["enableAccumulatedUpdatesInRawPropsAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableAccumulatedUpdatesInRawPropsAndroid}; methodMap_["enableBridgelessArchitecture"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableBridgelessArchitecture}; @@ -246,7 +245,6 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI methodMap_["enableLayoutAnimationsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLayoutAnimationsOnAndroid}; methodMap_["enableLayoutAnimationsOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLayoutAnimationsOnIOS}; methodMap_["enableLongTaskAPI"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableLongTaskAPI}; - methodMap_["enableMainQueueModulesOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableMainQueueModulesOnIOS}; methodMap_["enableNativeCSSParsing"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNativeCSSParsing}; methodMap_["enableNewBackgroundAndBorderDrawables"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableNewBackgroundAndBorderDrawables}; methodMap_["enablePropsUpdateReconciliationAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enablePropsUpdateReconciliationAndroid}; @@ -257,10 +255,12 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI methodMap_["enableViewRecycling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecycling}; methodMap_["enableViewRecyclingForText"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForText}; methodMap_["enableViewRecyclingForView"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecyclingForView}; + methodMap_["fixDifferentiatorEmittingUpdatesWithWrongParentTag"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixDifferentiatorEmittingUpdatesWithWrongParentTag}; methodMap_["fixMappingOfEventPrioritiesBetweenFabricAndReact"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMappingOfEventPrioritiesBetweenFabricAndReact}; methodMap_["fixMountingCoordinatorReportedPendingTransactionsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMountingCoordinatorReportedPendingTransactionsOnAndroid}; methodMap_["fuseboxEnabledRelease"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxEnabledRelease}; methodMap_["fuseboxNetworkInspectionEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxNetworkInspectionEnabled}; + methodMap_["lazyAnimationCallbacks"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_lazyAnimationCallbacks}; methodMap_["removeTurboModuleManagerDelegateMutex"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_removeTurboModuleManagerDelegateMutex}; methodMap_["throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS}; methodMap_["traceTurboModulePromiseRejectionsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_traceTurboModulePromiseRejectionsOnAndroid}; diff --git a/vnext/codegen/rnwcoreJSI.h b/vnext/codegen/rnwcoreJSI.h index 086b035e91d..be9d85a1794 100644 --- a/vnext/codegen/rnwcoreJSI.h +++ b/vnext/codegen/rnwcoreJSI.h @@ -23,7 +23,6 @@ namespace facebook::react { virtual bool commonTestFlag(jsi::Runtime &rt) = 0; virtual bool commonTestFlagWithoutNativeImplementation(jsi::Runtime &rt) = 0; virtual bool animatedShouldSignalBatch(jsi::Runtime &rt) = 0; - virtual bool cxxNativeAnimatedEnabled(jsi::Runtime &rt) = 0; virtual bool disableMountItemReorderingAndroid(jsi::Runtime &rt) = 0; virtual bool enableAccumulatedUpdatesInRawPropsAndroid(jsi::Runtime &rt) = 0; virtual bool enableBridgelessArchitecture(jsi::Runtime &rt) = 0; @@ -37,7 +36,6 @@ namespace facebook::react { virtual bool enableLayoutAnimationsOnAndroid(jsi::Runtime &rt) = 0; virtual bool enableLayoutAnimationsOnIOS(jsi::Runtime &rt) = 0; virtual bool enableLongTaskAPI(jsi::Runtime &rt) = 0; - virtual bool enableMainQueueModulesOnIOS(jsi::Runtime &rt) = 0; virtual bool enableNativeCSSParsing(jsi::Runtime &rt) = 0; virtual bool enableNewBackgroundAndBorderDrawables(jsi::Runtime &rt) = 0; virtual bool enablePropsUpdateReconciliationAndroid(jsi::Runtime &rt) = 0; @@ -48,10 +46,12 @@ namespace facebook::react { virtual bool enableViewRecycling(jsi::Runtime &rt) = 0; virtual bool enableViewRecyclingForText(jsi::Runtime &rt) = 0; virtual bool enableViewRecyclingForView(jsi::Runtime &rt) = 0; + virtual bool fixDifferentiatorEmittingUpdatesWithWrongParentTag(jsi::Runtime &rt) = 0; virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) = 0; virtual bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid(jsi::Runtime &rt) = 0; virtual bool fuseboxEnabledRelease(jsi::Runtime &rt) = 0; virtual bool fuseboxNetworkInspectionEnabled(jsi::Runtime &rt) = 0; + virtual bool lazyAnimationCallbacks(jsi::Runtime &rt) = 0; virtual bool removeTurboModuleManagerDelegateMutex(jsi::Runtime &rt) = 0; virtual bool throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS(jsi::Runtime &rt) = 0; virtual bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt) = 0; @@ -117,14 +117,6 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::animatedShouldSignalBatch, jsInvoker_, instance_); } - bool cxxNativeAnimatedEnabled(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::cxxNativeAnimatedEnabled) == 1, - "Expected cxxNativeAnimatedEnabled(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::cxxNativeAnimatedEnabled, jsInvoker_, instance_); - } bool disableMountItemReorderingAndroid(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::disableMountItemReorderingAndroid) == 1, @@ -229,14 +221,6 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::enableLongTaskAPI, jsInvoker_, instance_); } - bool enableMainQueueModulesOnIOS(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableMainQueueModulesOnIOS) == 1, - "Expected enableMainQueueModulesOnIOS(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableMainQueueModulesOnIOS, jsInvoker_, instance_); - } bool enableNativeCSSParsing(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::enableNativeCSSParsing) == 1, @@ -317,6 +301,14 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::enableViewRecyclingForView, jsInvoker_, instance_); } + bool fixDifferentiatorEmittingUpdatesWithWrongParentTag(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::fixDifferentiatorEmittingUpdatesWithWrongParentTag) == 1, + "Expected fixDifferentiatorEmittingUpdatesWithWrongParentTag(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::fixDifferentiatorEmittingUpdatesWithWrongParentTag, jsInvoker_, instance_); + } bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::fixMappingOfEventPrioritiesBetweenFabricAndReact) == 1, @@ -349,6 +341,14 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::fuseboxNetworkInspectionEnabled, jsInvoker_, instance_); } + bool lazyAnimationCallbacks(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::lazyAnimationCallbacks) == 1, + "Expected lazyAnimationCallbacks(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::lazyAnimationCallbacks, jsInvoker_, instance_); + } bool removeTurboModuleManagerDelegateMutex(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::removeTurboModuleManagerDelegateMutex) == 1,