react-native-windows 0.0.0-canary.705 → 0.0.0-canary.706
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 +2 -1
- package/Libraries/Animated/components/AnimatedFlatList.js +1 -1
- package/Libraries/Animated/components/AnimatedSectionList.js +1 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +3 -1
- package/Libraries/Components/TextInput/TextInput.js +2 -0
- package/Libraries/Components/TextInput/TextInput.windows.js +2 -0
- package/Libraries/Components/ToastAndroid/ToastAndroid.js +9 -1
- package/Libraries/Components/ToastAndroid/ToastAndroid.windows.js +9 -1
- package/Libraries/Components/View/ViewNativeComponent.js +1 -0
- package/Libraries/Components/View/ViewPropTypes.js +9 -0
- package/Libraries/Components/View/ViewPropTypes.windows.js +9 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/DOM/Nodes/ReadOnlyElement.js +28 -0
- package/Libraries/Image/Image.android.js +1 -1
- package/Libraries/Image/Image.ios.js +1 -0
- package/Libraries/Image/Image.windows.js +1 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +2 -0
- package/Libraries/Network/RCTNetworking.android.js +2 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -1
- package/Libraries/Pressability/Pressability.js +7 -1
- package/Libraries/Pressability/Pressability.windows.js +7 -1
- package/Libraries/ReactNative/AppContainer.js +32 -9
- package/Libraries/ReactNative/FabricUIManager.js +7 -0
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +3 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +9 -4
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +28 -13
- package/Libraries/StyleSheet/PlatformColorValueTypes.windows.js +9 -4
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.js +2 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +1 -1
- package/Libraries/StyleSheet/processColor.js +1 -2
- package/Libraries/Utilities/Platform.android.js +6 -8
- package/Libraries/Utilities/Platform.flow.js +84 -0
- package/Libraries/Utilities/Platform.flow.windows.js +111 -0
- package/Libraries/Utilities/Platform.ios.js +6 -8
- package/Libraries/Utilities/Platform.windows.js +6 -8
- package/Microsoft.ReactNative/Fabric/platform/react/components/view/windows/WindowsViewProps.cpp +85 -3
- package/Microsoft.ReactNative/Fabric/platform/react/components/view/windows/WindowsViewProps.h +27 -2
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformTouch.h +10 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.h +10 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +32 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/core/graphicsConversions.h +1 -1
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/Color.h +3 -2
- package/Microsoft.ReactNative/packages.lock.json +40 -41
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/{ViewEventEmitter.cpp → BaseViewEventEmitter.cpp} +12 -12
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/{ViewEventEmitter.h → BaseViewEventEmitter.h} +2 -4
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/{ViewProps.cpp → BaseViewProps.cpp} +14 -97
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/{ViewProps.h → BaseViewProps.h} +7 -8
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.cpp +0 -16
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewShadowNode.cpp +7 -20
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaLayoutableShadowNode.cpp +1020 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaStylableProps.cpp +1 -2
- package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/primitives.h +6 -43
- package/Shared/Shared.vcxitems +5 -2
- package/Shared/Shared.vcxitems.filters +2 -0
- package/package.json +8 -8
- package/types/experimental.d.ts +9 -0
- package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +0 -1445
|
@@ -26,12 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"Microsoft.UI.Xaml": {
|
|
28
28
|
"type": "Direct",
|
|
29
|
-
"requested": "[2.
|
|
30
|
-
"resolved": "2.
|
|
31
|
-
"contentHash": "
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"Microsoft.Web.WebView2": "1.0.1264.42"
|
|
34
|
-
}
|
|
29
|
+
"requested": "[2.7.0-prerelease.210913003, )",
|
|
30
|
+
"resolved": "2.7.0-prerelease.210913003",
|
|
31
|
+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
|
|
35
32
|
},
|
|
36
33
|
"Microsoft.Windows.CppWinRT": {
|
|
37
34
|
"type": "Direct",
|
|
@@ -49,11 +46,6 @@
|
|
|
49
46
|
"resolved": "1.1.1",
|
|
50
47
|
"contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
|
|
51
48
|
},
|
|
52
|
-
"Microsoft.Web.WebView2": {
|
|
53
|
-
"type": "Transitive",
|
|
54
|
-
"resolved": "1.0.1264.42",
|
|
55
|
-
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
|
|
56
|
-
},
|
|
57
49
|
"common": {
|
|
58
50
|
"type": "Project"
|
|
59
51
|
},
|
|
@@ -63,8 +55,8 @@
|
|
|
63
55
|
"folly": {
|
|
64
56
|
"type": "Project",
|
|
65
57
|
"dependencies": {
|
|
66
|
-
"
|
|
67
|
-
"
|
|
58
|
+
"Fmt": "[1.0.0, )",
|
|
59
|
+
"boost": "[1.76.0, )"
|
|
68
60
|
}
|
|
69
61
|
},
|
|
70
62
|
"reactcommon": {
|
|
@@ -76,52 +68,59 @@
|
|
|
76
68
|
}
|
|
77
69
|
},
|
|
78
70
|
"native,Version=v0.0/win10-arm": {
|
|
79
|
-
"Microsoft.
|
|
80
|
-
"type": "
|
|
81
|
-
"
|
|
82
|
-
"
|
|
71
|
+
"Microsoft.UI.Xaml": {
|
|
72
|
+
"type": "Direct",
|
|
73
|
+
"requested": "[2.7.0-prerelease.210913003, )",
|
|
74
|
+
"resolved": "2.7.0-prerelease.210913003",
|
|
75
|
+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
|
|
83
76
|
}
|
|
84
77
|
},
|
|
85
78
|
"native,Version=v0.0/win10-arm-aot": {
|
|
86
|
-
"Microsoft.
|
|
87
|
-
"type": "
|
|
88
|
-
"
|
|
89
|
-
"
|
|
79
|
+
"Microsoft.UI.Xaml": {
|
|
80
|
+
"type": "Direct",
|
|
81
|
+
"requested": "[2.7.0-prerelease.210913003, )",
|
|
82
|
+
"resolved": "2.7.0-prerelease.210913003",
|
|
83
|
+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
|
|
90
84
|
}
|
|
91
85
|
},
|
|
92
86
|
"native,Version=v0.0/win10-arm64-aot": {
|
|
93
|
-
"Microsoft.
|
|
94
|
-
"type": "
|
|
95
|
-
"
|
|
96
|
-
"
|
|
87
|
+
"Microsoft.UI.Xaml": {
|
|
88
|
+
"type": "Direct",
|
|
89
|
+
"requested": "[2.7.0-prerelease.210913003, )",
|
|
90
|
+
"resolved": "2.7.0-prerelease.210913003",
|
|
91
|
+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
|
|
97
92
|
}
|
|
98
93
|
},
|
|
99
94
|
"native,Version=v0.0/win10-x64": {
|
|
100
|
-
"Microsoft.
|
|
101
|
-
"type": "
|
|
102
|
-
"
|
|
103
|
-
"
|
|
95
|
+
"Microsoft.UI.Xaml": {
|
|
96
|
+
"type": "Direct",
|
|
97
|
+
"requested": "[2.7.0-prerelease.210913003, )",
|
|
98
|
+
"resolved": "2.7.0-prerelease.210913003",
|
|
99
|
+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
|
|
104
100
|
}
|
|
105
101
|
},
|
|
106
102
|
"native,Version=v0.0/win10-x64-aot": {
|
|
107
|
-
"Microsoft.
|
|
108
|
-
"type": "
|
|
109
|
-
"
|
|
110
|
-
"
|
|
103
|
+
"Microsoft.UI.Xaml": {
|
|
104
|
+
"type": "Direct",
|
|
105
|
+
"requested": "[2.7.0-prerelease.210913003, )",
|
|
106
|
+
"resolved": "2.7.0-prerelease.210913003",
|
|
107
|
+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
|
|
111
108
|
}
|
|
112
109
|
},
|
|
113
110
|
"native,Version=v0.0/win10-x86": {
|
|
114
|
-
"Microsoft.
|
|
115
|
-
"type": "
|
|
116
|
-
"
|
|
117
|
-
"
|
|
111
|
+
"Microsoft.UI.Xaml": {
|
|
112
|
+
"type": "Direct",
|
|
113
|
+
"requested": "[2.7.0-prerelease.210913003, )",
|
|
114
|
+
"resolved": "2.7.0-prerelease.210913003",
|
|
115
|
+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
|
|
118
116
|
}
|
|
119
117
|
},
|
|
120
118
|
"native,Version=v0.0/win10-x86-aot": {
|
|
121
|
-
"Microsoft.
|
|
122
|
-
"type": "
|
|
123
|
-
"
|
|
124
|
-
"
|
|
119
|
+
"Microsoft.UI.Xaml": {
|
|
120
|
+
"type": "Direct",
|
|
121
|
+
"requested": "[2.7.0-prerelease.210913003, )",
|
|
122
|
+
"resolved": "2.7.0-prerelease.210913003",
|
|
123
|
+
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
|
|
125
124
|
}
|
|
126
125
|
}
|
|
127
126
|
}
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.0.0-canary.
|
|
13
|
+
<ReactNativeWindowsVersion>0.0.0-canary.706</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>0</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>true</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>5b20e6f40a69f9fd0451b4d8426fe69b5c078537</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#include "
|
|
8
|
+
#include "BaseViewEventEmitter.h"
|
|
9
9
|
|
|
10
10
|
namespace facebook::react {
|
|
11
11
|
|
|
12
12
|
#pragma mark - Accessibility
|
|
13
13
|
|
|
14
|
-
void
|
|
14
|
+
void BaseViewEventEmitter::onAccessibilityAction(std::string const &name) const {
|
|
15
15
|
dispatchEvent("accessibilityAction", [name](jsi::Runtime &runtime) {
|
|
16
16
|
auto payload = jsi::Object(runtime);
|
|
17
17
|
payload.setProperty(runtime, "actionName", name);
|
|
@@ -19,21 +19,21 @@ void ViewEventEmitter::onAccessibilityAction(std::string const &name) const {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
void
|
|
22
|
+
void BaseViewEventEmitter::onAccessibilityTap() const {
|
|
23
23
|
dispatchEvent("accessibilityTap");
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
void
|
|
26
|
+
void BaseViewEventEmitter::onAccessibilityMagicTap() const {
|
|
27
27
|
dispatchEvent("magicTap");
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
void
|
|
30
|
+
void BaseViewEventEmitter::onAccessibilityEscape() const {
|
|
31
31
|
dispatchEvent("accessibilityEscape");
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
#pragma mark - Layout
|
|
35
35
|
|
|
36
|
-
void
|
|
36
|
+
void BaseViewEventEmitter::onLayout(const LayoutMetrics &layoutMetrics) const {
|
|
37
37
|
// A copy of a shared pointer (`layoutEventState_`) establishes shared
|
|
38
38
|
// ownership that will be captured by lambda.
|
|
39
39
|
auto layoutEventState = layoutEventState_;
|
|
@@ -54,7 +54,7 @@ void ViewEventEmitter::onLayout(const LayoutMetrics &layoutMetrics) const {
|
|
|
54
54
|
// - Ordering is preserved.
|
|
55
55
|
|
|
56
56
|
{
|
|
57
|
-
std::
|
|
57
|
+
std::scoped_lock guard(layoutEventState->mutex);
|
|
58
58
|
|
|
59
59
|
// If a *particular* `frame` was already dispatched to the JavaScript side,
|
|
60
60
|
// no other work is required.
|
|
@@ -84,7 +84,7 @@ void ViewEventEmitter::onLayout(const LayoutMetrics &layoutMetrics) const {
|
|
|
84
84
|
auto frame = Rect{};
|
|
85
85
|
|
|
86
86
|
{
|
|
87
|
-
std::
|
|
87
|
+
std::scoped_lock guard(layoutEventState->mutex);
|
|
88
88
|
|
|
89
89
|
layoutEventState->isDispatching = false;
|
|
90
90
|
|
|
@@ -115,12 +115,12 @@ void ViewEventEmitter::onLayout(const LayoutMetrics &layoutMetrics) const {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
// [Windows]
|
|
118
|
-
void
|
|
118
|
+
void BaseViewEventEmitter::onFocus() const {
|
|
119
119
|
dispatchEvent("focus");
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
// [Windows]
|
|
123
|
-
void
|
|
123
|
+
void BaseViewEventEmitter::onBlur() const {
|
|
124
124
|
dispatchEvent("blur");
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -139,7 +139,7 @@ static jsi::Value keyboardEventPayload(
|
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
// [Windows]
|
|
142
|
-
void
|
|
142
|
+
void BaseViewEventEmitter::onKeyUp(KeyboardEvent const &event) const {
|
|
143
143
|
dispatchEvent(
|
|
144
144
|
"keyUp",
|
|
145
145
|
[event](jsi::Runtime &runtime) {
|
|
@@ -148,7 +148,7 @@ void ViewEventEmitter::onKeyUp(KeyboardEvent const &event) const {
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
// [Windows]
|
|
151
|
-
void
|
|
151
|
+
void BaseViewEventEmitter::onKeyDown(KeyboardEvent const &event) const {
|
|
152
152
|
dispatchEvent(
|
|
153
153
|
"keyDown",
|
|
154
154
|
[event](jsi::Runtime &runtime) {
|
|
@@ -30,11 +30,9 @@ struct KeyboardEvent {
|
|
|
30
30
|
std::string code{};
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
class
|
|
33
|
+
class BaseViewEventEmitter;
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class ViewEventEmitter : public TouchEventEmitter {
|
|
35
|
+
class BaseViewEventEmitter : public TouchEventEmitter {
|
|
38
36
|
public:
|
|
39
37
|
using TouchEventEmitter::TouchEventEmitter;
|
|
40
38
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
#include "
|
|
8
|
+
#include "BaseViewProps.h"
|
|
9
9
|
|
|
10
10
|
#include <algorithm>
|
|
11
11
|
|
|
@@ -18,14 +18,13 @@
|
|
|
18
18
|
|
|
19
19
|
namespace facebook::react {
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
BaseViewProps::BaseViewProps(
|
|
22
22
|
const PropsParserContext &context,
|
|
23
|
-
|
|
23
|
+
BaseViewProps const &sourceProps,
|
|
24
24
|
RawProps const &rawProps,
|
|
25
25
|
bool shouldSetRawProps)
|
|
26
26
|
: YogaStylableProps(context, sourceProps, rawProps, shouldSetRawProps),
|
|
27
27
|
AccessibilityProps(context, sourceProps, rawProps),
|
|
28
|
-
HostPlatformViewProps(context, sourceProps, rawProps, shouldSetRawProps), // [Windows]
|
|
29
28
|
opacity(
|
|
30
29
|
CoreFeatures::enablePropIteratorSetter ? sourceProps.opacity
|
|
31
30
|
: convertRawProp(
|
|
@@ -191,74 +190,7 @@ ViewProps::ViewProps(
|
|
|
191
190
|
rawProps,
|
|
192
191
|
"removeClippedSubviews",
|
|
193
192
|
sourceProps.removeClippedSubviews,
|
|
194
|
-
false))
|
|
195
|
-
#ifdef ANDROID
|
|
196
|
-
,
|
|
197
|
-
elevation(
|
|
198
|
-
CoreFeatures::enablePropIteratorSetter ? sourceProps.elevation
|
|
199
|
-
: convertRawProp(
|
|
200
|
-
context,
|
|
201
|
-
rawProps,
|
|
202
|
-
"elevation",
|
|
203
|
-
sourceProps.elevation,
|
|
204
|
-
{})),
|
|
205
|
-
nativeBackground(
|
|
206
|
-
CoreFeatures::enablePropIteratorSetter
|
|
207
|
-
? sourceProps.nativeBackground
|
|
208
|
-
: convertRawProp(
|
|
209
|
-
context,
|
|
210
|
-
rawProps,
|
|
211
|
-
"nativeBackgroundAndroid",
|
|
212
|
-
sourceProps.nativeBackground,
|
|
213
|
-
{})),
|
|
214
|
-
nativeForeground(
|
|
215
|
-
CoreFeatures::enablePropIteratorSetter
|
|
216
|
-
? sourceProps.nativeForeground
|
|
217
|
-
: convertRawProp(
|
|
218
|
-
context,
|
|
219
|
-
rawProps,
|
|
220
|
-
"nativeForegroundAndroid",
|
|
221
|
-
sourceProps.nativeForeground,
|
|
222
|
-
{})),
|
|
223
|
-
focusable(
|
|
224
|
-
CoreFeatures::enablePropIteratorSetter ? sourceProps.focusable
|
|
225
|
-
: convertRawProp(
|
|
226
|
-
context,
|
|
227
|
-
rawProps,
|
|
228
|
-
"focusable",
|
|
229
|
-
sourceProps.focusable,
|
|
230
|
-
{})),
|
|
231
|
-
hasTVPreferredFocus(
|
|
232
|
-
CoreFeatures::enablePropIteratorSetter
|
|
233
|
-
? sourceProps.hasTVPreferredFocus
|
|
234
|
-
: convertRawProp(
|
|
235
|
-
context,
|
|
236
|
-
rawProps,
|
|
237
|
-
"hasTVPreferredFocus",
|
|
238
|
-
sourceProps.hasTVPreferredFocus,
|
|
239
|
-
{})),
|
|
240
|
-
needsOffscreenAlphaCompositing(
|
|
241
|
-
CoreFeatures::enablePropIteratorSetter
|
|
242
|
-
? sourceProps.needsOffscreenAlphaCompositing
|
|
243
|
-
: convertRawProp(
|
|
244
|
-
context,
|
|
245
|
-
rawProps,
|
|
246
|
-
"needsOffscreenAlphaCompositing",
|
|
247
|
-
sourceProps.needsOffscreenAlphaCompositing,
|
|
248
|
-
{})),
|
|
249
|
-
renderToHardwareTextureAndroid(
|
|
250
|
-
CoreFeatures::enablePropIteratorSetter
|
|
251
|
-
? sourceProps.renderToHardwareTextureAndroid
|
|
252
|
-
: convertRawProp(
|
|
253
|
-
context,
|
|
254
|
-
rawProps,
|
|
255
|
-
"renderToHardwareTextureAndroid",
|
|
256
|
-
sourceProps.renderToHardwareTextureAndroid,
|
|
257
|
-
{}))
|
|
258
|
-
|
|
259
|
-
#endif
|
|
260
|
-
{
|
|
261
|
-
}
|
|
193
|
+
false)){}
|
|
262
194
|
|
|
263
195
|
#define VIEW_EVENT_CASE(eventType) \
|
|
264
196
|
case CONSTEXPR_RAW_PROPS_KEY_HASH("on" #eventType): { \
|
|
@@ -272,7 +204,7 @@ ViewProps::ViewProps(
|
|
|
272
204
|
return; \
|
|
273
205
|
}
|
|
274
206
|
|
|
275
|
-
void
|
|
207
|
+
void BaseViewProps::setProp(
|
|
276
208
|
const PropsParserContext &context,
|
|
277
209
|
RawPropsPropNameHash hash,
|
|
278
210
|
const char *propName,
|
|
@@ -282,9 +214,8 @@ void ViewProps::setProp(
|
|
|
282
214
|
// reuse the same values.
|
|
283
215
|
YogaStylableProps::setProp(context, hash, propName, value);
|
|
284
216
|
AccessibilityProps::setProp(context, hash, propName, value);
|
|
285
|
-
HostPlatformViewProps::setProp(context, hash, propName, value); // [Windows]
|
|
286
217
|
|
|
287
|
-
static auto defaults =
|
|
218
|
+
static auto defaults = BaseViewProps{};
|
|
288
219
|
|
|
289
220
|
switch (hash) {
|
|
290
221
|
RAW_SET_PROP_SWITCH_CASE_BASIC(opacity);
|
|
@@ -302,6 +233,7 @@ void ViewProps::setProp(
|
|
|
302
233
|
RAW_SET_PROP_SWITCH_CASE_BASIC(onLayout);
|
|
303
234
|
RAW_SET_PROP_SWITCH_CASE_BASIC(collapsable);
|
|
304
235
|
RAW_SET_PROP_SWITCH_CASE_BASIC(removeClippedSubviews);
|
|
236
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(experimental_layoutConformance);
|
|
305
237
|
// events field
|
|
306
238
|
VIEW_EVENT_CASE(PointerEnter);
|
|
307
239
|
VIEW_EVENT_CASE(PointerEnterCapture);
|
|
@@ -331,15 +263,6 @@ void ViewProps::setProp(
|
|
|
331
263
|
VIEW_EVENT_CASE(MouseEnter); // [Windows]
|
|
332
264
|
VIEW_EVENT_CASE(MouseLeave); // [Windows]
|
|
333
265
|
|
|
334
|
-
#ifdef ANDROID
|
|
335
|
-
RAW_SET_PROP_SWITCH_CASE_BASIC(elevation);
|
|
336
|
-
RAW_SET_PROP_SWITCH_CASE(nativeBackground, "nativeBackgroundAndroid");
|
|
337
|
-
RAW_SET_PROP_SWITCH_CASE(nativeForeground, "nativeForegroundAndroid");
|
|
338
|
-
RAW_SET_PROP_SWITCH_CASE_BASIC(focusable);
|
|
339
|
-
RAW_SET_PROP_SWITCH_CASE_BASIC(hasTVPreferredFocus);
|
|
340
|
-
RAW_SET_PROP_SWITCH_CASE_BASIC(needsOffscreenAlphaCompositing);
|
|
341
|
-
RAW_SET_PROP_SWITCH_CASE_BASIC(renderToHardwareTextureAndroid);
|
|
342
|
-
#endif
|
|
343
266
|
// BorderRadii
|
|
344
267
|
SET_CASCADED_RECTANGLE_CORNERS(borderRadii, "border", "Radius", value);
|
|
345
268
|
SET_CASCADED_RECTANGLE_EDGES(borderColors, "border", "Color", value);
|
|
@@ -385,7 +308,7 @@ static BorderRadii ensureNoOverlap(BorderRadii const &radii, Size const &size) {
|
|
|
385
308
|
};
|
|
386
309
|
}
|
|
387
310
|
|
|
388
|
-
BorderMetrics
|
|
311
|
+
BorderMetrics BaseViewProps::resolveBorderMetrics(
|
|
389
312
|
LayoutMetrics const &layoutMetrics) const {
|
|
390
313
|
auto isRTL =
|
|
391
314
|
bool{layoutMetrics.layoutDirection == LayoutDirection::RightToLeft};
|
|
@@ -417,33 +340,27 @@ BorderMetrics ViewProps::resolveBorderMetrics(
|
|
|
417
340
|
};
|
|
418
341
|
}
|
|
419
342
|
|
|
420
|
-
bool
|
|
343
|
+
bool BaseViewProps::getClipsContentToBounds() const {
|
|
421
344
|
return yogaStyle.overflow() != YGOverflowVisible;
|
|
422
345
|
}
|
|
423
346
|
|
|
424
|
-
#ifdef ANDROID
|
|
425
|
-
bool ViewProps::getProbablyMoreHorizontalThanVertical_DEPRECATED() const {
|
|
426
|
-
return yogaStyle.flexDirection() == YGFlexDirectionRow;
|
|
427
|
-
}
|
|
428
|
-
#endif
|
|
429
|
-
|
|
430
347
|
#pragma mark - DebugStringConvertible
|
|
431
348
|
|
|
432
349
|
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
433
|
-
SharedDebugStringConvertibleList
|
|
434
|
-
const auto &
|
|
350
|
+
SharedDebugStringConvertibleList BaseViewProps::getDebugProps() const {
|
|
351
|
+
const auto &defaultBaseViewProps = BaseViewProps();
|
|
435
352
|
|
|
436
353
|
return AccessibilityProps::getDebugProps() +
|
|
437
354
|
YogaStylableProps::getDebugProps() +
|
|
438
355
|
SharedDebugStringConvertibleList{
|
|
439
356
|
debugStringConvertibleItem(
|
|
440
|
-
"opacity", opacity,
|
|
357
|
+
"opacity", opacity, defaultBaseViewProps.opacity),
|
|
441
358
|
debugStringConvertibleItem(
|
|
442
359
|
"backgroundColor",
|
|
443
360
|
backgroundColor,
|
|
444
|
-
|
|
361
|
+
defaultBaseViewProps.backgroundColor),
|
|
445
362
|
debugStringConvertibleItem(
|
|
446
|
-
"zIndex", zIndex,
|
|
363
|
+
"zIndex", zIndex, defaultBaseViewProps.zIndex.value_or(0)),
|
|
447
364
|
};
|
|
448
365
|
}
|
|
449
366
|
#endif
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
|
|
10
10
|
#include <react/renderer/components/view/AccessibilityProps.h>
|
|
11
11
|
#include <react/renderer/components/view/YogaStylableProps.h>
|
|
12
|
-
#include <react/renderer/components/view/HostPlatformViewProps.h> // [Windows]
|
|
13
12
|
#include <react/renderer/components/view/primitives.h>
|
|
14
13
|
#include <react/renderer/core/LayoutMetrics.h>
|
|
15
14
|
#include <react/renderer/core/Props.h>
|
|
@@ -21,16 +20,14 @@
|
|
|
21
20
|
|
|
22
21
|
namespace facebook::react {
|
|
23
22
|
|
|
24
|
-
class
|
|
23
|
+
class BaseViewProps;
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class ViewProps : public YogaStylableProps, public AccessibilityProps, public HostPlatformViewProps { // [Windows] added HostPlatformViewProps
|
|
25
|
+
class BaseViewProps : public YogaStylableProps, public AccessibilityProps{
|
|
29
26
|
public:
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
BaseViewProps() = default;
|
|
28
|
+
BaseViewProps(
|
|
32
29
|
const PropsParserContext &context,
|
|
33
|
-
|
|
30
|
+
BaseViewProps const &sourceProps,
|
|
34
31
|
RawProps const &rawProps,
|
|
35
32
|
bool shouldSetRawProps = true);
|
|
36
33
|
|
|
@@ -80,6 +77,8 @@ class ViewProps : public YogaStylableProps, public AccessibilityProps, public Ho
|
|
|
80
77
|
|
|
81
78
|
bool removeClippedSubviews{false};
|
|
82
79
|
|
|
80
|
+
LayoutConformance experimental_layoutConformance{};
|
|
81
|
+
|
|
83
82
|
Float elevation{}; /* Android-only */
|
|
84
83
|
|
|
85
84
|
#ifdef ANDROID
|
package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/TouchEventEmitter.cpp
CHANGED
|
@@ -11,22 +11,6 @@ namespace facebook::react {
|
|
|
11
11
|
|
|
12
12
|
#pragma mark - Touches
|
|
13
13
|
|
|
14
|
-
static void setTouchPayloadOnObject(
|
|
15
|
-
jsi::Object &object,
|
|
16
|
-
jsi::Runtime &runtime,
|
|
17
|
-
Touch const &touch) {
|
|
18
|
-
object.setProperty(runtime, "locationX", touch.offsetPoint.x);
|
|
19
|
-
object.setProperty(runtime, "locationY", touch.offsetPoint.y);
|
|
20
|
-
object.setProperty(runtime, "pageX", touch.pagePoint.x);
|
|
21
|
-
object.setProperty(runtime, "pageY", touch.pagePoint.y);
|
|
22
|
-
object.setProperty(runtime, "screenX", touch.screenPoint.x);
|
|
23
|
-
object.setProperty(runtime, "screenY", touch.screenPoint.y);
|
|
24
|
-
object.setProperty(runtime, "identifier", touch.identifier);
|
|
25
|
-
object.setProperty(runtime, "target", touch.target);
|
|
26
|
-
object.setProperty(runtime, "timestamp", touch.timestamp * 1000);
|
|
27
|
-
object.setProperty(runtime, "force", touch.force);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
14
|
static jsi::Value touchesPayload(
|
|
31
15
|
jsi::Runtime &runtime,
|
|
32
16
|
Touches const &touches) {
|
package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewShadowNode.cpp
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
#include "ViewShadowNode.h"
|
|
9
9
|
#include <react/config/ReactNativeConfig.h>
|
|
10
|
+
#include <react/renderer/components/view/HostPlatformViewTraitsInitializer.h>
|
|
10
11
|
#include <react/renderer/components/view/primitives.h>
|
|
11
12
|
#include <react/utils/CoreFeatures.h>
|
|
12
13
|
|
|
@@ -54,28 +55,16 @@ void ViewShadowNode::initialize() noexcept {
|
|
|
54
55
|
viewProps.accessibilityElementsHidden ||
|
|
55
56
|
viewProps.accessibilityViewIsModal ||
|
|
56
57
|
viewProps.importantForAccessibility != ImportantForAccessibility::Auto ||
|
|
57
|
-
viewProps.removeClippedSubviews
|
|
58
|
+
viewProps.removeClippedSubviews ||
|
|
59
|
+
HostPlatformViewTraitsInitializer::formsStackingContext(viewProps);
|
|
58
60
|
|
|
59
|
-
|
|
60
|
-
formsStackingContext = formsStackingContext || viewProps.elevation != 0;
|
|
61
|
-
#endif
|
|
62
|
-
|
|
63
|
-
formsStackingContext = formsStackingContext || HostPlatformViewProps::requiresFormsStackingContext(viewProps); // [Windows]
|
|
61
|
+
formsStackingContext = formsStackingContext || WindowsViewProps::requiresFormsStackingContext(viewProps); // [Windows]
|
|
64
62
|
|
|
65
63
|
bool formsView = formsStackingContext ||
|
|
66
64
|
isColorMeaningful(viewProps.backgroundColor) ||
|
|
67
65
|
!(viewProps.yogaStyle.border() == YGStyle::Edges{}) ||
|
|
68
|
-
!viewProps.testId.empty()
|
|
69
|
-
|
|
70
|
-
formsView = formsView || HostPlatformViewProps::requiresFormsView(viewProps); // [Windows]
|
|
71
|
-
|
|
72
|
-
#ifdef ANDROID
|
|
73
|
-
formsView = formsView || viewProps.nativeBackground.has_value() ||
|
|
74
|
-
viewProps.nativeForeground.has_value() || viewProps.focusable ||
|
|
75
|
-
viewProps.hasTVPreferredFocus ||
|
|
76
|
-
viewProps.needsOffscreenAlphaCompositing ||
|
|
77
|
-
viewProps.renderToHardwareTextureAndroid;
|
|
78
|
-
#endif
|
|
66
|
+
!viewProps.testId.empty() ||
|
|
67
|
+
HostPlatformViewTraitsInitializer::formsView(viewProps);
|
|
79
68
|
|
|
80
69
|
if (formsView) {
|
|
81
70
|
traits_.set(ShadowNodeTraits::Trait::FormsView);
|
|
@@ -89,9 +78,7 @@ void ViewShadowNode::initialize() noexcept {
|
|
|
89
78
|
traits_.unset(ShadowNodeTraits::Trait::FormsStackingContext);
|
|
90
79
|
}
|
|
91
80
|
|
|
92
|
-
|
|
93
|
-
traits_.set(ShadowNodeTraits::Trait::AndroidMapBufferPropsSupported);
|
|
94
|
-
#endif
|
|
81
|
+
traits_.set(HostPlatformViewTraitsInitializer::extraTraits());
|
|
95
82
|
}
|
|
96
83
|
|
|
97
84
|
} // namespace facebook::react
|