mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Add syncAndroidClipBoundsWithOverflow feature flag
Summary: Add a new feature flag to gate overriding getClipBounds on Android views to return the padding box when overflow is hidden. This communicates the view's clipping region to the Android framework for correct getGlobalVisibleRect calculations (T253147322, T263753590). Changelog: [Internal] Reviewed By: twasilczyk Differential Revision: D102353841 fbshipit-source-id: d5f9c5428c342061c0d45bfcc000db356048f930
This commit is contained in:
1 parent
b396df7606
commit
497d9c1615
20 files changed
+152
-36
No files matched your search
+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<<eb70fd41bc36f1a49849e29bea081007>>
|
||||
* @generated SignedSource<<cd8218c8b8588f3317bf63ce8d608548>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -480,6 +480,12 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun skipActivityIdentityAssertionOnHostPause(): Boolean = accessor.skipActivityIdentityAssertionOnHostPause()
|
||||
|
||||
/**
|
||||
* Override getClipBounds on Android views to return the padding box when overflow is hidden
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun syncAndroidClipBoundsWithOverflow(): Boolean = accessor.syncAndroidClipBoundsWithOverflow()
|
||||
|
||||
/**
|
||||
* 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<<f79ca61a0da053a1661eca4d3a35b081>>
|
||||
* @generated SignedSource<<4f9f5c1c46217ed6802abd5f786aac19>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -95,6 +95,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var shouldPressibilityUseW3CPointerEventsForHoverCache: Boolean? = null
|
||||
private var shouldTriggerResponderTransferOnScrollAndroidCache: Boolean? = null
|
||||
private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null
|
||||
private var syncAndroidClipBoundsWithOverflowCache: Boolean? = null
|
||||
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitThreadCache: Boolean? = null
|
||||
@@ -787,6 +788,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun syncAndroidClipBoundsWithOverflow(): Boolean {
|
||||
var cached = syncAndroidClipBoundsWithOverflowCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.syncAndroidClipBoundsWithOverflow()
|
||||
syncAndroidClipBoundsWithOverflowCache = 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<<62d1f0fcdf8e3165480da12575d62826>>
|
||||
* @generated SignedSource<<8916e9f4a938a69ff175c806db9835d4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -178,6 +178,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun skipActivityIdentityAssertionOnHostPause(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun syncAndroidClipBoundsWithOverflow(): 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<<84ac5b80585f9185c879c81822718d86>>
|
||||
* @generated SignedSource<<d2b14345bf627e35562530912b3aae1f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -173,6 +173,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun skipActivityIdentityAssertionOnHostPause(): Boolean = false
|
||||
|
||||
override fun syncAndroidClipBoundsWithOverflow(): 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<<3574e23fe8f846e408964af26cf0dd4c>>
|
||||
* @generated SignedSource<<cbe90c2bf8ba9d34804d97c31edfd31a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -99,6 +99,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
private var shouldPressibilityUseW3CPointerEventsForHoverCache: Boolean? = null
|
||||
private var shouldTriggerResponderTransferOnScrollAndroidCache: Boolean? = null
|
||||
private var skipActivityIdentityAssertionOnHostPauseCache: Boolean? = null
|
||||
private var syncAndroidClipBoundsWithOverflowCache: Boolean? = null
|
||||
private var traceTurboModulePromiseRejectionsOnAndroidCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitCache: Boolean? = null
|
||||
private var updateRuntimeShadowNodeReferencesOnCommitThreadCache: Boolean? = null
|
||||
@@ -866,6 +867,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun syncAndroidClipBoundsWithOverflow(): Boolean {
|
||||
var cached = syncAndroidClipBoundsWithOverflowCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.syncAndroidClipBoundsWithOverflow()
|
||||
accessedFeatureFlags.add("syncAndroidClipBoundsWithOverflow")
|
||||
syncAndroidClipBoundsWithOverflowCache = 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<<9222fd90d191a91893e2c58770d83259>>
|
||||
* @generated SignedSource<<536a5156deea17740dd24782bf79feb4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -173,6 +173,8 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun skipActivityIdentityAssertionOnHostPause(): Boolean
|
||||
|
||||
@DoNotStrip public fun syncAndroidClipBoundsWithOverflow(): Boolean
|
||||
|
||||
@DoNotStrip public fun traceTurboModulePromiseRejectionsOnAndroid(): Boolean
|
||||
|
||||
@DoNotStrip public fun updateRuntimeShadowNodeReferencesOnCommit(): Boolean
|
||||
|
||||
+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<<e8cf371a99a72250ea1b0104dc7f8254>>
|
||||
* @generated SignedSource<<b99eaffc2d11a08a6efe32b2e2732965>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -489,6 +489,12 @@ class ReactNativeFeatureFlagsJavaProvider
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool syncAndroidClipBoundsWithOverflow() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("syncAndroidClipBoundsWithOverflow");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("traceTurboModulePromiseRejectionsOnAndroid");
|
||||
@@ -964,6 +970,11 @@ bool JReactNativeFeatureFlagsCxxInterop::skipActivityIdentityAssertionOnHostPaus
|
||||
return ReactNativeFeatureFlags::skipActivityIdentityAssertionOnHostPause();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::syncAndroidClipBoundsWithOverflow(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::syncAndroidClipBoundsWithOverflow();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::traceTurboModulePromiseRejectionsOnAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::traceTurboModulePromiseRejectionsOnAndroid();
|
||||
@@ -1300,6 +1311,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"skipActivityIdentityAssertionOnHostPause",
|
||||
JReactNativeFeatureFlagsCxxInterop::skipActivityIdentityAssertionOnHostPause),
|
||||
makeNativeMethod(
|
||||
"syncAndroidClipBoundsWithOverflow",
|
||||
JReactNativeFeatureFlagsCxxInterop::syncAndroidClipBoundsWithOverflow),
|
||||
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<<773741594e911047dac28904e9fc9544>>
|
||||
* @generated SignedSource<<4be32bad403baeca1a28f19ad181c42c>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -255,6 +255,9 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool skipActivityIdentityAssertionOnHostPause(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool syncAndroidClipBoundsWithOverflow(
|
||||
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<<6a15a6444767342acf4da0c0c8aa6208>>
|
||||
* @generated SignedSource<<b55a79c9f84947fa4c12b04f15cfeefb>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -326,6 +326,10 @@ bool ReactNativeFeatureFlags::skipActivityIdentityAssertionOnHostPause() {
|
||||
return getAccessor().skipActivityIdentityAssertionOnHostPause();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::syncAndroidClipBoundsWithOverflow() {
|
||||
return getAccessor().syncAndroidClipBoundsWithOverflow();
|
||||
}
|
||||
|
||||
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<<62d1840f9a39eaceaa800542b7351a41>>
|
||||
* @generated SignedSource<<8e9b09843bf4a0312b254559a975f612>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -414,6 +414,11 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool skipActivityIdentityAssertionOnHostPause();
|
||||
|
||||
/**
|
||||
* Override getClipBounds on Android views to return the padding box when overflow is hidden
|
||||
*/
|
||||
RN_EXPORT static bool syncAndroidClipBoundsWithOverflow();
|
||||
|
||||
/**
|
||||
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
|
||||
*/
|
||||
|
||||
+35
-17
@@ -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<<b0ed71a14e0bd06787b6d2213422d8de>>
|
||||
* @generated SignedSource<<ac0901d62505522c1c6f7e251e845871>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -1379,6 +1379,24 @@ bool ReactNativeFeatureFlagsAccessor::skipActivityIdentityAssertionOnHostPause()
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::syncAndroidClipBoundsWithOverflow() {
|
||||
auto flagValue = syncAndroidClipBoundsWithOverflow_.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(75, "syncAndroidClipBoundsWithOverflow");
|
||||
|
||||
flagValue = currentProvider_->syncAndroidClipBoundsWithOverflow();
|
||||
syncAndroidClipBoundsWithOverflow_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::traceTurboModulePromiseRejectionsOnAndroid() {
|
||||
auto flagValue = traceTurboModulePromiseRejectionsOnAndroid_.load();
|
||||
|
||||
@@ -1388,7 +1406,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(75, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
markFlagAsAccessed(76, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
|
||||
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
|
||||
@@ -1406,7 +1424,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(76, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
markFlagAsAccessed(77, "updateRuntimeShadowNodeReferencesOnCommit");
|
||||
|
||||
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommit();
|
||||
updateRuntimeShadowNodeReferencesOnCommit_ = flagValue;
|
||||
@@ -1424,7 +1442,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(77, "updateRuntimeShadowNodeReferencesOnCommitThread");
|
||||
markFlagAsAccessed(78, "updateRuntimeShadowNodeReferencesOnCommitThread");
|
||||
|
||||
flagValue = currentProvider_->updateRuntimeShadowNodeReferencesOnCommitThread();
|
||||
updateRuntimeShadowNodeReferencesOnCommitThread_ = flagValue;
|
||||
@@ -1442,7 +1460,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(78, "useAlwaysAvailableJSErrorHandling");
|
||||
markFlagAsAccessed(79, "useAlwaysAvailableJSErrorHandling");
|
||||
|
||||
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
|
||||
useAlwaysAvailableJSErrorHandling_ = flagValue;
|
||||
@@ -1460,7 +1478,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(79, "useFabricInterop");
|
||||
markFlagAsAccessed(80, "useFabricInterop");
|
||||
|
||||
flagValue = currentProvider_->useFabricInterop();
|
||||
useFabricInterop_ = flagValue;
|
||||
@@ -1478,7 +1496,7 @@ bool ReactNativeFeatureFlagsAccessor::useLISAlgorithmInDifferentiator() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(80, "useLISAlgorithmInDifferentiator");
|
||||
markFlagAsAccessed(81, "useLISAlgorithmInDifferentiator");
|
||||
|
||||
flagValue = currentProvider_->useLISAlgorithmInDifferentiator();
|
||||
useLISAlgorithmInDifferentiator_ = flagValue;
|
||||
@@ -1496,7 +1514,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(81, "useNativeViewConfigsInBridgelessMode");
|
||||
markFlagAsAccessed(82, "useNativeViewConfigsInBridgelessMode");
|
||||
|
||||
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
||||
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
||||
@@ -1514,7 +1532,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(82, "useNestedScrollViewAndroid");
|
||||
markFlagAsAccessed(83, "useNestedScrollViewAndroid");
|
||||
|
||||
flagValue = currentProvider_->useNestedScrollViewAndroid();
|
||||
useNestedScrollViewAndroid_ = flagValue;
|
||||
@@ -1532,7 +1550,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(83, "useSharedAnimatedBackend");
|
||||
markFlagAsAccessed(84, "useSharedAnimatedBackend");
|
||||
|
||||
flagValue = currentProvider_->useSharedAnimatedBackend();
|
||||
useSharedAnimatedBackend_ = flagValue;
|
||||
@@ -1550,7 +1568,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(84, "useTraitHiddenOnAndroid");
|
||||
markFlagAsAccessed(85, "useTraitHiddenOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useTraitHiddenOnAndroid();
|
||||
useTraitHiddenOnAndroid_ = flagValue;
|
||||
@@ -1568,7 +1586,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(85, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(86, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -1586,7 +1604,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(86, "useTurboModules");
|
||||
markFlagAsAccessed(87, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
@@ -1604,7 +1622,7 @@ bool ReactNativeFeatureFlagsAccessor::useUnorderedMapInDifferentiator() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(87, "useUnorderedMapInDifferentiator");
|
||||
markFlagAsAccessed(88, "useUnorderedMapInDifferentiator");
|
||||
|
||||
flagValue = currentProvider_->useUnorderedMapInDifferentiator();
|
||||
useUnorderedMapInDifferentiator_ = flagValue;
|
||||
@@ -1622,7 +1640,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(88, "viewCullingOutsetRatio");
|
||||
markFlagAsAccessed(89, "viewCullingOutsetRatio");
|
||||
|
||||
flagValue = currentProvider_->viewCullingOutsetRatio();
|
||||
viewCullingOutsetRatio_ = flagValue;
|
||||
@@ -1640,7 +1658,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(89, "viewTransitionEnabled");
|
||||
markFlagAsAccessed(90, "viewTransitionEnabled");
|
||||
|
||||
flagValue = currentProvider_->viewTransitionEnabled();
|
||||
viewTransitionEnabled_ = flagValue;
|
||||
@@ -1658,7 +1676,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(90, "virtualViewPrerenderRatio");
|
||||
markFlagAsAccessed(91, "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<<11a1936e637ed40b79a1aedd02932e7b>>
|
||||
* @generated SignedSource<<9334675799ea378311b8c675ed419b1d>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -107,6 +107,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool shouldPressibilityUseW3CPointerEventsForHover();
|
||||
bool shouldTriggerResponderTransferOnScrollAndroid();
|
||||
bool skipActivityIdentityAssertionOnHostPause();
|
||||
bool syncAndroidClipBoundsWithOverflow();
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid();
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit();
|
||||
bool updateRuntimeShadowNodeReferencesOnCommitThread();
|
||||
@@ -134,7 +135,7 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 91> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 92> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
|
||||
@@ -211,6 +212,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>> syncAndroidClipBoundsWithOverflow_;
|
||||
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<<6aa42056b9acfeb38e3ea612b6421a15>>
|
||||
* @generated SignedSource<<4a2fd61cbcdb28042f09ccb03c970674>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -327,6 +327,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool syncAndroidClipBoundsWithOverflow() 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<<2a4b0d699f7e7e701defd972cd79b116>>
|
||||
* @generated SignedSource<<7853bedb8a11b20a633eb6579257b4bc>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -720,6 +720,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
||||
return ReactNativeFeatureFlagsDefaults::skipActivityIdentityAssertionOnHostPause();
|
||||
}
|
||||
|
||||
bool syncAndroidClipBoundsWithOverflow() override {
|
||||
auto value = values_["syncAndroidClipBoundsWithOverflow"];
|
||||
if (!value.isNull()) {
|
||||
return value.getBool();
|
||||
}
|
||||
|
||||
return ReactNativeFeatureFlagsDefaults::syncAndroidClipBoundsWithOverflow();
|
||||
}
|
||||
|
||||
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<<a383c80abd9321a0376e31171fb5accd>>
|
||||
* @generated SignedSource<<e2bc4c6058c873605e7030d74fa2901d>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -100,6 +100,7 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool shouldPressibilityUseW3CPointerEventsForHover() = 0;
|
||||
virtual bool shouldTriggerResponderTransferOnScrollAndroid() = 0;
|
||||
virtual bool skipActivityIdentityAssertionOnHostPause() = 0;
|
||||
virtual bool syncAndroidClipBoundsWithOverflow() = 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<<4b821513e808ca071104f413e15c2fd9>>
|
||||
* @generated SignedSource<<d93bf6a3c6f32af3071b7f81568d3e8d>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -419,6 +419,11 @@ bool NativeReactNativeFeatureFlags::skipActivityIdentityAssertionOnHostPause(
|
||||
return ReactNativeFeatureFlags::skipActivityIdentityAssertionOnHostPause();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::syncAndroidClipBoundsWithOverflow(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::syncAndroidClipBoundsWithOverflow();
|
||||
}
|
||||
|
||||
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<<55da460bc2f8c915552eeae11f0b2e3e>>
|
||||
* @generated SignedSource<<3f44b628a681f0d005827f51f4ad885e>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -186,6 +186,8 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool skipActivityIdentityAssertionOnHostPause(jsi::Runtime& runtime);
|
||||
|
||||
bool syncAndroidClipBoundsWithOverflow(jsi::Runtime& runtime);
|
||||
|
||||
bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime& runtime);
|
||||
|
||||
bool updateRuntimeShadowNodeReferencesOnCommit(jsi::Runtime& runtime);
|
||||
|
||||
@@ -850,6 +850,16 @@ const definitions: FeatureFlagDefinitions = {
|
||||
},
|
||||
ossReleaseStage: 'none',
|
||||
},
|
||||
syncAndroidClipBoundsWithOverflow: {
|
||||
defaultValue: false,
|
||||
metadata: {
|
||||
description:
|
||||
'Override getClipBounds on Android views to return the padding box when overflow is hidden',
|
||||
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<<1d648095164f22868bbdf3500668bb14>>
|
||||
* @generated SignedSource<<aa202d346e68c3dd641d557306964ebe>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -122,6 +122,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
||||
shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean>,
|
||||
shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean>,
|
||||
skipActivityIdentityAssertionOnHostPause: Getter<boolean>,
|
||||
syncAndroidClipBoundsWithOverflow: Getter<boolean>,
|
||||
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
||||
updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
|
||||
updateRuntimeShadowNodeReferencesOnCommitThread: Getter<boolean>,
|
||||
@@ -504,6 +505,10 @@ export const shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean> = cr
|
||||
* Skip activity identity assertion in ReactHostImpl::onHostPause()
|
||||
*/
|
||||
export const skipActivityIdentityAssertionOnHostPause: Getter<boolean> = createNativeFlagGetter('skipActivityIdentityAssertionOnHostPause', false);
|
||||
/**
|
||||
* Override getClipBounds on Android views to return the padding box when overflow is hidden
|
||||
*/
|
||||
export const syncAndroidClipBoundsWithOverflow: Getter<boolean> = createNativeFlagGetter('syncAndroidClipBoundsWithOverflow', 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<<5dea8e41a09f4ed658ce248121a2e981>>
|
||||
* @generated SignedSource<<5ab72b9af228bc7e591bc0addaf6150e>>
|
||||
* @flow strict
|
||||
* @noformat
|
||||
*/
|
||||
@@ -100,6 +100,7 @@ export interface Spec extends TurboModule {
|
||||
+shouldPressibilityUseW3CPointerEventsForHover?: () => boolean;
|
||||
+shouldTriggerResponderTransferOnScrollAndroid?: () => boolean;
|
||||
+skipActivityIdentityAssertionOnHostPause?: () => boolean;
|
||||
+syncAndroidClipBoundsWithOverflow?: () => boolean;
|
||||
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
||||
+updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
|
||||
+updateRuntimeShadowNodeReferencesOnCommitThread?: () => boolean;
|
||||
|
||||
Reference in new issue
Block a user