react-native-windows 0.84.0-preview.9 → 0.85.0-preview.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.flowconfig +1 -5
- package/Common/unicode.cpp +36 -0
- package/Common/unicode.h +8 -0
- package/Directory.Build.props +1 -16
- package/Directory.Build.targets +12 -4
- package/Folly/ThreadNameStub.cpp +4 -6
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +3 -3
- package/Libraries/Animated/Animated.d.ts +8 -1
- package/Libraries/Animated/AnimatedEvent.js +4 -4
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/animations/Animation.js +3 -3
- package/Libraries/Animated/animations/DecayAnimation.js +4 -4
- package/Libraries/Animated/animations/SpringAnimation.js +5 -5
- package/Libraries/Animated/animations/TimingAnimation.js +5 -5
- package/Libraries/Animated/createAnimatedComponent.js +7 -7
- package/Libraries/Animated/nodes/AnimatedColor.js +2 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +12 -12
- package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
- package/Libraries/Animated/nodes/AnimatedObject.js +3 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +6 -6
- package/Libraries/Animated/nodes/AnimatedStyle.js +7 -7
- package/Libraries/Animated/nodes/AnimatedTransform.js +13 -13
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -1
- package/Libraries/Animated/useAnimatedColor.d.ts +15 -0
- package/Libraries/Animated/useAnimatedColor.js +25 -0
- package/Libraries/Animated/useAnimatedValueXY.d.ts +15 -0
- package/Libraries/Animated/useAnimatedValueXY.js +26 -0
- package/Libraries/AppState/AppState.js +1 -1
- package/Libraries/BatchedBridge/MessageQueue.js +3 -3
- package/Libraries/BatchedBridge/NativeModules.js +12 -10
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +30 -26
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +34 -30
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +2 -2
- package/Libraries/Components/Button.js +2 -2
- package/Libraries/Components/Button.windows.js +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +2 -2
- package/Libraries/Components/Keyboard/Keyboard.js +6 -6
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +1 -1
- package/Libraries/Components/Pressable/Pressable.d.ts +5 -0
- package/Libraries/Components/Pressable/Pressable.js +3 -3
- package/Libraries/Components/Pressable/Pressable.windows.js +3 -3
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +4 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +1 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +3 -3
- package/Libraries/Components/RefreshControl/RefreshControl.js +5 -5
- package/Libraries/Components/RefreshControl/RefreshControl.windows.js +5 -5
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +8 -12
- package/Libraries/Components/ScrollView/ScrollView.d.ts +9 -0
- package/Libraries/Components/ScrollView/ScrollView.js +19 -9
- package/Libraries/Components/ScrollView/ScrollView.windows.js +19 -9
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +8 -18
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.windows.js +8 -18
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +4 -3
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +8 -8
- package/Libraries/Components/Switch/Switch.js +3 -3
- package/Libraries/Components/Switch/Switch.windows.js +3 -3
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +33 -48
- package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +6 -11
- package/Libraries/Components/TextInput/TextInput.flow.js +21 -20
- package/Libraries/Components/TextInput/TextInput.flow.windows.js +23 -22
- package/Libraries/Components/TextInput/TextInput.js +8 -4
- package/Libraries/Components/TextInput/TextInput.windows.js +3 -4
- package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +33 -48
- package/Libraries/Components/Touchable/PooledClass.js +1 -1
- package/Libraries/Components/Touchable/Touchable.js +2 -2
- package/Libraries/Components/Touchable/Touchable.windows.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +4 -4
- package/Libraries/Components/Touchable/TouchableBounce.windows.js +4 -4
- package/Libraries/Components/Touchable/TouchableHighlight.js +8 -8
- package/Libraries/Components/Touchable/TouchableHighlight.windows.js +9 -9
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +7 -7
- package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +7 -7
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -4
- package/Libraries/Components/Touchable/TouchableOpacity.windows.js +4 -4
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +1 -1
- package/Libraries/Components/UnimplementedViews/UnimplementedView.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +68 -31
- package/Libraries/Components/View/View.windows.js +1 -1
- package/Libraries/Components/View/ViewAccessibility.js +7 -7
- package/Libraries/Components/View/ViewAccessibility.windows.js +7 -7
- package/Libraries/Components/View/ViewPropTypes.js +14 -14
- package/Libraries/Components/View/ViewPropTypes.windows.js +18 -16
- package/Libraries/Core/Devtools/parseHermesStack.js +8 -8
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -2
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/ExtendedError.js +3 -3
- package/Libraries/Core/RawEventEmitter.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +3 -2
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +4 -2
- package/Libraries/Core/setUpReactDevTools.js +23 -6
- package/Libraries/Core/setUpSegmentFetcher.js +1 -1
- package/Libraries/Debugging/DebuggingOverlay.js +2 -2
- package/Libraries/EventEmitter/NativeEventEmitter.js +7 -9
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +1 -1
- package/Libraries/Image/AssetSourceResolver.js +1 -1
- package/Libraries/Image/AssetSourceResolver.windows.js +1 -1
- package/Libraries/Image/Image.android.js +172 -306
- package/Libraries/Image/ImageProps.js +9 -11
- package/Libraries/Image/ImageSource.js +2 -2
- package/Libraries/Image/ImageSourceUtils.js +8 -4
- package/Libraries/Image/ImageTypes.flow.js +2 -2
- package/Libraries/Image/ImageViewNativeComponent.js +7 -16
- package/Libraries/Image/nativeImageSource.js +1 -1
- package/Libraries/Interaction/InteractionManager.js +5 -4
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +3 -3
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +38 -24
- package/Libraries/LogBox/Data/LogBoxLog.js +43 -112
- package/Libraries/LogBox/Data/parseLogBoxLog.js +21 -117
- package/Libraries/LogBox/LogBox.js +42 -19
- package/Libraries/LogBox/LogBoxInspectorContainer.js +2 -2
- package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
- package/Libraries/LogBox/UI/LogBoxButton.js +14 -16
- package/Libraries/LogBox/UI/LogBoxInspector.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.windows.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +10 -15
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +25 -18
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.windows.js +15 -16
- package/Libraries/LogBox/UI/LogBoxInspectorSection.js +5 -7
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +8 -10
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +8 -6
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.windows.js +3 -5
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +17 -29
- package/Libraries/LogBox/UI/LogBoxMessage.js +28 -37
- package/Libraries/LogBox/UI/LogBoxNotification.js +1 -1
- package/Libraries/Modal/Modal.d.ts +4 -0
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/Modal/Modal.windows.js +7 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +28 -52
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +19 -21
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +26 -17
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.windows.js +1 -1
- package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -3
- package/Libraries/Pressability/Pressability.js +5 -5
- package/Libraries/Pressability/Pressability.windows.js +5 -5
- package/Libraries/Pressability/PressabilityDebug.js +1 -1
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
- package/Libraries/Pressability/usePressability.js +3 -14
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/AppContainer-dev.js +18 -1
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/AppRegistry.flow.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +2 -2
- package/Libraries/ReactNative/FabricUIManager.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +4 -4
- package/Libraries/ReactNative/UIManagerProperties.js +1 -1
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +3 -2
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -2
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -2
- package/Libraries/Renderer/shims/ReactFabric.js +1 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
- package/Libraries/Renderer/shims/ReactNative.js +3 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.windows.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
- package/Libraries/StyleSheet/PointPropType.js +1 -1
- package/Libraries/StyleSheet/Rect.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.d.ts +0 -5
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.js.flow +1 -1
- package/Libraries/StyleSheet/StyleSheetExports.js +16 -25
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +2 -7
- package/Libraries/StyleSheet/StyleSheetTypes.js +33 -35
- package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +5 -5
- package/Libraries/StyleSheet/private/_TransformStyle.js +7 -7
- package/Libraries/StyleSheet/processBackgroundImage.js +7 -7
- package/Libraries/StyleSheet/processBackgroundPosition.js +4 -4
- package/Libraries/StyleSheet/processBackgroundRepeat.js +4 -4
- package/Libraries/StyleSheet/processBackgroundSize.js +4 -4
- package/Libraries/StyleSheet/processBoxShadow.js +44 -4
- package/Libraries/StyleSheet/processColorArray.js +2 -2
- package/Libraries/StyleSheet/processFilter.js +2 -2
- package/Libraries/Text/Text.js +295 -627
- package/Libraries/Text/Text.windows.js +342 -717
- package/Libraries/Text/TextNativeComponent.js +14 -7
- package/Libraries/Text/TextProps.js +4 -4
- package/Libraries/Text/TextProps.windows.js +4 -4
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.js +21 -21
- package/Libraries/Types/CoreEventTypes.windows.js +21 -21
- package/Libraries/Types/ReactDevToolsTypes.js +2 -2
- package/Libraries/Utilities/Appearance.js +6 -1
- package/Libraries/Utilities/Dimensions.js +1 -1
- package/Libraries/Utilities/HMRClient.js +32 -5
- package/Libraries/Utilities/IPerformanceLogger.js +4 -4
- package/Libraries/Utilities/codegenNativeCommands.js +4 -4
- package/Libraries/Utilities/codegenNativeComponent.d.ts +2 -0
- package/Libraries/Utilities/codegenNativeComponent.js +2 -2
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +3 -3
- package/Libraries/Utilities/useMergeRefs.js +2 -2
- package/Libraries/vendor/core/ErrorUtils.js +4 -4
- package/Libraries/vendor/emitter/EventEmitter.js +16 -20
- package/Microsoft.ReactNative/CallInvoker.cpp +14 -4
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.cpp +2 -2
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.cpp +73 -97
- package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.h +4 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +0 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +5 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +94 -26
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +11 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +135 -18
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +10 -0
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +7 -2
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +63 -15
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +9 -5
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +28 -6
- package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +80 -0
- package/Microsoft.ReactNative/Fabric/Composition/TooltipService.h +17 -0
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +11 -0
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +1 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +3 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +0 -3
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.cpp +3 -8
- package/Microsoft.ReactNative/IReactPackageBuilder.idl +6 -0
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +4 -63
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +1 -26
- package/Microsoft.ReactNative/Modules/AlertModule.cpp +2 -1
- package/Microsoft.ReactNative/Modules/AppStateModule.cpp +2 -17
- package/Microsoft.ReactNative/Modules/AppStateModule.h +0 -4
- package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +0 -2
- package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +16 -15
- package/Microsoft.ReactNative/Modules/AppearanceModule.h +5 -1
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +2 -7
- package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +0 -1
- package/Microsoft.ReactNative/Modules/I18nManagerModule.h +4 -4
- package/Microsoft.ReactNative/QuirkSettings.cpp +0 -133
- package/Microsoft.ReactNative/QuirkSettings.h +0 -43
- package/Microsoft.ReactNative/QuirkSettings.idl +0 -41
- package/Microsoft.ReactNative/ReactHost/CrashManager.cpp +0 -4
- package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -2
- package/Microsoft.ReactNative/ReactHost/React.h +0 -5
- package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +0 -1
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +3 -26
- package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +0 -5
- package/Microsoft.ReactNative/ReactHost/React_Win.h +0 -2
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +3 -0
- package/Microsoft.ReactNative/ReactPackageBuilder.cpp +7 -0
- package/Microsoft.ReactNative/ReactPackageBuilder.h +1 -0
- package/Microsoft.ReactNative/RedBox.cpp +0 -9
- package/Microsoft.ReactNative/RedBoxHandler.cpp +0 -4
- package/Microsoft.ReactNative/TurboModulesProvider.cpp +5 -10
- package/Microsoft.ReactNative/TurboModulesProvider.h +2 -0
- package/Microsoft.ReactNative/Utils/LocalBundleReader.cpp +33 -25
- package/Microsoft.ReactNative/Utils/LocalBundleReader.h +5 -3
- package/Microsoft.ReactNative/Utils/ValueUtils.cpp +1 -1
- package/Microsoft.ReactNative.Cxx/CppWinRTIncludes.h +0 -7
- package/Microsoft.ReactNative.Cxx/DesktopWindowBridge.h +0 -22
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +8 -2
- package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +36 -20
- package/Microsoft.ReactNative.Cxx/NamespaceRedirect.h +0 -3
- package/Microsoft.ReactNative.Cxx/NativeModules.h +8 -2
- package/Microsoft.ReactNative.Cxx/XamlUtils.h +0 -9
- package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +3 -3
- package/Microsoft.ReactNative.Managed/ReactContext.cs +0 -9
- package/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj +10 -10
- package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +1 -1
- package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +1 -1
- package/PropertySheets/Autolink.props +1 -1
- package/PropertySheets/Bundle.props +1 -1
- package/PropertySheets/Codegen.props +1 -1
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/PropertySheets/JSEngine.props +1 -1
- package/PropertySheets/NuGet.LockFile.props +8 -0
- package/PropertySheets/React.Cpp.props +8 -7
- package/PropertySheets/ReactNativeArchitecture.props +6 -24
- package/PropertySheets/WinUI.props +2 -2
- package/ReactCommon/ReactCommon.vcxproj +5 -6
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +1 -1
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +15 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +13 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/defaults/DefaultTurboModules.cpp +69 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/animationbackend/AnimatedPropSerializer.cpp +717 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/ParagraphShadowNode.cpp +10 -10
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +2 -21
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.cpp +151 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.h +50 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mapbuffer/MapBuffer.cpp +178 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp +69 -39
- package/Scripts/JustMyXaml.ps1 +8 -8
- package/Scripts/OfficeReact.Win32.nuspec +0 -1
- package/Scripts/Tfs/Layout-Desktop-Headers.ps1 +4 -39
- package/Scripts/UnitTest.ps1 +3 -1
- package/Scripts/creaternwapp.cmd +1 -9
- package/Scripts/creaternwlib.cmd +4 -24
- package/Scripts/rnw-dependencies.ps1 +15 -16
- package/Shared/DevSettings.h +0 -3
- package/Shared/DevSupportManager.cpp +55 -48
- package/Shared/DevSupportManager.h +0 -1
- package/Shared/Modules/IWebSocketModuleContentHandler.h +15 -0
- package/Shared/Modules/WebSocketModule.cpp +8 -3
- package/Shared/Networking/DefaultBlobResource.cpp +37 -0
- package/Shared/Networking/DefaultBlobResource.h +12 -0
- package/Shared/Networking/WinRTWebSocketResource.cpp +23 -408
- package/Shared/Networking/WinRTWebSocketResource.h +8 -120
- package/Shared/Shared.vcxitems +63 -38
- package/Shared/Shared.vcxitems.filters +54 -0
- package/Shared/Utils.cpp +0 -88
- package/Shared/Utils.h +0 -14
- package/Shared/WebSocketResourceFactory.cpp +28 -0
- package/Shared/tracing/fbsystrace.h +1 -0
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +172 -160
- package/codegen/react/components/rnwcore/ModalHostView.g.h +8 -0
- package/codegen/react/components/rnwcore/Props.cpp +17 -7
- package/codegen/react/components/rnwcore/Props.h +3 -1
- package/codegen/react/components/rnwcore/VirtualViewExperimental.g.h +4 -4
- package/codegen/rnwcoreJSI.h +93 -77
- package/index.js +9 -0
- package/index.windows.js +9 -0
- package/jest/RefreshControlMock.js +2 -2
- package/jest/assetFileTransformer.js +8 -3
- package/jest/mockComponent.js +3 -4
- package/jest/mockNativeComponent.js +1 -1
- package/jest/mocks/ActivityIndicator.js +2 -2
- package/jest/mocks/Image.js +2 -2
- package/jest/mocks/Modal.js +2 -2
- package/jest/mocks/RefreshControl.js +3 -3
- package/jest/mocks/RendererProxy.js +2 -2
- package/jest/mocks/ScrollView.js +5 -5
- package/jest/mocks/Text.js +2 -2
- package/jest/mocks/TextInput.js +2 -2
- package/jest/mocks/View.js +2 -2
- package/jest/mocks/ViewNativeComponent.js +1 -1
- package/jest/mocks/requireNativeComponent.js +1 -1
- package/jest/mocks/useColorScheme.js +1 -1
- package/jest/setup.js +68 -31
- package/just-task.js +13 -2
- package/package.json +25 -20
- package/src/private/animated/NativeAnimatedHelper.js +2 -2
- package/src/private/animated/createAnimatedPropsMemoHook.js +19 -19
- package/src/private/components/virtualview/VirtualView.js +14 -21
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +11 -10
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/BorderBox.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/BoxInspector.js +3 -3
- package/src/private/devsupport/devmenu/elementinspector/ElementBox.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +39 -17
- package/src/private/devsupport/devmenu/elementinspector/InspectorOverlay.js +15 -3
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -8
- package/src/private/devsupport/devmenu/elementinspector/StyleInspector.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/resolveBoxStyle.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/useExternalInspection.js +102 -0
- package/src/private/devsupport/rndevtools/FuseboxSessionObserver.js +12 -25
- package/src/private/devsupport/rndevtools/GlobalStateObserver.js +56 -0
- package/src/private/devsupport/rndevtools/TracingStateObserver.js +28 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +71 -79
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +2 -2
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +14 -12
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
- package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +7 -3
- package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS.js +1 -1
- package/src/private/styles/composeStyles.js +1 -1
- package/src/private/utilities/toError.js +27 -0
- package/src/private/utilities/toExtendedError.js +30 -0
- package/src/private/webapis/dom/events/Event.js +1 -1
- package/src/private/webapis/dom/events/EventHandlerAttributes.js +2 -2
- package/src/private/webapis/dom/events/EventTarget.js +3 -3
- package/src/private/webapis/dom/events/internals/EventInternals.js +2 -2
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +2 -2
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +14 -14
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +2 -2
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +8 -8
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +6 -6
- package/src/private/webapis/mutationobserver/MutationObserver.js +2 -2
- package/src/private/webapis/mutationobserver/MutationRecord.js +2 -2
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +3 -3
- package/src/private/webapis/performance/LongTasks.js +3 -3
- package/src/private/webapis/performance/Performance.js +4 -4
- package/src/private/webapis/performance/PerformanceEntry.js +1 -1
- package/src/private/webapis/performance/PerformanceObserver.js +2 -2
- package/src/private/webapis/performance/specs/NativePerformance.js +8 -8
- package/src/private/webapis/structuredClone/structuredClone.js +2 -2
- package/src/types/globals.d.ts +4 -4
- package/template/cpp-lib/proj/MyLib.sln +0 -33
- package/template/cpp-lib/proj/MyLib.vcxproj +1 -1
- package/template/cs-lib/proj/MyLib.sln +0 -33
- package/template/metro.config.js +12 -2
- package/templates/cpp-app/metro.config.js +12 -2
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +9 -6
- package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +2 -2
- package/templates/cpp-app/windows/MyApp.sln +0 -33
- package/templates/cpp-lib/example/metro.config.js +12 -2
- package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +2 -2
- package/templates/cpp-lib/windows/MyLib.sln +0 -33
- package/types/index.d.ts +2 -0
- package/Folly/.clang-format +0 -2
- package/Folly/Folly.natvis +0 -25
- package/Folly/Folly.vcxproj +0 -378
- package/Folly/Folly.vcxproj.filters +0 -558
- package/Folly/TEMP_UntilFollyUpdate/ConstexprMath.h +0 -978
- package/Folly/TEMP_UntilFollyUpdate/Conv.cpp +0 -1205
- package/Folly/TEMP_UntilFollyUpdate/chrono/Hardware.h +0 -155
- package/Folly/TEMP_UntilFollyUpdate/concurrency/CacheLocality.cpp +0 -633
- package/Folly/TEMP_UntilFollyUpdate/json/dynamic-inl.h +0 -1438
- package/Folly/TEMP_UntilFollyUpdate/json/json.cpp +0 -1118
- package/Folly/TEMP_UntilFollyUpdate/lang/SafeAssert.h +0 -188
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.cpp +0 -348
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.h +0 -182
- package/Folly/TEMP_UntilFollyUpdate/portability/Unistd.cpp +0 -33
- package/Folly/cgmanifest.json +0 -25
- package/Libraries/Components/View/ReactNativeViewAttributes.js +0 -60
- package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +0 -64
- package/Libraries/Image/TextInlineImageNativeComponent.js +0 -49
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +0 -75
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +0 -27
- package/Microsoft.ReactNative/Fabric/Composition/Theme_emptyimpl.cpp +0 -81
- package/Microsoft.ReactNative/Modules/CreateModules.cpp +0 -24
- package/Microsoft.ReactNative/ReactSupport.cpp +0 -221
- package/Microsoft.ReactNative/ReactSupport.h +0 -13
- package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.cpp +0 -107
- package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.h +0 -62
- package/Microsoft.ReactNative/Utils/UwpScriptStore.cpp +0 -56
- package/Microsoft.ReactNative/Utils/UwpScriptStore.h +0 -22
- package/Microsoft.ReactNative/XamlUIService.cpp +0 -68
- package/Microsoft.ReactNative/XamlUIService.h +0 -37
- package/Microsoft.ReactNative/XamlUIService.idl +0 -53
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +0 -259
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/Instance.cpp +0 -381
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSIndexedRAMBundle.cpp +0 -145
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/MethodCall.cpp +0 -100
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ModuleRegistry.cpp +0 -256
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +0 -363
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/RAMBundleRegistry.cpp +0 -93
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/ReactMarker.cpp +0 -148
- package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +0 -190
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsiexecutor/jsireact/JSINativeModules.cpp +0 -123
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleWithJSIBindings.cpp +0 -27
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/webperformance/NativePerformance.cpp +0 -414
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/platform/android/react/renderer/components/text/ParagraphState.h +0 -91
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventDispatcher.cpp +0 -80
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/EventQueueProcessor.cpp +0 -138
- package/fmt/.clang-format +0 -2
- package/fmt/cgmanifest.json +0 -15
- package/fmt/fmt.vcxproj +0 -153
- package/fmt/fmt.vcxproj.filters +0 -59
- package/fmt/pch.cpp +0 -4
- package/fmt/pch.h +0 -2
|
@@ -10,22 +10,22 @@
|
|
|
10
10
|
|
|
11
11
|
// From @react-native/js-polyfills
|
|
12
12
|
type ErrorHandler = (error: unknown, isFatal: boolean) => void;
|
|
13
|
-
type Fn<Args:
|
|
13
|
+
type Fn<Args: ReadonlyArray<unknown>, Return> = (...Args) => Return;
|
|
14
14
|
export type ErrorUtils = {
|
|
15
|
-
applyWithGuard<TArgs:
|
|
15
|
+
applyWithGuard<TArgs: ReadonlyArray<unknown>, TOut>(
|
|
16
16
|
fun: Fn<TArgs, TOut>,
|
|
17
17
|
context?: unknown,
|
|
18
18
|
args?: ?TArgs,
|
|
19
19
|
unused_onError?: null,
|
|
20
20
|
unused_name?: ?string,
|
|
21
21
|
): ?TOut,
|
|
22
|
-
applyWithGuardIfNeeded<TArgs:
|
|
22
|
+
applyWithGuardIfNeeded<TArgs: ReadonlyArray<unknown>, TOut>(
|
|
23
23
|
fun: Fn<TArgs, TOut>,
|
|
24
24
|
context?: unknown,
|
|
25
25
|
args?: ?TArgs,
|
|
26
26
|
): ?TOut,
|
|
27
27
|
getGlobalHandler(): ErrorHandler,
|
|
28
|
-
guard<TArgs:
|
|
28
|
+
guard<TArgs: ReadonlyArray<unknown>, TOut>(
|
|
29
29
|
fun: Fn<TArgs, TOut>,
|
|
30
30
|
name?: ?string,
|
|
31
31
|
context?: unknown,
|
|
@@ -16,22 +16,22 @@ export interface EventSubscription {
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
export interface IEventEmitter<
|
|
19
|
-
TEventToArgsMap:
|
|
19
|
+
TEventToArgsMap: Readonly<Record<string, ReadonlyArray<UnsafeEventObject>>>,
|
|
20
20
|
> {
|
|
21
|
-
addListener<TEvent:
|
|
21
|
+
addListener<TEvent: keyof TEventToArgsMap>(
|
|
22
22
|
eventType: TEvent,
|
|
23
23
|
listener: (...args: TEventToArgsMap[TEvent]) => unknown,
|
|
24
24
|
context?: unknown,
|
|
25
25
|
): EventSubscription;
|
|
26
26
|
|
|
27
|
-
emit<TEvent:
|
|
27
|
+
emit<TEvent: keyof TEventToArgsMap>(
|
|
28
28
|
eventType: TEvent,
|
|
29
29
|
...args: TEventToArgsMap[TEvent]
|
|
30
30
|
): void;
|
|
31
31
|
|
|
32
|
-
removeAllListeners<TEvent:
|
|
32
|
+
removeAllListeners<TEvent: keyof TEventToArgsMap>(eventType?: ?TEvent): void;
|
|
33
33
|
|
|
34
|
-
listenerCount<TEvent:
|
|
34
|
+
listenerCount<TEvent: keyof TEventToArgsMap>(eventType: TEvent): number;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
interface Registration<TArgs> {
|
|
@@ -41,7 +41,7 @@ interface Registration<TArgs> {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
type Registry<
|
|
44
|
-
TEventToArgsMap:
|
|
44
|
+
TEventToArgsMap: Readonly<Record<string, ReadonlyArray<UnsafeEventObject>>>,
|
|
45
45
|
> = {
|
|
46
46
|
[K in keyof TEventToArgsMap]: Set<Registration<TEventToArgsMap[K]>>,
|
|
47
47
|
};
|
|
@@ -67,9 +67,9 @@ type Registry<
|
|
|
67
67
|
*
|
|
68
68
|
*/
|
|
69
69
|
export default class EventEmitter<
|
|
70
|
-
TEventToArgsMap:
|
|
71
|
-
Record<string,
|
|
72
|
-
> =
|
|
70
|
+
TEventToArgsMap: Readonly<
|
|
71
|
+
Record<string, ReadonlyArray<UnsafeEventObject>>,
|
|
72
|
+
> = Readonly<Record<string, ReadonlyArray<UnsafeEventObject>>>,
|
|
73
73
|
> implements IEventEmitter<TEventToArgsMap>
|
|
74
74
|
{
|
|
75
75
|
#registry: Registry<TEventToArgsMap>;
|
|
@@ -83,7 +83,7 @@ export default class EventEmitter<
|
|
|
83
83
|
* Registers a listener that is called when the supplied event is emitted.
|
|
84
84
|
* Returns a subscription that has a `remove` method to undo registration.
|
|
85
85
|
*/
|
|
86
|
-
addListener<TEvent:
|
|
86
|
+
addListener<TEvent: keyof TEventToArgsMap>(
|
|
87
87
|
eventType: TEvent,
|
|
88
88
|
listener: (...args: TEventToArgsMap[TEvent]) => unknown,
|
|
89
89
|
context: unknown,
|
|
@@ -95,7 +95,7 @@ export default class EventEmitter<
|
|
|
95
95
|
}
|
|
96
96
|
const registrations = allocate<
|
|
97
97
|
TEventToArgsMap,
|
|
98
|
-
|
|
98
|
+
keyof TEventToArgsMap,
|
|
99
99
|
TEventToArgsMap[TEvent],
|
|
100
100
|
>(this.#registry, eventType);
|
|
101
101
|
const registration: Registration<TEventToArgsMap[TEvent]> = {
|
|
@@ -116,7 +116,7 @@ export default class EventEmitter<
|
|
|
116
116
|
* If a listener modifies the listeners registered for the same event, those
|
|
117
117
|
* changes will not be reflected in the current invocation of `emit`.
|
|
118
118
|
*/
|
|
119
|
-
emit<TEvent:
|
|
119
|
+
emit<TEvent: keyof TEventToArgsMap>(
|
|
120
120
|
eventType: TEvent,
|
|
121
121
|
...args: TEventToArgsMap[TEvent]
|
|
122
122
|
): void {
|
|
@@ -126,7 +126,6 @@ export default class EventEmitter<
|
|
|
126
126
|
// Copy `registrations` to take a snapshot when we invoke `emit`, in case
|
|
127
127
|
// registrations are added or removed when listeners are invoked.
|
|
128
128
|
for (const registration of Array.from(registrations)) {
|
|
129
|
-
// $FlowFixMe[incompatible-type]
|
|
130
129
|
registration.listener.apply(registration.context, args);
|
|
131
130
|
}
|
|
132
131
|
}
|
|
@@ -135,9 +134,7 @@ export default class EventEmitter<
|
|
|
135
134
|
/**
|
|
136
135
|
* Removes all registered listeners.
|
|
137
136
|
*/
|
|
138
|
-
removeAllListeners<TEvent:
|
|
139
|
-
eventType?: ?TEvent,
|
|
140
|
-
): void {
|
|
137
|
+
removeAllListeners<TEvent: keyof TEventToArgsMap>(eventType?: ?TEvent): void {
|
|
141
138
|
if (eventType == null) {
|
|
142
139
|
// $FlowFixMe[incompatible-type]
|
|
143
140
|
this.#registry = {};
|
|
@@ -149,7 +146,7 @@ export default class EventEmitter<
|
|
|
149
146
|
/**
|
|
150
147
|
* Returns the number of registered listeners for the supplied event.
|
|
151
148
|
*/
|
|
152
|
-
listenerCount<TEvent:
|
|
149
|
+
listenerCount<TEvent: keyof TEventToArgsMap>(eventType: TEvent): number {
|
|
153
150
|
const registrations: ?Set<Registration<TEventToArgsMap[TEvent]>> =
|
|
154
151
|
this.#registry[eventType];
|
|
155
152
|
return registrations == null ? 0 : registrations.size;
|
|
@@ -157,9 +154,8 @@ export default class EventEmitter<
|
|
|
157
154
|
}
|
|
158
155
|
|
|
159
156
|
function allocate<
|
|
160
|
-
TEventToArgsMap:
|
|
161
|
-
TEvent:
|
|
162
|
-
TEventArgs: TEventToArgsMap[TEvent],
|
|
157
|
+
TEventToArgsMap: Readonly<Record<string, ReadonlyArray<UnsafeEventObject>>>,
|
|
158
|
+
TEvent: keyof TEventToArgsMap,
|
|
163
159
|
>(
|
|
164
160
|
registry: Registry<TEventToArgsMap>,
|
|
165
161
|
eventType: TEvent,
|
|
@@ -19,13 +19,23 @@ CallInvoker::CallInvoker(
|
|
|
19
19
|
: m_callInvoker(callInvoker), m_context(&reactContext) {}
|
|
20
20
|
|
|
21
21
|
void CallInvoker::InvokeAsync(CallFunc func) noexcept {
|
|
22
|
-
m_callInvoker->invokeAsync(
|
|
23
|
-
|
|
22
|
+
m_callInvoker->invokeAsync([reactContext = m_context, func](facebook::jsi::Runtime & /*runtime*/) {
|
|
23
|
+
auto runtime = reactContext->JsiRuntime();
|
|
24
|
+
if (!runtime)
|
|
25
|
+
return;
|
|
26
|
+
|
|
27
|
+
func(runtime);
|
|
28
|
+
});
|
|
24
29
|
}
|
|
25
30
|
|
|
26
31
|
void CallInvoker::InvokeSync(CallFunc func) noexcept {
|
|
27
|
-
m_callInvoker->invokeSync(
|
|
28
|
-
|
|
32
|
+
m_callInvoker->invokeSync([reactContext = m_context, func](facebook::jsi::Runtime & /*runtime*/) {
|
|
33
|
+
auto runtime = reactContext->JsiRuntime();
|
|
34
|
+
if (!runtime)
|
|
35
|
+
return;
|
|
36
|
+
|
|
37
|
+
func(runtime);
|
|
38
|
+
});
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
winrt::Microsoft::ReactNative::CallInvoker CallInvoker::FromProperties(
|
|
@@ -158,7 +158,7 @@ facebook::react::State::Shared AbiComponentDescriptor::createState(
|
|
|
158
158
|
|
|
159
159
|
facebook::react::ShadowNodeFamily::Shared AbiComponentDescriptor::createFamily(
|
|
160
160
|
facebook::react::ShadowNodeFamilyFragment const &fragment) const {
|
|
161
|
-
auto eventEmitter = std::make_shared<
|
|
161
|
+
auto eventEmitter = std::make_shared<ConcreteEventEmitter>(
|
|
162
162
|
std::make_shared<facebook::react::EventTarget>(fragment.instanceHandle, fragment.surfaceId), eventDispatcher_);
|
|
163
163
|
return std::make_shared<facebook::react::ShadowNodeFamily>(
|
|
164
164
|
fragment, std::move(eventEmitter), eventDispatcher_, *this);
|
|
@@ -25,7 +25,7 @@ void AbiPortalShadowNode::layout(facebook::react::LayoutContext layoutContext) {
|
|
|
25
25
|
ensureUnsealed();
|
|
26
26
|
auto layoutMetrics = getLayoutMetrics();
|
|
27
27
|
|
|
28
|
-
auto portalOwningShadowNode = ShadowNode
|
|
28
|
+
auto portalOwningShadowNode = std::shared_ptr<facebook::react::ShadowNode>{};
|
|
29
29
|
|
|
30
30
|
if (getChildren().empty()) {
|
|
31
31
|
return;
|
|
@@ -36,7 +36,7 @@ void AbiPortalShadowNode::layout(facebook::react::LayoutContext layoutContext) {
|
|
|
36
36
|
|
|
37
37
|
const auto &childNode = getChildren()[0];
|
|
38
38
|
|
|
39
|
-
auto clonedShadowNode = ShadowNode
|
|
39
|
+
auto clonedShadowNode = std::shared_ptr<facebook::react::ShadowNode>{};
|
|
40
40
|
|
|
41
41
|
portalOwningShadowNode = cloneTree(childNode->getFamily(), [&](const ShadowNode &oldShadowNode) {
|
|
42
42
|
clonedShadowNode = oldShadowNode.clone({});
|
|
@@ -161,7 +161,7 @@ class ConcreteAbiViewComponentDescriptor : public facebook::react::ComponentDesc
|
|
|
161
161
|
|
|
162
162
|
facebook::react::ShadowNodeFamily::Shared createFamily(
|
|
163
163
|
facebook::react::ShadowNodeFamilyFragment const &fragment) const override {
|
|
164
|
-
auto eventEmitter = std::make_shared<
|
|
164
|
+
auto eventEmitter = std::make_shared<ConcreteEventEmitter>(
|
|
165
165
|
std::make_shared<facebook::react::EventTarget>(fragment.instanceHandle, fragment.surfaceId), eventDispatcher_);
|
|
166
166
|
return std::make_shared<facebook::react::ShadowNodeFamily>(
|
|
167
167
|
fragment, std::move(eventEmitter), eventDispatcher_, *this);
|
|
@@ -9,51 +9,39 @@
|
|
|
9
9
|
|
|
10
10
|
namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
11
11
|
|
|
12
|
-
// Ideally isColorMeaningful would be sufficient here. But it appears to detect platformColors as not meaningful
|
|
13
|
-
// https://github.com/microsoft/react-native-windows/issues/14006
|
|
14
|
-
bool isColorMeaningful(
|
|
15
|
-
const facebook::react::SharedColor &color,
|
|
16
|
-
winrt::Microsoft::ReactNative::Composition::implementation::Theme *theme) noexcept {
|
|
17
|
-
if (!color) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return theme->Color(*color).A > 0;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
12
|
// We don't want half pixel borders, or border radii - they lead to blurry borders
|
|
25
13
|
// Also apply scale factor to the radii at this point
|
|
26
14
|
void pixelRoundBorderRadii(facebook::react::BorderRadii &borderRadii, float scaleFactor) noexcept {
|
|
27
15
|
// Always round radii down to avoid spikey circles
|
|
28
16
|
borderRadii.topLeft = {
|
|
29
|
-
|
|
17
|
+
.vertical = std::floor(borderRadii.topLeft.vertical * scaleFactor),
|
|
18
|
+
.horizontal = std::floor(borderRadii.topLeft.horizontal * scaleFactor)};
|
|
30
19
|
borderRadii.topRight = {
|
|
31
|
-
std::floor(borderRadii.topRight.
|
|
32
|
-
std::floor(borderRadii.topRight.
|
|
20
|
+
.vertical = std::floor(borderRadii.topRight.vertical * scaleFactor),
|
|
21
|
+
.horizontal = std::floor(borderRadii.topRight.horizontal * scaleFactor)};
|
|
33
22
|
borderRadii.bottomLeft = {
|
|
34
|
-
std::floor(borderRadii.bottomLeft.
|
|
35
|
-
std::floor(borderRadii.bottomLeft.
|
|
23
|
+
.vertical = std::floor(borderRadii.bottomLeft.vertical * scaleFactor),
|
|
24
|
+
.horizontal = std::floor(borderRadii.bottomLeft.horizontal * scaleFactor)};
|
|
36
25
|
borderRadii.bottomRight = {
|
|
37
|
-
std::floor(borderRadii.bottomRight.
|
|
38
|
-
std::floor(borderRadii.bottomRight.
|
|
26
|
+
.vertical = std::floor(borderRadii.bottomRight.vertical * scaleFactor),
|
|
27
|
+
.horizontal = std::floor(borderRadii.bottomRight.horizontal * scaleFactor),
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
float pixelRoundAndScaleBorderWidth(float width, float scaleFactor) noexcept {
|
|
32
|
+
if (width == 0)
|
|
33
|
+
return width = 0;
|
|
34
|
+
return std::max(1.f, std::round(width * scaleFactor));
|
|
39
35
|
}
|
|
40
36
|
|
|
41
37
|
void scaleAndPixelRoundBorderWidths(
|
|
42
38
|
facebook::react::LayoutMetrics const &layoutMetrics,
|
|
43
39
|
facebook::react::BorderMetrics &borderMetrics,
|
|
44
40
|
float scaleFactor) noexcept {
|
|
45
|
-
borderMetrics.borderWidths.left = (borderMetrics.borderWidths.left
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
borderMetrics.borderWidths.
|
|
49
|
-
? 0.f
|
|
50
|
-
: std::max(1.f, std::round(borderMetrics.borderWidths.top * scaleFactor));
|
|
51
|
-
borderMetrics.borderWidths.right = (borderMetrics.borderWidths.right == 0)
|
|
52
|
-
? 0.f
|
|
53
|
-
: std::max(1.f, std::round(borderMetrics.borderWidths.right * scaleFactor));
|
|
54
|
-
borderMetrics.borderWidths.bottom = (borderMetrics.borderWidths.bottom == 0)
|
|
55
|
-
? 0.f
|
|
56
|
-
: std::max(1.f, std::round(borderMetrics.borderWidths.bottom * scaleFactor));
|
|
41
|
+
borderMetrics.borderWidths.left = pixelRoundAndScaleBorderWidth(borderMetrics.borderWidths.left, scaleFactor);
|
|
42
|
+
borderMetrics.borderWidths.top = pixelRoundAndScaleBorderWidth(borderMetrics.borderWidths.top, scaleFactor);
|
|
43
|
+
borderMetrics.borderWidths.right = pixelRoundAndScaleBorderWidth(borderMetrics.borderWidths.right, scaleFactor);
|
|
44
|
+
borderMetrics.borderWidths.bottom = pixelRoundAndScaleBorderWidth(borderMetrics.borderWidths.bottom, scaleFactor);
|
|
57
45
|
|
|
58
46
|
// If we rounded both sides of the borderWidths up, we may have made the borderWidths larger than the total
|
|
59
47
|
if (layoutMetrics.frame.size.width * scaleFactor <
|
|
@@ -268,30 +256,14 @@ RoundedPathParameters GenerateRoundedPathParameters(
|
|
|
268
256
|
return result;
|
|
269
257
|
}
|
|
270
258
|
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
double totalWidth = inset.left + inset.right + pathSize.width;
|
|
280
|
-
double totalHeight = inset.top + inset.bottom + pathSize.height;
|
|
281
|
-
|
|
282
|
-
float scaleHoriz = static_cast<float>(maxHorizontalRadius / totalWidth);
|
|
283
|
-
float scaleVert = static_cast<float>(maxVerticalRadius / totalHeight);
|
|
284
|
-
|
|
285
|
-
float maxScale = std::max(1.0f, std::max(scaleHoriz, scaleVert));
|
|
286
|
-
|
|
287
|
-
result.topLeftRadiusX = std::max(0.0f, baseRadius.topLeft.horizontal / maxScale - inset.left);
|
|
288
|
-
result.topLeftRadiusY = std::max(0.0f, baseRadius.topLeft.vertical / maxScale - inset.top);
|
|
289
|
-
result.topRightRadiusX = std::max(0.0f, baseRadius.topRight.horizontal / maxScale - inset.right);
|
|
290
|
-
result.topRightRadiusY = std::max(0.0f, baseRadius.topRight.vertical / maxScale - inset.top);
|
|
291
|
-
result.bottomRightRadiusX = std::max(0.0f, baseRadius.bottomRight.horizontal / maxScale - inset.right);
|
|
292
|
-
result.bottomRightRadiusY = std::max(0.0f, baseRadius.bottomRight.vertical / maxScale - inset.bottom);
|
|
293
|
-
result.bottomLeftRadiusX = std::max(0.0f, baseRadius.bottomLeft.horizontal / maxScale - inset.left);
|
|
294
|
-
result.bottomLeftRadiusY = std::max(0.0f, baseRadius.bottomLeft.vertical / maxScale - inset.bottom);
|
|
259
|
+
result.topLeftRadiusX = std::max(0.0f, baseRadius.topLeft.horizontal - inset.left);
|
|
260
|
+
result.topLeftRadiusY = std::max(0.0f, baseRadius.topLeft.vertical - inset.top);
|
|
261
|
+
result.topRightRadiusX = std::max(0.0f, baseRadius.topRight.horizontal - inset.right);
|
|
262
|
+
result.topRightRadiusY = std::max(0.0f, baseRadius.topRight.vertical - inset.top);
|
|
263
|
+
result.bottomRightRadiusX = std::max(0.0f, baseRadius.bottomRight.horizontal - inset.right);
|
|
264
|
+
result.bottomRightRadiusY = std::max(0.0f, baseRadius.bottomRight.vertical - inset.bottom);
|
|
265
|
+
result.bottomLeftRadiusX = std::max(0.0f, baseRadius.bottomLeft.horizontal - inset.left);
|
|
266
|
+
result.bottomLeftRadiusY = std::max(0.0f, baseRadius.bottomLeft.vertical - inset.bottom);
|
|
295
267
|
|
|
296
268
|
return result;
|
|
297
269
|
}
|
|
@@ -370,7 +342,7 @@ void SetBorderLayerPropertiesCommon(
|
|
|
370
342
|
// Clear with transparency
|
|
371
343
|
pRT->Clear();
|
|
372
344
|
|
|
373
|
-
if (!isColorMeaningful(borderColor
|
|
345
|
+
if (!facebook::react::isColorMeaningful(borderColor)) {
|
|
374
346
|
return;
|
|
375
347
|
}
|
|
376
348
|
|
|
@@ -473,8 +445,8 @@ void SetBorderLayerProperties(
|
|
|
473
445
|
/*
|
|
474
446
|
else
|
|
475
447
|
{
|
|
476
|
-
|
|
477
|
-
|
|
448
|
+
SetBorderLayerPropertiesCommon(theme, compContext, layer, shape, borderTexture, textureRect,
|
|
449
|
+
anchorPoint, anchorOffset, size, relativeSizeAdjustment, strokeWidth, borderColor, borderStyle);
|
|
478
450
|
}
|
|
479
451
|
*/
|
|
480
452
|
}
|
|
@@ -516,11 +488,11 @@ void DrawAllBorderLayers(
|
|
|
516
488
|
spTextures[0], // Target Layer, Source Texture, Target Texture
|
|
517
489
|
{0,
|
|
518
490
|
0,
|
|
519
|
-
borderRadii.topLeft.
|
|
520
|
-
borderRadii.topLeft.
|
|
491
|
+
borderRadii.topLeft.horizontal + borderWidths.left,
|
|
492
|
+
borderRadii.topLeft.vertical + borderWidths.top}, // Texture Left, Top, Width, Height
|
|
521
493
|
{AnchorPosition::Left, AnchorPosition::Top}, // Layer Anchor Point
|
|
522
494
|
{0, 0}, // Layer Anchor Offset
|
|
523
|
-
{borderRadii.topLeft.
|
|
495
|
+
{borderRadii.topLeft.horizontal + borderWidths.left, borderRadii.topLeft.vertical + borderWidths.top}, // size
|
|
524
496
|
{0.0f, 0.0f}, // relativeSize
|
|
525
497
|
std::max(borderWidths.left, borderWidths.top),
|
|
526
498
|
borderColors.left ? borderColors.left : borderColors.top,
|
|
@@ -533,13 +505,13 @@ void DrawAllBorderLayers(
|
|
|
533
505
|
spBorderLayers[1],
|
|
534
506
|
shape,
|
|
535
507
|
spTextures[1],
|
|
536
|
-
{borderRadii.topLeft.
|
|
508
|
+
{borderRadii.topLeft.horizontal + borderWidths.left,
|
|
537
509
|
0,
|
|
538
|
-
textureWidth - (borderRadii.topRight.
|
|
510
|
+
textureWidth - (borderRadii.topRight.horizontal + borderWidths.right),
|
|
539
511
|
borderWidths.top},
|
|
540
512
|
{AnchorPosition::Left, AnchorPosition::Top},
|
|
541
|
-
{borderRadii.topLeft.
|
|
542
|
-
{-(borderRadii.topLeft.
|
|
513
|
+
{borderRadii.topLeft.horizontal + borderWidths.left, 0},
|
|
514
|
+
{-(borderRadii.topLeft.horizontal + borderWidths.left + borderRadii.topRight.horizontal + borderWidths.right),
|
|
543
515
|
borderWidths.top}, // size
|
|
544
516
|
{1.0f, 0.0f}, // relativeSize
|
|
545
517
|
borderWidths.top,
|
|
@@ -553,13 +525,13 @@ void DrawAllBorderLayers(
|
|
|
553
525
|
spBorderLayers[2],
|
|
554
526
|
shape,
|
|
555
527
|
spTextures[2],
|
|
556
|
-
{textureWidth - (borderRadii.topRight.
|
|
528
|
+
{textureWidth - (borderRadii.topRight.horizontal + borderWidths.right),
|
|
557
529
|
0,
|
|
558
530
|
textureWidth,
|
|
559
|
-
borderRadii.topRight.
|
|
531
|
+
borderRadii.topRight.vertical + borderWidths.top},
|
|
560
532
|
{AnchorPosition::Right, AnchorPosition::Top},
|
|
561
|
-
{-(borderRadii.topRight.
|
|
562
|
-
{borderRadii.topRight.
|
|
533
|
+
{-(borderRadii.topRight.horizontal + borderWidths.right), 0},
|
|
534
|
+
{borderRadii.topRight.horizontal + borderWidths.right, borderRadii.topRight.vertical + borderWidths.top},
|
|
563
535
|
{0.0f, 0.0f},
|
|
564
536
|
std::max(borderWidths.right, borderWidths.top),
|
|
565
537
|
borderColors.right ? borderColors.right : borderColors.top,
|
|
@@ -573,14 +545,14 @@ void DrawAllBorderLayers(
|
|
|
573
545
|
shape,
|
|
574
546
|
spTextures[3],
|
|
575
547
|
{textureWidth - borderWidths.right,
|
|
576
|
-
borderWidths.top + borderRadii.topRight.
|
|
548
|
+
borderWidths.top + borderRadii.topRight.vertical,
|
|
577
549
|
textureWidth,
|
|
578
|
-
textureHeight - (borderWidths.bottom + borderRadii.bottomRight.
|
|
550
|
+
textureHeight - (borderWidths.bottom + borderRadii.bottomRight.vertical)},
|
|
579
551
|
{AnchorPosition::Right, AnchorPosition::Top},
|
|
580
|
-
{-borderWidths.right, borderWidths.top + borderRadii.topRight.
|
|
552
|
+
{-borderWidths.right, borderWidths.top + borderRadii.topRight.vertical},
|
|
581
553
|
{borderWidths.right,
|
|
582
|
-
-(borderWidths.top + borderRadii.topRight.
|
|
583
|
-
borderRadii.bottomRight.
|
|
554
|
+
-(borderWidths.top + borderRadii.topRight.vertical + borderWidths.bottom +
|
|
555
|
+
borderRadii.bottomRight.vertical)}, // size
|
|
584
556
|
{0.0f, 1.0f},
|
|
585
557
|
borderWidths.right,
|
|
586
558
|
borderColors.right,
|
|
@@ -593,14 +565,14 @@ void DrawAllBorderLayers(
|
|
|
593
565
|
spBorderLayers[4],
|
|
594
566
|
shape,
|
|
595
567
|
spTextures[4],
|
|
596
|
-
{textureWidth - (borderWidths.right + borderRadii.bottomRight.
|
|
597
|
-
textureHeight - (borderWidths.bottom + borderRadii.bottomRight.
|
|
568
|
+
{textureWidth - (borderWidths.right + borderRadii.bottomRight.horizontal),
|
|
569
|
+
textureHeight - (borderWidths.bottom + borderRadii.bottomRight.vertical),
|
|
598
570
|
textureWidth,
|
|
599
571
|
textureHeight},
|
|
600
572
|
{AnchorPosition::Right, AnchorPosition::Bottom},
|
|
601
|
-
{-(borderWidths.right + borderRadii.bottomRight.
|
|
602
|
-
-(borderWidths.bottom + borderRadii.bottomRight.
|
|
603
|
-
{borderWidths.right + borderRadii.bottomRight.
|
|
573
|
+
{-(borderWidths.right + borderRadii.bottomRight.horizontal),
|
|
574
|
+
-(borderWidths.bottom + borderRadii.bottomRight.vertical)},
|
|
575
|
+
{borderWidths.right + borderRadii.bottomRight.horizontal, borderWidths.bottom + borderRadii.bottomRight.vertical},
|
|
604
576
|
{0, 0},
|
|
605
577
|
std::max(borderWidths.right, borderWidths.bottom),
|
|
606
578
|
borderColors.right ? borderColors.right : borderColors.bottom,
|
|
@@ -613,13 +585,14 @@ void DrawAllBorderLayers(
|
|
|
613
585
|
spBorderLayers[5],
|
|
614
586
|
shape,
|
|
615
587
|
spTextures[5],
|
|
616
|
-
{borderWidths.left + borderRadii.bottomLeft.
|
|
588
|
+
{borderWidths.left + borderRadii.bottomLeft.horizontal,
|
|
617
589
|
textureHeight - borderWidths.bottom,
|
|
618
|
-
textureWidth - (borderWidths.right + borderRadii.bottomRight.
|
|
590
|
+
textureWidth - (borderWidths.right + borderRadii.bottomRight.horizontal),
|
|
619
591
|
textureHeight},
|
|
620
592
|
{AnchorPosition::Left, AnchorPosition::Bottom},
|
|
621
|
-
{borderWidths.left + borderRadii.bottomLeft.
|
|
622
|
-
{-(borderWidths.right + borderRadii.bottomLeft.
|
|
593
|
+
{borderWidths.left + borderRadii.bottomLeft.horizontal, -borderWidths.bottom},
|
|
594
|
+
{-(borderWidths.right + borderRadii.bottomLeft.horizontal + borderWidths.left +
|
|
595
|
+
borderRadii.bottomRight.horizontal),
|
|
623
596
|
borderWidths.bottom},
|
|
624
597
|
{1.0f, 0.0f},
|
|
625
598
|
borderWidths.bottom,
|
|
@@ -634,12 +607,12 @@ void DrawAllBorderLayers(
|
|
|
634
607
|
shape,
|
|
635
608
|
spTextures[6],
|
|
636
609
|
{0,
|
|
637
|
-
textureHeight - (borderWidths.bottom + borderRadii.bottomLeft.
|
|
638
|
-
borderWidths.left + borderRadii.bottomLeft.
|
|
610
|
+
textureHeight - (borderWidths.bottom + borderRadii.bottomLeft.vertical),
|
|
611
|
+
borderWidths.left + borderRadii.bottomLeft.horizontal,
|
|
639
612
|
textureHeight},
|
|
640
613
|
{AnchorPosition::Left, AnchorPosition::Bottom},
|
|
641
|
-
{0, -(borderWidths.bottom + borderRadii.bottomLeft.
|
|
642
|
-
{borderWidths.left + borderRadii.bottomLeft.
|
|
614
|
+
{0, -(borderWidths.bottom + borderRadii.bottomLeft.vertical)},
|
|
615
|
+
{borderWidths.left + borderRadii.bottomLeft.horizontal, borderWidths.bottom + borderRadii.bottomLeft.vertical},
|
|
643
616
|
{0, 0},
|
|
644
617
|
std::max(borderWidths.left, borderWidths.bottom),
|
|
645
618
|
borderColors.left ? borderColors.left : borderColors.bottom,
|
|
@@ -653,13 +626,13 @@ void DrawAllBorderLayers(
|
|
|
653
626
|
shape,
|
|
654
627
|
spTextures[7],
|
|
655
628
|
{0,
|
|
656
|
-
borderWidths.top + borderRadii.topLeft.
|
|
629
|
+
borderWidths.top + borderRadii.topLeft.vertical,
|
|
657
630
|
borderWidths.left,
|
|
658
|
-
textureHeight - (borderWidths.bottom + borderRadii.bottomLeft.
|
|
631
|
+
textureHeight - (borderWidths.bottom + borderRadii.bottomLeft.vertical)},
|
|
659
632
|
{AnchorPosition::Left, AnchorPosition::Top},
|
|
660
|
-
{0, borderWidths.top + borderRadii.topLeft.
|
|
633
|
+
{0, borderWidths.top + borderRadii.topLeft.vertical},
|
|
661
634
|
{borderWidths.left,
|
|
662
|
-
-(borderWidths.top + borderRadii.topLeft.
|
|
635
|
+
-(borderWidths.top + borderRadii.topLeft.vertical + borderWidths.bottom + borderRadii.bottomLeft.vertical)},
|
|
663
636
|
{0, 1},
|
|
664
637
|
borderWidths.left,
|
|
665
638
|
borderColors.left,
|
|
@@ -737,7 +710,7 @@ winrt::com_ptr<ID2D1GeometryGroup> GetGeometryForRoundedBorder(
|
|
|
737
710
|
BorderPrimitive::BorderPrimitive(
|
|
738
711
|
winrt::Microsoft::ReactNative::Composition::implementation::ComponentView &outer,
|
|
739
712
|
const winrt::Microsoft::ReactNative::Composition::Experimental::IVisual &rootVisual)
|
|
740
|
-
: m_outer(&outer), m_rootVisual(rootVisual) {}
|
|
713
|
+
: m_outer(&outer), m_rootVisual(rootVisual), m_ownsRootVisual(false) {}
|
|
741
714
|
|
|
742
715
|
BorderPrimitive::BorderPrimitive(winrt::Microsoft::ReactNative::Composition::implementation::ComponentView &outer)
|
|
743
716
|
: m_outer(&outer), m_rootVisual(outer.CompositionContext().CreateSpriteVisual()) {}
|
|
@@ -753,9 +726,9 @@ bool BorderPrimitive::requiresBorder(
|
|
|
753
726
|
auto borderStyle = borderMetrics.borderStyles.left;
|
|
754
727
|
|
|
755
728
|
bool hasMeaningfulColor =
|
|
756
|
-
!borderMetrics.borderColors.isUniform() ||
|
|
729
|
+
!borderMetrics.borderColors.isUniform() || facebook::react::isColorMeaningful(borderMetrics.borderColors.left);
|
|
757
730
|
bool hasMeaningfulWidth = !borderMetrics.borderWidths.isUniform() || (borderMetrics.borderWidths.left != 0);
|
|
758
|
-
if (!hasMeaningfulColor
|
|
731
|
+
if (!hasMeaningfulColor || !hasMeaningfulWidth) {
|
|
759
732
|
return false;
|
|
760
733
|
}
|
|
761
734
|
return true;
|
|
@@ -815,8 +788,10 @@ BorderPrimitive::FindSpecialBorderLayers() const noexcept {
|
|
|
815
788
|
nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
|
|
816
789
|
|
|
817
790
|
if (m_numBorderVisuals) {
|
|
791
|
+
auto borderInsertAtIndex = m_ownsRootVisual ? 0 : m_outer->borderInsertAtIndex();
|
|
792
|
+
|
|
818
793
|
for (uint8_t i = 0; i < m_numBorderVisuals; i++) {
|
|
819
|
-
auto visual = m_rootVisual.GetAt(i);
|
|
794
|
+
auto visual = m_rootVisual.GetAt(i + borderInsertAtIndex);
|
|
820
795
|
layers[i] = visual.as<winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual>();
|
|
821
796
|
}
|
|
822
797
|
}
|
|
@@ -843,7 +818,7 @@ bool BorderPrimitive::TryUpdateSpecialBorderLayers(
|
|
|
843
818
|
auto borderStyle = borderMetrics.borderStyles.left;
|
|
844
819
|
|
|
845
820
|
bool hasMeaningfulColor =
|
|
846
|
-
!borderMetrics.borderColors.isUniform() || !isColorMeaningful(borderMetrics.borderColors.left
|
|
821
|
+
!borderMetrics.borderColors.isUniform() || !facebook::react::isColorMeaningful(borderMetrics.borderColors.left);
|
|
847
822
|
bool hasMeaningfulWidth = !borderMetrics.borderWidths.isUniform() || (borderMetrics.borderWidths.left != 0);
|
|
848
823
|
if (!hasMeaningfulColor && !hasMeaningfulWidth) {
|
|
849
824
|
return false;
|
|
@@ -851,9 +826,10 @@ bool BorderPrimitive::TryUpdateSpecialBorderLayers(
|
|
|
851
826
|
|
|
852
827
|
// Create the special border layers if they don't exist yet
|
|
853
828
|
if (!spBorderVisuals[0]) {
|
|
829
|
+
auto borderInsertAtIndex = m_ownsRootVisual ? 0 : m_outer->borderInsertAtIndex();
|
|
854
830
|
for (uint8_t i = 0; i < SpecialBorderLayerCount; i++) {
|
|
855
831
|
auto visual = m_outer->CompositionContext().CreateSpriteVisual();
|
|
856
|
-
m_rootVisual.InsertAt(visual, i);
|
|
832
|
+
m_rootVisual.InsertAt(visual, i + borderInsertAtIndex);
|
|
857
833
|
spBorderVisuals[i] = std::move(visual);
|
|
858
834
|
m_numBorderVisuals++;
|
|
859
835
|
}
|
|
@@ -14,6 +14,8 @@ namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
|
14
14
|
|
|
15
15
|
struct ComponentView;
|
|
16
16
|
|
|
17
|
+
float pixelRoundAndScaleBorderWidth(float width, float scaleFactor) noexcept;
|
|
18
|
+
|
|
17
19
|
// Controls adding/removing appropriate visuals to a parent to render a specific border without requiring
|
|
18
20
|
struct BorderPrimitive {
|
|
19
21
|
static constexpr size_t SpecialBorderLayerCount = 8;
|
|
@@ -74,7 +76,8 @@ struct BorderPrimitive {
|
|
|
74
76
|
uint8_t m_numBorderVisuals{0};
|
|
75
77
|
winrt::Microsoft::ReactNative::Composition::implementation::ComponentView *m_outer;
|
|
76
78
|
winrt::Microsoft::ReactNative::Composition::Experimental::IVisual m_rootVisual{nullptr};
|
|
77
|
-
bool m_needsUpdate{true};
|
|
79
|
+
bool m_needsUpdate : 1 {true};
|
|
80
|
+
bool m_ownsRootVisual : 1 {false};
|
|
78
81
|
};
|
|
79
82
|
|
|
80
83
|
} // namespace winrt::Microsoft::ReactNative::Composition::implementation
|
|
@@ -2208,7 +2208,6 @@ struct CompContext : winrt::implements<
|
|
|
2208
2208
|
winrt::com_ptr<ID3D11Device> m_d3dDevice;
|
|
2209
2209
|
winrt::com_ptr<ID2D1Device> m_d2dDevice;
|
|
2210
2210
|
typename TTypeRedirects::CompositionGraphicsDevice m_compositionGraphicsDevice{nullptr};
|
|
2211
|
-
winrt::com_ptr<ID3D11DeviceContext> m_d3dDeviceContext;
|
|
2212
2211
|
};
|
|
2213
2212
|
|
|
2214
2213
|
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual
|
|
@@ -1064,6 +1064,11 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::get_SelectionContainer(I
|
|
|
1064
1064
|
*pRetVal = nullptr;
|
|
1065
1065
|
|
|
1066
1066
|
auto selectionContainerView = GetSelectionContainer();
|
|
1067
|
+
// Per UIA spec, returning S_OK with *pRetVal == nullptr is correct when the element
|
|
1068
|
+
// is not contained within a selection container.
|
|
1069
|
+
if (!selectionContainerView)
|
|
1070
|
+
return S_OK;
|
|
1071
|
+
|
|
1067
1072
|
auto uiaProvider =
|
|
1068
1073
|
winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(selectionContainerView)
|
|
1069
1074
|
->EnsureUiaProvider();
|