react-native 0.84.0-nightly-20251114-dd6805dec → 0.84.0-nightly-20251116-d52b9d2f8
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/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTBundleManager.h +2 -2
- package/React/Base/RCTBundleManager.m +14 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTDevSettings.h +36 -1
- package/React/CoreModules/RCTDevSettings.mm +45 -9
- package/React/DevSupport/RCTPackagerConnection.h +4 -2
- package/React/DevSupport/RCTPackagerConnection.mm +30 -33
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +8 -0
- package/ReactAndroid/api/ReactAndroid.api +1 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +7 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +11 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +12 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.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/uimanager/BackgroundStyleApplicator.kt +84 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageView.kt +12 -9
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +15 -1
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsi/jsi/jsi.h +6 -0
- package/ReactCommon/jsinspector-modern/tracing/TracingCategory.h +10 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +93 -75
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +4 -2
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +10 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +2 -1
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h +0 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +6 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +3 -1
- package/ReactCommon/react/renderer/components/image/ImageProps.cpp +2 -2
- package/ReactCommon/react/renderer/components/image/ImageProps.h +2 -2
- package/ReactCommon/react/renderer/components/image/ImageShadowNode.cpp +9 -2
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageRequestParams.h +9 -4
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/conversions.h +8 -4
- package/package.json +9 -9
- package/sdks/hermes-engine/version.properties +1 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +6 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -1
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.cpp +0 -212
- package/ReactCommon/react/nativemodule/core/ReactCommon/TurboCxxModule.h +0 -40
package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BackgroundStyleApplicator.kt
CHANGED
|
@@ -9,7 +9,10 @@ package com.facebook.react.uimanager
|
|
|
9
9
|
|
|
10
10
|
import android.graphics.Canvas
|
|
11
11
|
import android.graphics.Color
|
|
12
|
+
import android.graphics.Paint
|
|
12
13
|
import android.graphics.Path
|
|
14
|
+
import android.graphics.PorterDuff
|
|
15
|
+
import android.graphics.PorterDuffXfermode
|
|
13
16
|
import android.graphics.Rect
|
|
14
17
|
import android.graphics.RectF
|
|
15
18
|
import android.graphics.drawable.Drawable
|
|
@@ -19,6 +22,7 @@ import android.widget.ImageView
|
|
|
19
22
|
import androidx.annotation.ColorInt
|
|
20
23
|
import com.facebook.react.bridge.ReadableArray
|
|
21
24
|
import com.facebook.react.common.annotations.UnstableReactNativeAPI
|
|
25
|
+
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags
|
|
22
26
|
import com.facebook.react.uimanager.PixelUtil.dpToPx
|
|
23
27
|
import com.facebook.react.uimanager.PixelUtil.pxToDp
|
|
24
28
|
import com.facebook.react.uimanager.common.UIManagerType
|
|
@@ -481,12 +485,36 @@ public object BackgroundStyleApplicator {
|
|
|
481
485
|
*/
|
|
482
486
|
@JvmStatic
|
|
483
487
|
public fun clipToPaddingBox(view: View, canvas: Canvas) {
|
|
488
|
+
clipToPaddingBoxWithAntiAliasing(view, canvas, null)
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Clips the canvas to the padding box of the view.
|
|
493
|
+
*
|
|
494
|
+
* The padding box is the area within the borders of the view, accounting for border radius if
|
|
495
|
+
* present.
|
|
496
|
+
*
|
|
497
|
+
* On Android 28 and below, when border radius is present, this uses an antialiased clipping
|
|
498
|
+
* approach with Porter-Duff compositing to avoid jagged edges. The drawContent lambda is invoked
|
|
499
|
+
* to draw the actual content after setting up the layer but before applying the mask.
|
|
500
|
+
*
|
|
501
|
+
* @param view The view whose padding box defines the clipping region
|
|
502
|
+
* @param canvas The canvas to clip
|
|
503
|
+
* @param drawContent Lambda that draws the content after clipping is set up
|
|
504
|
+
*/
|
|
505
|
+
@JvmStatic
|
|
506
|
+
public fun clipToPaddingBoxWithAntiAliasing(
|
|
507
|
+
view: View,
|
|
508
|
+
canvas: Canvas,
|
|
509
|
+
drawContent: (() -> Unit)?,
|
|
510
|
+
) {
|
|
484
511
|
val drawingRect = Rect()
|
|
485
512
|
view.getDrawingRect(drawingRect)
|
|
486
513
|
|
|
487
514
|
val composite = getCompositeBackgroundDrawable(view)
|
|
488
515
|
if (composite == null) {
|
|
489
516
|
canvas.clipRect(drawingRect)
|
|
517
|
+
drawContent?.invoke()
|
|
490
518
|
return
|
|
491
519
|
}
|
|
492
520
|
|
|
@@ -508,15 +536,69 @@ public object BackgroundStyleApplicator {
|
|
|
508
536
|
paddingBoxRect,
|
|
509
537
|
computedBorderInsets,
|
|
510
538
|
)
|
|
511
|
-
|
|
512
539
|
paddingBoxPath.offset(drawingRect.left.toFloat(), drawingRect.top.toFloat())
|
|
513
|
-
|
|
540
|
+
|
|
541
|
+
// On Android 28 and below, use antialiased clipping with Porter-Duff compositing. On newer
|
|
542
|
+
// Android versions, use the standard clipPath.
|
|
543
|
+
if (
|
|
544
|
+
ReactNativeFeatureFlags.enableAndroidAntialiasedBorderRadiusClipping() &&
|
|
545
|
+
Build.VERSION.SDK_INT <= Build.VERSION_CODES.P &&
|
|
546
|
+
view.width > 0 &&
|
|
547
|
+
view.height > 0 &&
|
|
548
|
+
drawContent != null
|
|
549
|
+
) {
|
|
550
|
+
clipWithAntiAliasing(
|
|
551
|
+
view,
|
|
552
|
+
canvas,
|
|
553
|
+
paddingBoxPath,
|
|
554
|
+
drawContent,
|
|
555
|
+
)
|
|
556
|
+
} else {
|
|
557
|
+
canvas.clipPath(paddingBoxPath)
|
|
558
|
+
drawContent?.invoke()
|
|
559
|
+
}
|
|
514
560
|
} else {
|
|
515
561
|
paddingBoxRect.offset(drawingRect.left.toFloat(), drawingRect.top.toFloat())
|
|
516
562
|
canvas.clipRect(paddingBoxRect)
|
|
563
|
+
drawContent?.invoke()
|
|
517
564
|
}
|
|
518
565
|
}
|
|
519
566
|
|
|
567
|
+
/**
|
|
568
|
+
* Applies antialiased clipping using Porter-Duff compositing for Android 28 and below. This draws
|
|
569
|
+
* content to a layer, then applies an antialiased mask to clip it.
|
|
570
|
+
*/
|
|
571
|
+
private fun clipWithAntiAliasing(
|
|
572
|
+
view: View,
|
|
573
|
+
canvas: Canvas,
|
|
574
|
+
paddingBoxPath: Path,
|
|
575
|
+
drawContent: () -> Unit,
|
|
576
|
+
) {
|
|
577
|
+
// Save the layer for Porter-Duff compositing
|
|
578
|
+
val saveCount = canvas.saveLayer(0f, 0f, view.width.toFloat(), view.height.toFloat(), null)
|
|
579
|
+
|
|
580
|
+
// Draw the content first
|
|
581
|
+
drawContent()
|
|
582
|
+
|
|
583
|
+
// Create the antialiased mask path with Porter-Duff DST_IN to clip
|
|
584
|
+
val maskPaint = Paint(Paint.ANTI_ALIAS_FLAG)
|
|
585
|
+
maskPaint.style = Paint.Style.FILL
|
|
586
|
+
maskPaint.xfermode = PorterDuffXfermode(PorterDuff.Mode.DST_IN)
|
|
587
|
+
|
|
588
|
+
// Transparent pixels with INVERSE_WINDING only works on API 28
|
|
589
|
+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
590
|
+
maskPaint.color = Color.TRANSPARENT
|
|
591
|
+
paddingBoxPath.setFillType(Path.FillType.INVERSE_WINDING)
|
|
592
|
+
} else {
|
|
593
|
+
maskPaint.color = Color.BLACK
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
canvas.drawPath(paddingBoxPath, maskPaint)
|
|
597
|
+
|
|
598
|
+
// Restore the layer
|
|
599
|
+
canvas.restoreToCount(saveCount)
|
|
600
|
+
}
|
|
601
|
+
|
|
520
602
|
/**
|
|
521
603
|
* Resets the background styling of the view to its original state.
|
|
522
604
|
*
|
|
@@ -372,15 +372,18 @@ public class ReactImageView(
|
|
|
372
372
|
public override fun hasOverlappingRendering(): Boolean = false
|
|
373
373
|
|
|
374
374
|
public override fun onDraw(canvas: Canvas) {
|
|
375
|
-
BackgroundStyleApplicator.
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
375
|
+
BackgroundStyleApplicator.clipToPaddingBoxWithAntiAliasing(this, canvas) {
|
|
376
|
+
try {
|
|
377
|
+
super.onDraw(canvas)
|
|
378
|
+
} catch (e: RuntimeException) {
|
|
379
|
+
// Only provide updates if downloadListener is set (shouldNotify is true)
|
|
380
|
+
if (downloadListener != null) {
|
|
381
|
+
val eventDispatcher =
|
|
382
|
+
UIManagerHelper.getEventDispatcherForReactTag(context as ReactContext, id)
|
|
383
|
+
eventDispatcher?.dispatchEvent(
|
|
384
|
+
createErrorEvent(UIManagerHelper.getSurfaceId(this), id, e)
|
|
385
|
+
)
|
|
386
|
+
}
|
|
384
387
|
}
|
|
385
388
|
}
|
|
386
389
|
}
|
|
@@ -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<<5e4e22e976ce1724191c7b7e381ea5a1>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -123,6 +123,12 @@ class ReactNativeFeatureFlagsJavaProvider
|
|
|
123
123
|
return method(javaProvider_);
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
+
bool enableAndroidAntialiasedBorderRadiusClipping() override {
|
|
127
|
+
static const auto method =
|
|
128
|
+
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableAndroidAntialiasedBorderRadiusClipping");
|
|
129
|
+
return method(javaProvider_);
|
|
130
|
+
}
|
|
131
|
+
|
|
126
132
|
bool enableAndroidLinearText() override {
|
|
127
133
|
static const auto method =
|
|
128
134
|
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableAndroidLinearText");
|
|
@@ -641,6 +647,11 @@ bool JReactNativeFeatureFlagsCxxInterop::enableAccumulatedUpdatesInRawPropsAndro
|
|
|
641
647
|
return ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid();
|
|
642
648
|
}
|
|
643
649
|
|
|
650
|
+
bool JReactNativeFeatureFlagsCxxInterop::enableAndroidAntialiasedBorderRadiusClipping(
|
|
651
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
652
|
+
return ReactNativeFeatureFlags::enableAndroidAntialiasedBorderRadiusClipping();
|
|
653
|
+
}
|
|
654
|
+
|
|
644
655
|
bool JReactNativeFeatureFlagsCxxInterop::enableAndroidLinearText(
|
|
645
656
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
|
646
657
|
return ReactNativeFeatureFlags::enableAndroidLinearText();
|
|
@@ -1084,6 +1095,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
|
|
1084
1095
|
makeNativeMethod(
|
|
1085
1096
|
"enableAccumulatedUpdatesInRawPropsAndroid",
|
|
1086
1097
|
JReactNativeFeatureFlagsCxxInterop::enableAccumulatedUpdatesInRawPropsAndroid),
|
|
1098
|
+
makeNativeMethod(
|
|
1099
|
+
"enableAndroidAntialiasedBorderRadiusClipping",
|
|
1100
|
+
JReactNativeFeatureFlagsCxxInterop::enableAndroidAntialiasedBorderRadiusClipping),
|
|
1087
1101
|
makeNativeMethod(
|
|
1088
1102
|
"enableAndroidLinearText",
|
|
1089
1103
|
JReactNativeFeatureFlagsCxxInterop::enableAndroidLinearText),
|
|
@@ -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<<1cb8ed4a72e9d2b8dd34694485704f60>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -72,6 +72,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
|
|
72
72
|
static bool enableAccumulatedUpdatesInRawPropsAndroid(
|
|
73
73
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
74
74
|
|
|
75
|
+
static bool enableAndroidAntialiasedBorderRadiusClipping(
|
|
76
|
+
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
77
|
+
|
|
75
78
|
static bool enableAndroidLinearText(
|
|
76
79
|
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
|
77
80
|
|
|
@@ -22,7 +22,7 @@ constexpr struct {
|
|
|
22
22
|
int32_t Major = 0;
|
|
23
23
|
int32_t Minor = 84;
|
|
24
24
|
int32_t Patch = 0;
|
|
25
|
-
std::string_view Prerelease = "nightly-
|
|
25
|
+
std::string_view Prerelease = "nightly-20251116-d52b9d2f8";
|
|
26
26
|
} ReactNativeVersion;
|
|
27
27
|
|
|
28
28
|
} // namespace facebook::react
|
|
@@ -252,6 +252,12 @@ class JSI_EXPORT NativeState {
|
|
|
252
252
|
virtual ~NativeState();
|
|
253
253
|
};
|
|
254
254
|
|
|
255
|
+
// JSI_UNSTABLE gates features that will be released with a Hermes version in
|
|
256
|
+
// the future. Until released, these features may be subject to change. After
|
|
257
|
+
// release, these features will be moved out of JSI_UNSTABLE and become frozen.
|
|
258
|
+
#ifdef JSI_UNSTABLE
|
|
259
|
+
#endif // JSI_UNSTABLE
|
|
260
|
+
|
|
255
261
|
/// Represents a JS runtime. Movable, but not copyable. Note that
|
|
256
262
|
/// this object may not be thread-aware, but cannot be used safely from
|
|
257
263
|
/// multiple threads at once. The application is responsible for
|
|
@@ -16,11 +16,12 @@
|
|
|
16
16
|
namespace facebook::react::jsinspector_modern::tracing {
|
|
17
17
|
|
|
18
18
|
enum class Category {
|
|
19
|
-
HiddenTimeline, /* disabled-by-default-devtools.timeline
|
|
20
|
-
JavaScriptSampling, /* disabled-by-default-v8.cpu_profiler
|
|
21
|
-
RuntimeExecution, /* v8.execute
|
|
22
|
-
Timeline, /* devtools.timeline
|
|
23
|
-
UserTiming, /* blink.user_timing
|
|
19
|
+
HiddenTimeline, /* disabled-by-default-devtools.timeline */
|
|
20
|
+
JavaScriptSampling, /* disabled-by-default-v8.cpu_profiler */
|
|
21
|
+
RuntimeExecution, /* v8.execute */
|
|
22
|
+
Timeline, /* devtools.timeline */
|
|
23
|
+
UserTiming, /* blink.user_timing */
|
|
24
|
+
Screenshot, /* disabled-by-default-devtools.screenshot */
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
inline std::string tracingCategoryToString(const Category &category)
|
|
@@ -36,6 +37,8 @@ inline std::string tracingCategoryToString(const Category &category)
|
|
|
36
37
|
return "disabled-by-default-v8.cpu_profiler";
|
|
37
38
|
case Category::RuntimeExecution:
|
|
38
39
|
return "v8.execute";
|
|
40
|
+
case Category::Screenshot:
|
|
41
|
+
return "disabled-by-default-devtools.screenshot";
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
|
|
@@ -51,6 +54,8 @@ inline std::optional<Category> getTracingCategoryFromString(const std::string &s
|
|
|
51
54
|
return Category::JavaScriptSampling;
|
|
52
55
|
} else if (str == "v8.execute") {
|
|
53
56
|
return Category::RuntimeExecution;
|
|
57
|
+
} else if (str == "disabled-by-default-devtools.screenshot") {
|
|
58
|
+
return Category::RuntimeExecution;
|
|
54
59
|
} else {
|
|
55
60
|
return std::nullopt;
|
|
56
61
|
}
|
|
@@ -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<<9c10486574fdff78933aed6acd90533c>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -82,6 +82,10 @@ bool ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid() {
|
|
|
82
82
|
return getAccessor().enableAccumulatedUpdatesInRawPropsAndroid();
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
bool ReactNativeFeatureFlags::enableAndroidAntialiasedBorderRadiusClipping() {
|
|
86
|
+
return getAccessor().enableAndroidAntialiasedBorderRadiusClipping();
|
|
87
|
+
}
|
|
88
|
+
|
|
85
89
|
bool ReactNativeFeatureFlags::enableAndroidLinearText() {
|
|
86
90
|
return getAccessor().enableAndroidLinearText();
|
|
87
91
|
}
|
|
@@ -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<<72ed560f90d44db777469315e0865c6c>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -109,6 +109,11 @@ class ReactNativeFeatureFlags {
|
|
|
109
109
|
*/
|
|
110
110
|
RN_EXPORT static bool enableAccumulatedUpdatesInRawPropsAndroid();
|
|
111
111
|
|
|
112
|
+
/**
|
|
113
|
+
* Enable antialiased border radius clipping for Android API 28 and below using manual masking with Porter-Duff compositing
|
|
114
|
+
*/
|
|
115
|
+
RN_EXPORT static bool enableAndroidAntialiasedBorderRadiusClipping();
|
|
116
|
+
|
|
112
117
|
/**
|
|
113
118
|
* Enables linear text rendering on Android wherever subpixel text rendering is enabled
|
|
114
119
|
*/
|