mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Sync clipToPadding with overflow on Android views (#55563)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/55563 Changelog: [Internal] This change syncs the `clipToPadding` property with the `overflow` property on Android views to enable input systems to correctly identify which views are clipping their content. When `overflow` is set to `VISIBLE`, `clipToPadding` is set to `false`. For any other overflow value (e.g., `HIDDEN`, `SCROLL`), `clipToPadding` is set to `true`. The change is gated behind the `syncAndroidClipToPaddingWithOverflow` feature flag. Reviewed By: NickGerleman Differential Revision: D93248532 fbshipit-source-id: 08e5b296f27bdc8e50a8d3cd12e2d235525ae7e0
This commit is contained in:
1 parent
51dc568d20
commit
16d4bd1710
25 files changed
+183
-35
No files matched your search
@@ -5582,6 +5582,7 @@ public class com/facebook/react/views/scroll/ReactHorizontalScrollView : android
|
||||
public fun fling (I)V
|
||||
public fun focusSearch (Landroid/view/View;I)Landroid/view/View;
|
||||
public fun getChildVisibleRect (Landroid/view/View;Landroid/graphics/Rect;Landroid/graphics/Point;)Z
|
||||
public fun getClipToPadding ()Z
|
||||
public fun getClippingRect (Landroid/graphics/Rect;)V
|
||||
public fun getFadingEdgeLengthEnd ()I
|
||||
public fun getFadingEdgeLengthStart ()I
|
||||
@@ -5727,6 +5728,7 @@ public class com/facebook/react/views/scroll/ReactScrollView : android/widget/Sc
|
||||
public fun focusSearch (Landroid/view/View;I)Landroid/view/View;
|
||||
protected fun getBottomFadingEdgeStrength ()F
|
||||
public fun getChildVisibleRect (Landroid/view/View;Landroid/graphics/Rect;Landroid/graphics/Point;)Z
|
||||
public fun getClipToPadding ()Z
|
||||
public fun getClippingRect (Landroid/graphics/Rect;)V
|
||||
public fun getFadingEdgeLengthEnd ()I
|
||||
public fun getFadingEdgeLengthStart ()I
|
||||
|
||||
+7
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<65e8cae8a55213f4b08ec4d896a05c00>>
|
||||
* @generated SignedSource<<9a521f1f6989bb2735ae87d0a0c2f5fe>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -432,6 +432,12 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun skipActivityIdentityAssertionOnHostPause(): Boolean = accessor.skipActivityIdentityAssertionOnHostPause()
|
||||
|
||||
/**
|
||||
* Sync clipToPadding on Android views with the overflow property
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun syncAndroidClipToPaddingWithOverflow(): Boolean = accessor.syncAndroidClipToPaddingWithOverflow()
|
||||
|
||||
/**
|
||||
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
|
||||
*/
|
||||
|
||||
+11
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<d92407e77cb3be0d57a84b5a9a931f2b>>
|
||||
* @generated SignedSource<<5a92af0a54f8aae7ba6f36a952c64df4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -87,6 +87,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var shouldPressibilityUseW3CPointerEventsForHoverCache: Boolean? = null
|
||||
private var shouldTriggerResponderTransferOnScrollAndroidCache: Boolean? = null
|
||||
private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null
|
||||
private var syncAndroidClipToPaddingWithOverflowCache: Boolean? = null
|
||||
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitThreadCache: Boolean? = null
|
||||
@@ -705,6 +706,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun syncAndroidClipToPaddingWithOverflow(): Boolean {
|
||||
var cached = syncAndroidClipToPaddingWithOverflowCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.syncAndroidClipToPaddingWithOverflow()
|
||||
syncAndroidClipToPaddingWithOverflowCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean {
|
||||
var cached = traceTurboModulePromiseRejectionsOnAndroidCache
|
||||
if (cached == null) {
|
||||
|
||||
+3
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<b83744bb70330f8c540c448ebc1cad47>>
|
||||
* @generated SignedSource<<cabb5ba7c0486e777be721f6ff880d05>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -162,6 +162,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun skipActivityIdentityAssertionOnHostPause(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun syncAndroidClipToPaddingWithOverflow(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
|
||||
|
||||
+3
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<0139bc7a7b2ae5c9175f44de1ac80105>>
|
||||
* @generated SignedSource<<c302baa5e3dcdf6655da02cd9850e653>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -157,6 +157,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun skipActivityIdentityAssertionOnHostPause(): Boolean = false
|
||||
|
||||
override fun syncAndroidClipToPaddingWithOverflow(): Boolean = false
|
||||
|
||||
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean = false
|
||||
|
||||
override fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean = false
|
||||
|
||||
+12
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<d3d6ecfc14d5a0c317d968b65455955a>>
|
||||
* @generated SignedSource<<07501a0c5936c8fe26a432d57c541d7e>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -91,6 +91,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
private var shouldPressibilityUseW3CPointerEventsForHoverCache: Boolean? = null
|
||||
private var shouldTriggerResponderTransferOnScrollAndroidCache: Boolean? = null
|
||||
private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null
|
||||
private var syncAndroidClipToPaddingWithOverflowCache: Boolean? = null
|
||||
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitThreadCache: Boolean? = null
|
||||
@@ -776,6 +777,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun syncAndroidClipToPaddingWithOverflow(): Boolean {
|
||||
var cached = syncAndroidClipToPaddingWithOverflowCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.syncAndroidClipToPaddingWithOverflow()
|
||||
accessedFeatureFlags.add("syncAndroidClipToPaddingWithOverflow")
|
||||
syncAndroidClipToPaddingWithOverflowCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean {
|
||||
var cached = traceTurboModulePromiseRejectionsOnAndroidCache
|
||||
if (cached == null) {
|
||||
|
||||
+3
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<f8cbc05fd0bda7b6efa74279b9cadaa7>>
|
||||
* @generated SignedSource<<34a625414f22a7c36ff9db90e76b1254>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -157,6 +157,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun skipActivityIdentityAssertionOnHostPause(): Boolean
|
||||
|
||||
@DoNotStrip public fun syncAndroidClipToPaddingWithOverflow(): Boolean
|
||||
|
||||
@DoNotStrip public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
|
||||
|
||||
+8
@@ -460,6 +460,14 @@ public class ReactHorizontalScrollView extends HorizontalScrollView
|
||||
return mOverflowInset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getClipToPadding() {
|
||||
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
|
||||
return mOverflow != Overflow.VISIBLE;
|
||||
}
|
||||
return super.getClipToPadding();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDraw(Canvas canvas) {
|
||||
if (mOverflow != Overflow.VISIBLE) {
|
||||
|
||||
+9
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<78fb92f68ec0a93d0041ed381f76728e>>
|
||||
* @generated SignedSource<<fefaf14f0291216b635ea0c356e9929c>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -787,6 +787,14 @@ class ReactNestedScrollView extends NestedScrollView
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getClipToPadding() {
|
||||
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
|
||||
return mOverflow != Overflow.VISIBLE;
|
||||
}
|
||||
return super.getClipToPadding();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getClippingRect(Rect outClippingRect) {
|
||||
outClippingRect.set(Assertions.assertNotNull(mClippingRect));
|
||||
|
||||
+8
@@ -779,6 +779,14 @@ public class ReactScrollView extends ScrollView
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getClipToPadding() {
|
||||
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
|
||||
return mOverflow != Overflow.VISIBLE;
|
||||
}
|
||||
return super.getClipToPadding();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getClippingRect(Rect outClippingRect) {
|
||||
outClippingRect.set(Assertions.assertNotNull(mClippingRect));
|
||||
|
||||
+6
@@ -166,6 +166,9 @@ public open class ReactViewGroup public constructor(context: Context?) :
|
||||
*/
|
||||
private fun initView() {
|
||||
clipChildren = false
|
||||
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
|
||||
clipToPadding = false
|
||||
}
|
||||
|
||||
_removeClippedSubviews = false
|
||||
inSubviewClippingLoop = false
|
||||
@@ -819,6 +822,9 @@ public open class ReactViewGroup public constructor(context: Context?) :
|
||||
} else {
|
||||
Overflow.fromString(overflow)
|
||||
}
|
||||
if (ReactNativeFeatureFlags.syncAndroidClipToPaddingWithOverflow()) {
|
||||
clipToPadding = _overflow != Overflow.VISIBLE
|
||||
}
|
||||
invalidate()
|
||||
}
|
||||
|
||||
|
||||
+15
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<4386581c81476b6f7684a8766642db13>>
|
||||
* @generated SignedSource<<4471e7ab5f05b6b15c4e54e54d7c0fda>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -441,6 +441,12 @@ class ReactNativeFeatureFlagsJavaProvider
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool syncAndroidClipToPaddingWithOverflow() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("syncAndroidClipToPaddingWithOverflow");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("traceTurboModulePromiseRejectionsOnAndroid");
|
||||
@@ -864,6 +870,11 @@ bool JReactNativeFeatureFlagsCxxInterop::skipActivityIdentityAssertionOnHostPaus
|
||||
return ReactNativeFeatureFlags::skipActivityIdentityAssertionOnHostPause();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::syncAndroidClipToPaddingWithOverflow(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::syncAndroidClipToPaddingWithOverflow();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
|
||||
@@ -1166,6 +1177,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"skipActivityIdentityAssertionOnHostPause",
|
||||
JReactNativeFeatureFlagsCxxInterop::skipActivityIdentityAssertionOnHostPause),
|
||||
makeNativeMethod(
|
||||
"syncAndroidClipToPaddingWithOverflow",
|
||||
JReactNativeFeatureFlagsCxxInterop::syncAndroidClipToPaddingWithOverflow),
|
||||
makeNativeMethod(
|
||||
"traceTurboModulePromiseRejectionsOnAndroid",
|
||||
JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid),
|
||||
|
||||
+4
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<49c9151beb66235968403b1091de3f56>>
|
||||
* @generated SignedSource<<c9bba7df566585c39f8b5974bdd4d9d3>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -231,6 +231,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool skipActivityIdentityAssertionOnHostPause(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool syncAndroidClipToPaddingWithOverflow(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool traceTurboModulePromiseRejectionsOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<e9c9a4e487664049d40a1bed5015e8fe>>
|
||||
* @generated SignedSource<<41433dd76c5e69646fd73ff5942da8e8>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -294,6 +294,10 @@ bool ReactNativeFeatureFlags::skipActivityIdentityAssertionOnHostPause() {
|
||||
return getAccessor().skipActivityIdentityAssertionOnHostPause();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::syncAndroidClipToPaddingWithOverflow() {
|
||||
return getAccessor().syncAndroidClipToPaddingWithOverflow();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid() {
|
||||
return getAccessor().traceTurboModulePromiseRejectionsOnAndroid();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<e9daabfbf719ad178ce1a366a9f82362>>
|
||||
* @generated SignedSource<<1d664fca5013de934ff2ee86f7ad5f72>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -374,6 +374,11 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool skipActivityIdentityAssertionOnHostPause();
|
||||
|
||||
/**
|
||||
* Sync clipToPadding on Android views with the overflow property
|
||||
*/
|
||||
RN_EXPORT static bool syncAndroidClipToPaddingWithOverflow();
|
||||
|
||||
/**
|
||||
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
|
||||
*/
|
||||
|
||||
+33
-15
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<b0b73ee66da2fc0c077176c2e54c77b0>>
|
||||
* @generated SignedSource<<650e8090ee879b01dc0f60e3ed586f99>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -1235,6 +1235,24 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause()
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::syncAndroidClipToPaddingWithOverflow() {
|
||||
auto flagValue = syncAndroidClipToPaddingWithOverflow_.load();
|
||||
|
||||
if (!flagValue.has_value()) {
|
||||
// This block is not exclusive but it is not necessary.
|
||||
// If multiple threads try to initialize the feature flag, we would only
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(67, "syncAndroidClipToPaddingWithOverflow");
|
||||
|
||||
flagValue = currentProvider_->syncAndroidClipToPaddingWithOverflow();
|
||||
syncAndroidClipToPaddingWithOverflow_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid() {
|
||||
auto flagValue = traceTurboModulePromiseRejectionsOnAndroid_.load();
|
||||
|
||||
@@ -1244,7 +1262,7 @@ bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(67, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
markFlagAsAccessed(68, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
|
||||
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
|
||||
@@ -1262,7 +1280,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommit(
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(68, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
markFlagAsAccessed(69, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
|
||||
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
|
||||
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
|
||||
@@ -1280,7 +1298,7 @@ bool ReactNativeFeatureFlagsAccessor::updateRuntimeShadowNodeReferencesOnCommitT
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(69, "updateRuntimeShadowNodeReferencesOnCommitThread");
|
||||
markFlagAsAccessed(70, "updateRuntimeShadowNodeReferencesOnCommitThread");
|
||||
|
||||
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommitThread();
|
||||
updateRuntimeShadowNodeReferencesOnCommitThread_ = flagValue;
|
||||
@@ -1298,7 +1316,7 @@ bool ReactNativeFeatureFlagsAccessor::useAlwaysAvailableJSErrorHandling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(70, "useAlwaysAvailableJSErrorHandling");
|
||||
markFlagAsAccessed(71, "useAlwaysAvailableJSErrorHandling");
|
||||
|
||||
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
|
||||
useAlwaysAvailableJSErrorHandling_ = flagValue;
|
||||
@@ -1316,7 +1334,7 @@ bool ReactNativeFeatureFlagsAccessor::useFabricInterop() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(71, "useFabricInterop");
|
||||
markFlagAsAccessed(72, "useFabricInterop");
|
||||
|
||||
flagValue = currentProvider_->useFabricInterop();
|
||||
useFabricInterop_ = flagValue;
|
||||
@@ -1334,7 +1352,7 @@ bool ReactNativeFeatureFlagsAccessor::useNativeViewConfigsInBridgelessMode() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(72, "useNativeViewConfigsInBridgelessMode");
|
||||
markFlagAsAccessed(73, "useNativeViewConfigsInBridgelessMode");
|
||||
|
||||
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
||||
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
||||
@@ -1352,7 +1370,7 @@ bool ReactNativeFeatureFlagsAccessor::useNestedScrollViewAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(73, "useNestedScrollViewAndroid");
|
||||
markFlagAsAccessed(74, "useNestedScrollViewAndroid");
|
||||
|
||||
flagValue = currentProvider_->useNestedScrollViewAndroid();
|
||||
useNestedScrollViewAndroid_ = flagValue;
|
||||
@@ -1370,7 +1388,7 @@ bool ReactNativeFeatureFlagsAccessor::useSharedAnimatedBackend() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(74, "useSharedAnimatedBackend");
|
||||
markFlagAsAccessed(75, "useSharedAnimatedBackend");
|
||||
|
||||
flagValue = currentProvider_->useSharedAnimatedBackend();
|
||||
useSharedAnimatedBackend_ = flagValue;
|
||||
@@ -1388,7 +1406,7 @@ bool ReactNativeFeatureFlagsAccessor::useTraitHiddenOnAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(75, "useTraitHiddenOnAndroid");
|
||||
markFlagAsAccessed(76, "useTraitHiddenOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useTraitHiddenOnAndroid();
|
||||
useTraitHiddenOnAndroid_ = flagValue;
|
||||
@@ -1406,7 +1424,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModuleInterop() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(76, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(77, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -1424,7 +1442,7 @@ bool ReactNativeFeatureFlagsAccessor::useTurboModules() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(77, "useTurboModules");
|
||||
markFlagAsAccessed(78, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
@@ -1442,7 +1460,7 @@ double ReactNativeFeatureFlagsAccessor::viewCullingOutsetRatio() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(78, "viewCullingOutsetRatio");
|
||||
markFlagAsAccessed(79, "viewCullingOutsetRatio");
|
||||
|
||||
flagValue = currentProvider_->viewCullingOutsetRatio();
|
||||
viewCullingOutsetRatio_ = flagValue;
|
||||
@@ -1460,7 +1478,7 @@ bool ReactNativeFeatureFlagsAccessor::viewTransitionEnabled() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(79, "viewTransitionEnabled");
|
||||
markFlagAsAccessed(80, "viewTransitionEnabled");
|
||||
|
||||
flagValue = currentProvider_->viewTransitionEnabled();
|
||||
viewTransitionEnabled_ = flagValue;
|
||||
@@ -1478,7 +1496,7 @@ double ReactNativeFeatureFlagsAccessor::virtualViewPrerenderRatio() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(80, "virtualViewPrerenderRatio");
|
||||
markFlagAsAccessed(81, "virtualViewPrerenderRatio");
|
||||
|
||||
flagValue = currentProvider_->virtualViewPrerenderRatio();
|
||||
virtualViewPrerenderRatio_ = flagValue;
|
||||
|
||||
+4
-2
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<c9bb7c6d8837e5b186f3ab1e93c924f5>>
|
||||
* @generated SignedSource<<7fcbdcd23ff873461acc968bd4baee97>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -99,6 +99,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool shouldPressibilityUseW3CPointerEventsForHover();
|
||||
bool shouldTriggerResponderTransferOnScrollAndroid();
|
||||
bool skipActivityIdentityAssertionOnHostPause();
|
||||
bool syncAndroidClipToPaddingWithOverflow();
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid();
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit();
|
||||
bool updateRuntimeShadowNodeReferencesOnCommitThread();
|
||||
@@ -124,7 +125,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 81> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 82> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
|
||||
@@ -193,6 +194,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::atomic<std::optional<bool>> shouldPressibilityUseW3CPointerEventsForHover_;
|
||||
std::atomic<std::optional<bool>> shouldTriggerResponderTransferOnScrollAndroid_;
|
||||
std::atomic<std::optional<bool>> skipActivityIdentityAssertionOnHostPause_;
|
||||
std::atomic<std::optional<bool>> syncAndroidClipToPaddingWithOverflow_;
|
||||
std::atomic<std::optional<bool>> traceTurboModulePromiseRejectionsOnAndroid_;
|
||||
std::atomic<std::optional<bool>> updateRuntimeShadowNodeReferencesOnCommit_;
|
||||
std::atomic<std::optional<bool>> updateRuntimeShadowNodeReferencesOnCommitThread_;
|
||||
|
||||
+5
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<3cd7cb9afed3b596d9846a4701234677>>
|
||||
* @generated SignedSource<<ced462a05133f1124191cde2733763df>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -295,6 +295,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool syncAndroidClipToPaddingWithOverflow() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
+10
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<86fa523d5b3be2d21f7b327de973e5bc>>
|
||||
* @generated SignedSource<<cbd6ef848da6f8320e7aa18366c3702f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -648,6 +648,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
||||
return ReactNativeFeatureFlagsDefaults::skipActivityIdentityAssertionOnHostPause();
|
||||
}
|
||||
|
||||
bool syncAndroidClipToPaddingWithOverflow() override {
|
||||
auto value = values_["syncAndroidClipToPaddingWithOverflow"];
|
||||
if (!value.isNull()) {
|
||||
return value.getBool();
|
||||
}
|
||||
|
||||
return ReactNativeFeatureFlagsDefaults::syncAndroidClipToPaddingWithOverflow();
|
||||
}
|
||||
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid() override {
|
||||
auto value = values_["traceTurboModulePromiseRejectionsOnAndroid"];
|
||||
if (!value.isNull()) {
|
||||
|
||||
+2
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<bbeced23f7a4660596a1a5e22017b963>>
|
||||
* @generated SignedSource<<130086aa5f7da3bda0451c84fdac0cdd>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -92,6 +92,7 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool shouldPressibilityUseW3CPointerEventsForHover() = 0;
|
||||
virtual bool shouldTriggerResponderTransferOnScrollAndroid() = 0;
|
||||
virtual bool skipActivityIdentityAssertionOnHostPause() = 0;
|
||||
virtual bool syncAndroidClipToPaddingWithOverflow() = 0;
|
||||
virtual bool traceTurboModulePromiseRejectionsOnAndroid() = 0;
|
||||
virtual bool updateRuntimeShadowNodeReferencesOnCommit() = 0;
|
||||
virtual bool updateRuntimeShadowNodeReferencesOnCommitThread() = 0;
|
||||
|
||||
+6
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<f5425301097ae20227d10b6ca668c230>>
|
||||
* @generated SignedSource<<cfde19b72140c18850f7b2caaecff448>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -379,6 +379,11 @@ bool NativeReactNativeFeatureFlags::skipActivityIdentityAssertionOnHostPause(
|
||||
return ReactNativeFeatureFlags::skipActivityIdentityAssertionOnHostPause();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::syncAndroidClipToPaddingWithOverflow(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::syncAndroidClipToPaddingWithOverflow();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
|
||||
|
||||
+3
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<f94047adeaa4498202348fce403f2729>>
|
||||
* @generated SignedSource<<d8f724f9d18dcd98785e8ab6fc06b656>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -170,6 +170,8 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool skipActivityIdentityAssertionOnHostPause(jsi::Runtime& runtime);
|
||||
|
||||
bool syncAndroidClipToPaddingWithOverflow(jsi::Runtime& runtime);
|
||||
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime& runtime);
|
||||
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime& runtime);
|
||||
|
||||
@@ -764,6 +764,16 @@ const definitions: FeatureFlagDefinitions = {
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
syncAndroidClipToPaddingWithOverflow: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
description:
|
||||
'Sync clipToPadding on Android views with the overflow property',
|
||||
expectedReleaseValue: true,
|
||||
purpose: 'release',
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
traceTurboModulePromiseRejectionsOnAndroid: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<d160075a63b4d5e2582409f4102fd66d>>
|
||||
* @generated SignedSource<<ef8ec22ea923ca388713b335535a80c6>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -114,6 +114,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
||||
shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean>,
|
||||
shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean>,
|
||||
skipActivityIdentityAssertionOnHostPause: Getter<boolean>,
|
||||
syncAndroidClipToPaddingWithOverflow: Getter<boolean>,
|
||||
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
||||
updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
|
||||
updateRuntimeShadowNodeReferencesOnCommitThread: Getter<boolean>,
|
||||
@@ -462,6 +463,10 @@ export const shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean> = cr
|
||||
* Skip activity identity assertion in ReactHostImpl::onHostPause()
|
||||
*/
|
||||
export const skipActivityIdentityAssertionOnHostPause: Getter<boolean> = createNativeFlagGetter('skipActivityIdentityAssertionOnHostPause', false);
|
||||
/**
|
||||
* Sync clipToPadding on Android views with the overflow property
|
||||
*/
|
||||
export const syncAndroidClipToPaddingWithOverflow: Getter<boolean> = createNativeFlagGetter('syncAndroidClipToPaddingWithOverflow', false);
|
||||
/**
|
||||
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
|
||||
*/
|
||||
|
||||
+2
-1
@@ -4,7 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @generated SignedSource<<a1bb47cd4ae1e0a67fcdb2450e9455bd>>
|
||||
* @generated SignedSource<<60ae4ce408ff66b5e75a24408fac5327>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -92,6 +92,7 @@ export interface Spec extends TurboModule {
|
||||
+shouldPressibilityUseW3CPointerEventsForHover?: () => boolean;
|
||||
+shouldTriggerResponderTransferOnScrollAndroid?: () => boolean;
|
||||
+skipActivityIdentityAssertionOnHostPause?: () => boolean;
|
||||
+syncAndroidClipToPaddingWithOverflow?: () => boolean;
|
||||
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
||||
+updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
|
||||
+updateRuntimeShadowNodeReferencesOnCommitThread?: () => boolean;
|
||||
|
||||
Reference in new issue
Block a user