react-native 0.89.0-nightly-20261104-edf2b86e6 → 0.89.0-rc.0
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/Libraries/Animated/AnimatedExports.js +10 -6
- package/Libraries/Animated/AnimatedExports.js.flow +0 -6
- package/Libraries/Animated/nodes/AnimatedProps.js +0 -3
- package/Libraries/Components/StatusBar/StatusBar.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/WebSocket/WebSocket.js +1 -3
- package/React/Base/RCTVersion.m +1 -1
- package/React/Tests/Text/RCTAttributedTextUtilsTest.mm +0 -71
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/hermes-engine/build.gradle.kts +1 -5
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +1 -13
- package/ReactAndroid/src/main/jni/react/jni/InspectorNetworkRequestListener.cpp +0 -1
- package/ReactCommon/jsinspector-modern/InspectorInterfaces.cpp +0 -1
- package/ReactCommon/jsinspector-modern/NetworkIOAgent.h +0 -1
- package/ReactCommon/jsinspector-modern/RuntimeTargetNetwork.cpp +3 -22
- package/ReactCommon/jsinspector-modern/network/CdpNetwork.h +0 -1
- package/ReactCommon/jsinspector-modern/network/NetworkHandler.h +0 -1
- package/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp +0 -69
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +2 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h +5 -1
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +4 -4
- package/ReactCommon/react/renderer/components/textinput/BaseTextInputShadowNode.h +1 -3
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +0 -7
- package/ReactCommon/react/utils/ReactNativeVersion.h +1 -1
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +3 -38
- package/ReactCommon/yoga/yoga/style/StyleValueHandle.h +4 -0
- package/ReactCommon/yoga/yoga/style/StyleValuePool.h +3 -14
- package/index.js +0 -20
- package/index.js.flow +0 -6
- package/package.json +8 -8
- package/scripts/cocoapods/autolinking.rb +0 -1
- package/scripts/cocoapods/utils.rb +0 -18
- package/scripts/react_native_pods.rb +0 -3
- package/scripts/setup-apple-spm.js +180 -228
- package/scripts/spm/generate-spm-xcodeproj.js +3 -39
- package/scripts/spm/read-podspec.js +0 -1
- package/scripts/spm/spm-types.js +3 -9
- package/sdks/.hermesv1version +1 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +2 -2
- package/src/private/webapis/geometry/DOMRectReadOnly.js +1 -1
- package/types_DEPRECATED/Libraries/Animated/Animated.d.ts +28 -42
- package/types_generated/Libraries/Animated/AnimatedExports.d.ts +1 -7
- package/types_generated/index.d.ts +1 -7
|
@@ -27,37 +27,41 @@ const Animated: typeof AnimatedImplementation = Platform.isDisableAnimations
|
|
|
27
27
|
|
|
28
28
|
export default {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* FlatList and SectionList infer generic Type defined under their `data` and `section` props.
|
|
31
31
|
*/
|
|
32
32
|
get FlatList(): AnimatedFlatList<> {
|
|
33
33
|
return require('./components/AnimatedFlatList').default;
|
|
34
34
|
},
|
|
35
35
|
/**
|
|
36
|
-
*
|
|
36
|
+
* Animated variants of the basic native views. Accepts Animated.Value for
|
|
37
|
+
* props and style.
|
|
37
38
|
*/
|
|
38
39
|
get Image(): AnimatedImage {
|
|
39
40
|
return require('./components/AnimatedImage').default;
|
|
40
41
|
},
|
|
41
42
|
/**
|
|
42
|
-
*
|
|
43
|
+
* Animated variants of the basic native views. Accepts Animated.Value for
|
|
44
|
+
* props and style.
|
|
43
45
|
*/
|
|
44
46
|
get ScrollView(): AnimatedScrollView {
|
|
45
47
|
return require('./components/AnimatedScrollView').default;
|
|
46
48
|
},
|
|
47
49
|
/**
|
|
48
|
-
*
|
|
50
|
+
* FlatList and SectionList infer generic Type defined under their `data` and `section` props.
|
|
49
51
|
*/
|
|
50
52
|
get SectionList(): AnimatedSectionList<> {
|
|
51
53
|
return require('./components/AnimatedSectionList').default;
|
|
52
54
|
},
|
|
53
55
|
/**
|
|
54
|
-
*
|
|
56
|
+
* Animated variants of the basic native views. Accepts Animated.Value for
|
|
57
|
+
* props and style.
|
|
55
58
|
*/
|
|
56
59
|
get Text(): AnimatedText {
|
|
57
60
|
return require('./components/AnimatedText').default;
|
|
58
61
|
},
|
|
59
62
|
/**
|
|
60
|
-
*
|
|
63
|
+
* Animated variants of the basic native views. Accepts Animated.Value for
|
|
64
|
+
* props and style.
|
|
61
65
|
*/
|
|
62
66
|
get View(): AnimatedView {
|
|
63
67
|
return require('./components/AnimatedView').default;
|
|
@@ -15,17 +15,11 @@ export type {DecayAnimationConfig} from './animations/DecayAnimation';
|
|
|
15
15
|
export type {SpringAnimationConfig} from './animations/SpringAnimation';
|
|
16
16
|
export type {TimingAnimationConfig} from './animations/TimingAnimation';
|
|
17
17
|
|
|
18
|
-
/** @deprecated Use `AnimatedFlatList` instead. */
|
|
19
18
|
export {default as FlatList} from './components/AnimatedFlatList';
|
|
20
|
-
/** @deprecated Use `AnimatedImage` instead. */
|
|
21
19
|
export {default as Image} from './components/AnimatedImage';
|
|
22
|
-
/** @deprecated Use `AnimatedScrollView` instead. */
|
|
23
20
|
export {default as ScrollView} from './components/AnimatedScrollView';
|
|
24
|
-
/** @deprecated Use `AnimatedSectionList` instead. */
|
|
25
21
|
export {default as SectionList} from './components/AnimatedSectionList';
|
|
26
|
-
/** @deprecated Use `AnimatedText` instead. */
|
|
27
22
|
export {default as Text} from './components/AnimatedText';
|
|
28
|
-
/** @deprecated Use `AnimatedView` instead. */
|
|
29
23
|
export {default as View} from './components/AnimatedView';
|
|
30
24
|
export {default as Color} from './nodes/AnimatedColor';
|
|
31
25
|
export {AnimatedEvent as Event} from './AnimatedEvent';
|
|
@@ -268,9 +268,6 @@ export default class AnimatedProps extends AnimatedNode {
|
|
|
268
268
|
if (this._target?.instance === instance) {
|
|
269
269
|
return;
|
|
270
270
|
}
|
|
271
|
-
if (this.__isNative && this._target != null) {
|
|
272
|
-
this.#disconnectAnimatedView(this._target);
|
|
273
|
-
}
|
|
274
271
|
const target = (this._target = {instance, connectedViewTag: null});
|
|
275
272
|
if (this.__isNative) {
|
|
276
273
|
this.#connectAnimatedView(target);
|
|
@@ -141,7 +141,7 @@ function mergePropsStack(
|
|
|
141
141
|
propsStack: Array<StackProps>,
|
|
142
142
|
defaultValues: ResolvedStackProps,
|
|
143
143
|
): ResolvedStackProps {
|
|
144
|
-
const merged: ResolvedStackProps = propsStack.reduce
|
|
144
|
+
const merged: ResolvedStackProps = propsStack.reduce(
|
|
145
145
|
(prev, cur) => {
|
|
146
146
|
for (const prop in cur) {
|
|
147
147
|
// $FlowFixMe[invalid-computed-prop] dynamic merge over the known StackProps keys
|
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 89;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = '
|
|
32
|
+
static prerelease: string | null = 'rc.0';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -143,10 +143,8 @@ class WebSocket extends EventTarget {
|
|
|
143
143
|
);
|
|
144
144
|
this._socketId = nextWebSocketId++;
|
|
145
145
|
this._registerEvents();
|
|
146
|
-
// Skip this constructor's own frame so that the request initiator stack
|
|
147
|
-
// starts at the caller of `new WebSocket()`.
|
|
148
146
|
const devToolsRequestId =
|
|
149
|
-
global.__NETWORK_REPORTER__?.createDevToolsRequestId(
|
|
147
|
+
global.__NETWORK_REPORTER__?.createDevToolsRequestId();
|
|
150
148
|
NativeWebSocketModule.connect(
|
|
151
149
|
url,
|
|
152
150
|
protocolList,
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
#import <react/renderer/textlayoutmanager/RCTFontUtils.h>
|
|
15
15
|
|
|
16
16
|
#include <react/renderer/attributedstring/conversions.h>
|
|
17
|
-
#include <react/renderer/core/EventEmitter.h>
|
|
18
17
|
#include <react/renderer/core/RawValue.h>
|
|
19
18
|
|
|
20
19
|
#include <array>
|
|
@@ -246,76 +245,6 @@ static NSDictionary<NSNumber *, NSNumber *> *FontVariationsFromSettings(std::opt
|
|
|
246
245
|
attributedString2, attributedString1, insensitiveAttributes, TextAttributes{}));
|
|
247
246
|
}
|
|
248
247
|
|
|
249
|
-
- (void)testSamenessOfDifferentEventEmitters
|
|
250
|
-
{
|
|
251
|
-
// The emitter is metadata a TextInput never dispatches through, so even a different one is not a difference.
|
|
252
|
-
auto eventEmitter1 = std::make_shared<const EventEmitter>(nullptr, EventDispatcher::Weak{});
|
|
253
|
-
auto eventEmitter2 = std::make_shared<const EventEmitter>(nullptr, EventDispatcher::Weak{});
|
|
254
|
-
|
|
255
|
-
NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
256
|
-
[attributedString1 addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 5)];
|
|
257
|
-
[attributedString1 addAttribute:RCTAttributedStringEventEmitterKey
|
|
258
|
-
value:RCTWrapEventEmitter(eventEmitter1)
|
|
259
|
-
range:NSMakeRange(0, 12)];
|
|
260
|
-
|
|
261
|
-
NSMutableAttributedString *attributedString2 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
262
|
-
[attributedString2 addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 5)];
|
|
263
|
-
[attributedString2 addAttribute:RCTAttributedStringEventEmitterKey
|
|
264
|
-
value:RCTWrapEventEmitter(eventEmitter2)
|
|
265
|
-
range:NSMakeRange(0, 12)];
|
|
266
|
-
|
|
267
|
-
NSDictionary<NSAttributedStringKey, id> *insensitiveAttributes = @{};
|
|
268
|
-
|
|
269
|
-
XCTAssertTrue(RCTIsAttributedStringEffectivelySame(
|
|
270
|
-
attributedString1, attributedString2, insensitiveAttributes, TextAttributes{}));
|
|
271
|
-
XCTAssertTrue(RCTIsAttributedStringEffectivelySame(
|
|
272
|
-
attributedString2, attributedString1, insensitiveAttributes, TextAttributes{}));
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
- (void)testSamenessOfMissingEventEmitter
|
|
276
|
-
{
|
|
277
|
-
// Text typed into a field carries no event emitter; the state echoing it does.
|
|
278
|
-
auto eventEmitter = std::make_shared<const EventEmitter>(nullptr, EventDispatcher::Weak{});
|
|
279
|
-
|
|
280
|
-
NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
281
|
-
[attributedString1 addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 5)];
|
|
282
|
-
[attributedString1 addAttribute:RCTAttributedStringEventEmitterKey
|
|
283
|
-
value:RCTWrapEventEmitter(eventEmitter)
|
|
284
|
-
range:NSMakeRange(0, 12)];
|
|
285
|
-
|
|
286
|
-
NSMutableAttributedString *attributedString2 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
287
|
-
[attributedString2 addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 5)];
|
|
288
|
-
|
|
289
|
-
NSDictionary<NSAttributedStringKey, id> *insensitiveAttributes = @{};
|
|
290
|
-
|
|
291
|
-
XCTAssertTrue(RCTIsAttributedStringEffectivelySame(
|
|
292
|
-
attributedString1, attributedString2, insensitiveAttributes, TextAttributes{}));
|
|
293
|
-
XCTAssertTrue(RCTIsAttributedStringEffectivelySame(
|
|
294
|
-
attributedString2, attributedString1, insensitiveAttributes, TextAttributes{}));
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
- (void)testDifferenceOfOtherAttributesNextToEventEmitter
|
|
298
|
-
{
|
|
299
|
-
// Ignoring the event emitter must not hide a real difference in the same run.
|
|
300
|
-
auto eventEmitter = std::make_shared<const EventEmitter>(nullptr, EventDispatcher::Weak{});
|
|
301
|
-
|
|
302
|
-
NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
303
|
-
[attributedString1 addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, 12)];
|
|
304
|
-
[attributedString1 addAttribute:RCTAttributedStringEventEmitterKey
|
|
305
|
-
value:RCTWrapEventEmitter(eventEmitter)
|
|
306
|
-
range:NSMakeRange(0, 12)];
|
|
307
|
-
|
|
308
|
-
NSMutableAttributedString *attributedString2 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
309
|
-
[attributedString2 addAttribute:NSForegroundColorAttributeName value:[UIColor blueColor] range:NSMakeRange(0, 12)];
|
|
310
|
-
|
|
311
|
-
NSDictionary<NSAttributedStringKey, id> *insensitiveAttributes = @{};
|
|
312
|
-
|
|
313
|
-
XCTAssertFalse(RCTIsAttributedStringEffectivelySame(
|
|
314
|
-
attributedString1, attributedString2, insensitiveAttributes, TextAttributes{}));
|
|
315
|
-
XCTAssertFalse(RCTIsAttributedStringEffectivelySame(
|
|
316
|
-
attributedString2, attributedString1, insensitiveAttributes, TextAttributes{}));
|
|
317
|
-
}
|
|
318
|
-
|
|
319
248
|
- (void)testSamenessOfResolvedParagraphStyleLtr
|
|
320
249
|
{
|
|
321
250
|
NSMutableAttributedString *attributedString1 = [[NSMutableAttributedString alloc] initWithString:@"Hello world!"];
|
|
@@ -99,11 +99,7 @@ val prefabHeadersDir = File("$buildDir/prefab-headers")
|
|
|
99
99
|
// CMake reads the backslashes of a Windows path as escape sequences, so we pass forward slashes.
|
|
100
100
|
val jsiDir = File(reactNativeRootDir, "ReactCommon/jsi")
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
// version, like it already does for the other third-party sources. Release tags are
|
|
104
|
-
// `hermes-v<version>`, so that prefix is stripped to keep the name at `hermes-<version>.tar.gz`.
|
|
105
|
-
val hermesTarballName = "hermes-${hermesVersionProvider.get().removePrefix("hermes-v")}.tar.gz"
|
|
106
|
-
val downloadHermesDest = File(downloadsDir, hermesTarballName)
|
|
102
|
+
val downloadHermesDest = File(downloadsDir, "hermes.tar.gz")
|
|
107
103
|
val downloadHermes by
|
|
108
104
|
tasks.registering(Download::class) {
|
|
109
105
|
src(
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<a1368426dd823245c54b4312ae7b14e6>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -157,7 +157,7 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
|
|
157
157
|
|
|
158
158
|
override fun fuseboxScreenshotCaptureEnabled(): Boolean = true
|
|
159
159
|
|
|
160
|
-
override fun fuseboxWebSocketEventsEnabled(): Boolean =
|
|
160
|
+
override fun fuseboxWebSocketEventsEnabled(): Boolean = false
|
|
161
161
|
|
|
162
162
|
override fun keepTimersRunningWhileHostPausedAndroid(): Boolean = false
|
|
163
163
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<c82895ef7e5cee6ba387620a43aa88b8>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -37,6 +37,8 @@ public open class ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android : ReactN
|
|
|
37
37
|
|
|
38
38
|
override fun fuseboxFrameRecordingEnabled(): Boolean = true
|
|
39
39
|
|
|
40
|
+
override fun fuseboxWebSocketEventsEnabled(): Boolean = true
|
|
41
|
+
|
|
40
42
|
override fun useNativeViewConfigsInBridgelessMode(): Boolean = true
|
|
41
43
|
|
|
42
44
|
override fun useTurboModuleInterop(): Boolean = true
|
|
@@ -40,7 +40,6 @@ public object ReactScrollViewHelper {
|
|
|
40
40
|
private val TAG = ReactScrollView::class.java.simpleName
|
|
41
41
|
private val DEBUG_MODE = false // ReactBuildConfig.DEBUG
|
|
42
42
|
|
|
43
|
-
private const val UNSET_SCROLL_POSITION = -1
|
|
44
43
|
private const val CONTENT_OFFSET_LEFT = "contentOffsetLeft"
|
|
45
44
|
private const val CONTENT_OFFSET_TOP = "contentOffsetTop"
|
|
46
45
|
private const val SCROLL_AWAY_PADDING_TOP = "scrollAwayPaddingTop"
|
|
@@ -374,17 +373,6 @@ public object ReactScrollViewHelper {
|
|
|
374
373
|
// User driven scrolling should disable scroll state updates coming from Fabric
|
|
375
374
|
scrollState.isUpdatedByScroll = true
|
|
376
375
|
|
|
377
|
-
// Until a view sends its first update it doesn't know the offset in its state. On mount that
|
|
378
|
-
// offset is usually already correct, and sending it again would only commit an unchanged tree.
|
|
379
|
-
if (scrollState.lastStateUpdateScroll.equals(UNSET_SCROLL_POSITION, UNSET_SCROLL_POSITION)) {
|
|
380
|
-
scrollView.stateWrapper?.stateData?.let { stateData ->
|
|
381
|
-
scrollState.setLastStateUpdateScroll(
|
|
382
|
-
toPixelFromDIP(stateData.getDouble(CONTENT_OFFSET_LEFT)).toInt(),
|
|
383
|
-
toPixelFromDIP(stateData.getDouble(CONTENT_OFFSET_TOP)).toInt(),
|
|
384
|
-
)
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
|
|
388
376
|
// Dedupe events to reduce JNI traffic
|
|
389
377
|
if (scrollState.lastStateUpdateScroll.equals(scrollX, scrollY)) {
|
|
390
378
|
return
|
|
@@ -672,7 +660,7 @@ public object ReactScrollViewHelper {
|
|
|
672
660
|
/** Get the padding on the bottom for tab bar */
|
|
673
661
|
var scrollAwayPaddingBottom: Int = 0,
|
|
674
662
|
/** Get the Fabric state of last scroll position */
|
|
675
|
-
val lastStateUpdateScroll: Point = Point(
|
|
663
|
+
val lastStateUpdateScroll: Point = Point(-1, -1),
|
|
676
664
|
/** Get true if the previous animation was canceled */
|
|
677
665
|
var isCanceled: Boolean = false,
|
|
678
666
|
/** Get true if previous animation was finished */
|
|
@@ -11,8 +11,6 @@
|
|
|
11
11
|
|
|
12
12
|
#include <react/utils/Uuid.h>
|
|
13
13
|
|
|
14
|
-
#include <algorithm>
|
|
15
|
-
|
|
16
14
|
using namespace facebook::jsi;
|
|
17
15
|
using namespace std::string_literals;
|
|
18
16
|
|
|
@@ -46,16 +44,8 @@ void RuntimeTarget::installNetworkReporterAPI() {
|
|
|
46
44
|
auto jsiCreateDevToolsRequestId = [selfWeak = weak_from_this()](
|
|
47
45
|
Runtime& runtime,
|
|
48
46
|
const Value& /*thisVal*/,
|
|
49
|
-
const Value* args
|
|
50
|
-
size_t count) -> Value {
|
|
51
|
-
// Optional `framesToSkip` argument: the number of leading JS call frames
|
|
52
|
-
// that belong to the calling API's own implementation (e.g. the `WebSocket`
|
|
53
|
-
// constructor), which are omitted from the recorded initiator stack so
|
|
54
|
-
// that its top frame is the code that invoked the API.
|
|
55
|
-
size_t framesToSkip = 0;
|
|
56
|
-
if (count > 0 && args[0].isNumber()) {
|
|
57
|
-
framesToSkip = static_cast<size_t>(std::max(0.0, args[0].asNumber()));
|
|
58
|
-
}
|
|
47
|
+
const Value* /*args*/,
|
|
48
|
+
size_t /*count*/) -> Value {
|
|
59
49
|
std::optional<std::string> devToolsRequestId;
|
|
60
50
|
tryExecuteSync(selfWeak, [&](RuntimeTarget& self) {
|
|
61
51
|
devToolsRequestId = self.createNetworkRequestId();
|
|
@@ -68,15 +58,6 @@ void RuntimeTarget::installNetworkReporterAPI() {
|
|
|
68
58
|
auto stackTrace = self.delegate_.captureStackTrace(runtime);
|
|
69
59
|
auto cdpStackTrace = self.delegate_.serializeStackTrace(*stackTrace);
|
|
70
60
|
if (cdpStackTrace) {
|
|
71
|
-
if (framesToSkip > 0) {
|
|
72
|
-
if (auto* callFrames = cdpStackTrace->get_ptr("callFrames");
|
|
73
|
-
callFrames != nullptr && callFrames->isArray()) {
|
|
74
|
-
callFrames->erase(
|
|
75
|
-
callFrames->begin(),
|
|
76
|
-
callFrames->begin() +
|
|
77
|
-
std::min(framesToSkip, callFrames->size()));
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
61
|
NetworkHandler::getInstance().recordRequestInitiatorStack(
|
|
81
62
|
*devToolsRequestId, std::move(*cdpStackTrace));
|
|
82
63
|
}
|
|
@@ -100,7 +81,7 @@ void RuntimeTarget::installNetworkReporterAPI() {
|
|
|
100
81
|
Function::createFromHostFunction(
|
|
101
82
|
runtime,
|
|
102
83
|
PropNameID::forAscii(runtime, "createDevToolsRequestId"),
|
|
103
|
-
|
|
84
|
+
0,
|
|
104
85
|
jsiCreateDevToolsRequestId));
|
|
105
86
|
networkReporterApi = objectFreeze(runtime, std::move(networkReporterApi));
|
|
106
87
|
globalObj.setProperty(runtime, "__NETWORK_REPORTER__", networkReporterApi);
|
|
@@ -625,75 +625,6 @@ TEST_P(NetworkReporterTest, testWebSocketCreatedWithInitiator) {
|
|
|
625
625
|
})");
|
|
626
626
|
}
|
|
627
627
|
|
|
628
|
-
TEST_P(NetworkReporterTest, testWebSocketCreatedWithInitiatorFramesToSkip) {
|
|
629
|
-
InSequence s;
|
|
630
|
-
|
|
631
|
-
this->expectMessageFromPage(JsonEq(R"({
|
|
632
|
-
"id": 0,
|
|
633
|
-
"result": {}
|
|
634
|
-
})"));
|
|
635
|
-
this->toPage_->sendMessage(R"({
|
|
636
|
-
"id": 0,
|
|
637
|
-
"method": "Debugger.enable"
|
|
638
|
-
})");
|
|
639
|
-
|
|
640
|
-
this->expectMessageFromPage(JsonEq(R"({
|
|
641
|
-
"id": 1,
|
|
642
|
-
"result": {}
|
|
643
|
-
})"));
|
|
644
|
-
this->toPage_->sendMessage(R"({
|
|
645
|
-
"id": 1,
|
|
646
|
-
"method": "Network.enable"
|
|
647
|
-
})");
|
|
648
|
-
|
|
649
|
-
auto& runtime = engineAdapter_->getRuntime();
|
|
650
|
-
|
|
651
|
-
// `apiShim` stands in for an API implementation (such as the `WebSocket`
|
|
652
|
-
// constructor) that asks for its own frame to be omitted.
|
|
653
|
-
auto requestId = this->eval(R"( // line 0
|
|
654
|
-
function apiShim() { // line 1
|
|
655
|
-
return globalThis.__NETWORK_REPORTER__.createDevToolsRequestId(1); // line 2
|
|
656
|
-
} // line 3
|
|
657
|
-
function openSocket() { // line 4
|
|
658
|
-
return apiShim(); // line 5
|
|
659
|
-
} // line 6
|
|
660
|
-
openSocket(); // line 7
|
|
661
|
-
|
|
662
|
-
//# sourceURL=webSocketInitiatorFramesToSkipTest.js
|
|
663
|
-
)")
|
|
664
|
-
.asString(runtime)
|
|
665
|
-
.utf8(runtime);
|
|
666
|
-
|
|
667
|
-
this->expectMessageFromPage(JsonParsed(AllOf(
|
|
668
|
-
AtJsonPtr("/method", "Network.webSocketCreated"),
|
|
669
|
-
AtJsonPtr("/params/requestId", requestId),
|
|
670
|
-
AtJsonPtr("/params/url", "wss://example.com/frames-to-skip"),
|
|
671
|
-
AtJsonPtr("/params/initiator/type", "script"),
|
|
672
|
-
AtJsonPtr(
|
|
673
|
-
"/params/initiator/stack/callFrames",
|
|
674
|
-
AllOf(
|
|
675
|
-
Each(AtJsonPtr("/url", "webSocketInitiatorFramesToSkipTest.js")),
|
|
676
|
-
ElementsAre(
|
|
677
|
-
AllOf(
|
|
678
|
-
AtJsonPtr("/functionName", "openSocket"),
|
|
679
|
-
AtJsonPtr("/lineNumber", 5)),
|
|
680
|
-
AllOf(
|
|
681
|
-
AtJsonPtr("/functionName", "global"),
|
|
682
|
-
AtJsonPtr("/lineNumber", 7))))))));
|
|
683
|
-
|
|
684
|
-
NetworkReporter::getInstance().reportWebSocketCreated(
|
|
685
|
-
requestId, "wss://example.com/frames-to-skip");
|
|
686
|
-
|
|
687
|
-
this->expectMessageFromPage(JsonEq(R"({
|
|
688
|
-
"id": 2,
|
|
689
|
-
"result": {}
|
|
690
|
-
})"));
|
|
691
|
-
this->toPage_->sendMessage(R"({
|
|
692
|
-
"id": 2,
|
|
693
|
-
"method": "Network.disable"
|
|
694
|
-
})");
|
|
695
|
-
}
|
|
696
|
-
|
|
697
628
|
TEST_P(NetworkReporterTest, testNetworkEventsWhenDisabled) {
|
|
698
629
|
EXPECT_FALSE(NetworkReporter::getInstance().isDebuggingEnabled());
|
|
699
630
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<35e8175277baa31d135d802ef5a5e6f1>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -298,7 +298,7 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
bool fuseboxWebSocketEventsEnabled() override {
|
|
301
|
-
return
|
|
301
|
+
return false;
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
bool keepTimersRunningWhileHostPausedAndroid() override {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<4b66991416806affd46aab79e36c4a45>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -57,6 +57,10 @@ class ReactNativeFeatureFlagsOverridesOSSCanary : public ReactNativeFeatureFlags
|
|
|
57
57
|
return true;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
bool fuseboxWebSocketEventsEnabled() override {
|
|
61
|
+
return true;
|
|
62
|
+
}
|
|
63
|
+
|
|
60
64
|
bool useNativeViewConfigsInBridgelessMode() override {
|
|
61
65
|
return true;
|
|
62
66
|
}
|
package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp
CHANGED
|
@@ -892,8 +892,8 @@ jsi::Value JavaTurboModule::invokeJavaMethod(
|
|
|
892
892
|
|
|
893
893
|
jsi::Value returnValue = jsi::Value::null();
|
|
894
894
|
if (returnObject != nullptr) {
|
|
895
|
-
auto
|
|
896
|
-
|
|
895
|
+
auto jResult = jni::adopt_local(returnObject);
|
|
896
|
+
auto result = jni::static_ref_cast<NativeMap::jhybridobject>(jResult);
|
|
897
897
|
returnValue =
|
|
898
898
|
jsi::valueFromDynamic(runtime, result->cthis()->consume());
|
|
899
899
|
}
|
|
@@ -912,8 +912,8 @@ jsi::Value JavaTurboModule::invokeJavaMethod(
|
|
|
912
912
|
|
|
913
913
|
jsi::Value returnValue = jsi::Value::null();
|
|
914
914
|
if (returnObject != nullptr) {
|
|
915
|
-
auto
|
|
916
|
-
|
|
915
|
+
auto jResult = jni::adopt_local(returnObject);
|
|
916
|
+
auto result = jni::static_ref_cast<NativeArray::jhybridobject>(jResult);
|
|
917
917
|
returnValue =
|
|
918
918
|
jsi::valueFromDynamic(runtime, result->cthis()->consume());
|
|
919
919
|
}
|
|
@@ -157,9 +157,7 @@ class BaseTextInputShadowNode
|
|
|
157
157
|
const auto &stateData = BaseShadowNode::getStateData();
|
|
158
158
|
const auto &reactTreeAttributedString = getAttributedString(layoutContext);
|
|
159
159
|
|
|
160
|
-
if (stateData.reactTreeAttributedString.isContentEqual(reactTreeAttributedString)
|
|
161
|
-
stateData.reactTreeAttributedString.getBaseTextAttributes() ==
|
|
162
|
-
reactTreeAttributedString.getBaseTextAttributes()) {
|
|
160
|
+
if (stateData.reactTreeAttributedString.isContentEqual(reactTreeAttributedString)) {
|
|
163
161
|
return;
|
|
164
162
|
}
|
|
165
163
|
|
|
@@ -568,13 +568,6 @@ static BOOL RCTIsAttributeEffectivelySame(
|
|
|
568
568
|
NSDictionary<NSAttributedStringKey, id> *insensitiveAttributes,
|
|
569
569
|
const TextAttributes &baseTextAttributes)
|
|
570
570
|
{
|
|
571
|
-
// The event emitter is React-internal metadata, not something UIKit shows, and a TextInput dispatches its events
|
|
572
|
-
// through its own emitter rather than through this attribute. Text typed into the field often carries no
|
|
573
|
-
// emitter while the state echoing it does, so comparing it reports a difference for identical text.
|
|
574
|
-
if ([attributeKey isEqualToString:RCTAttributedStringEventEmitterKey]) {
|
|
575
|
-
return YES;
|
|
576
|
-
}
|
|
577
|
-
|
|
578
571
|
id attribute1 = attributes1[attributeKey] ?: insensitiveAttributes[attributeKey];
|
|
579
572
|
id attribute2 = attributes2[attributeKey] ?: insensitiveAttributes[attributeKey];
|
|
580
573
|
|
|
@@ -24,7 +24,7 @@ struct ReactNativeVersionType {
|
|
|
24
24
|
int32_t Major = 0;
|
|
25
25
|
int32_t Minor = 89;
|
|
26
26
|
int32_t Patch = 0;
|
|
27
|
-
std::string_view Prerelease = "
|
|
27
|
+
std::string_view Prerelease = "rc.0";
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
constexpr ReactNativeVersionType ReactNativeVersion;
|
|
@@ -663,50 +663,15 @@ static bool measureNodeWithFixedSize(
|
|
|
663
663
|
return false;
|
|
664
664
|
}
|
|
665
665
|
|
|
666
|
-
static bool isLayoutZeroedOutRecursively(const yoga::Node* const node) {
|
|
667
|
-
if (!node->getHasNewLayout()) {
|
|
668
|
-
return false;
|
|
669
|
-
}
|
|
670
|
-
// `configVersion` only validates the layout cache, which is empty after
|
|
671
|
-
// zeroing out. Embedders set it again when they give a cloned node a config.
|
|
672
|
-
LayoutResults zeroedOutLayout;
|
|
673
|
-
zeroedOutLayout.setDimension(Dimension::Width, 0);
|
|
674
|
-
zeroedOutLayout.setDimension(Dimension::Height, 0);
|
|
675
|
-
zeroedOutLayout.configVersion = node->getLayout().configVersion;
|
|
676
|
-
if (!(node->getLayout() == zeroedOutLayout)) {
|
|
677
|
-
return false;
|
|
678
|
-
}
|
|
679
|
-
for (const auto child : node->getChildren()) {
|
|
680
|
-
if (!isLayoutZeroedOutRecursively(child)) {
|
|
681
|
-
return false;
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
|
-
return true;
|
|
685
|
-
}
|
|
686
|
-
|
|
687
666
|
void zeroOutLayoutRecursively(yoga::Node* const node) {
|
|
688
667
|
node->getLayout() = {};
|
|
689
668
|
node->setLayoutDimension(0, Dimension::Width);
|
|
690
669
|
node->setLayoutDimension(0, Dimension::Height);
|
|
691
670
|
node->setHasNewLayout(true);
|
|
692
671
|
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
// clone the children, and recurse, when part of the subtree needs it.
|
|
697
|
-
//
|
|
698
|
-
// This relies on the embedder leaving `hasNewLayout` set under display: none
|
|
699
|
-
// nodes. Children that are skipped keep their owner from the earlier tree.
|
|
700
|
-
bool didCloneChildren = false;
|
|
701
|
-
for (size_t i = 0; i < node->getChildCount(); i++) {
|
|
702
|
-
if (isLayoutZeroedOutRecursively(node->getChild(i))) {
|
|
703
|
-
continue;
|
|
704
|
-
}
|
|
705
|
-
if (!didCloneChildren) {
|
|
706
|
-
node->cloneChildrenIfNeeded();
|
|
707
|
-
didCloneChildren = true;
|
|
708
|
-
}
|
|
709
|
-
zeroOutLayoutRecursively(node->getChild(i));
|
|
672
|
+
node->cloneChildrenIfNeeded();
|
|
673
|
+
for (const auto child : node->getChildren()) {
|
|
674
|
+
zeroOutLayoutRecursively(child);
|
|
710
675
|
}
|
|
711
676
|
}
|
|
712
677
|
|
|
@@ -76,6 +76,10 @@ class StyleValueHandle {
|
|
|
76
76
|
// Intentionally leaving out auto as a fast path
|
|
77
77
|
enum class Keyword : uint8_t { MaxContent, FitContent, Stretch };
|
|
78
78
|
|
|
79
|
+
constexpr bool isKeyword(Keyword keyword) const {
|
|
80
|
+
return type() == Type::Keyword && value() == static_cast<uint16_t>(keyword);
|
|
81
|
+
}
|
|
82
|
+
|
|
79
83
|
constexpr Type type() const {
|
|
80
84
|
return static_cast<Type>(repr_ & kHandleTypeMask);
|
|
81
85
|
}
|