Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<<4342ccb696b4123b9d463a31c024b9bc>>
* @generated SignedSource<<cbdf077f2804a04fa5930548a3b164a1>>
*/

/**
Expand Down Expand Up @@ -366,6 +366,12 @@ public object ReactNativeFeatureFlags {
@JvmStatic
public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = accessor.fixMappingOfEventPrioritiesBetweenFabricAndReact()

/**
* Preserve the FPS performance listener across ScrollView recycling on Android. Without this fix, initView() nulls mFpsListener on recycle, silently disabling FPS tracking.
*/
@JvmStatic
public fun fixScrollViewFpsListenerOnRecycleAndroid(): Boolean = accessor.fixScrollViewFpsListenerOnRecycleAndroid()

/**
* Fix flex basis computation to not apply FitContent constraint in the main axis for non-measure container nodes, preventing unnecessary re-measurement in scroll containers.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<ec375fbc64b2b2b8995c1640a0369923>>
* @generated SignedSource<<272e5f263569b9ee3c88b1485a037e59>>
*/

/**
Expand Down Expand Up @@ -76,6 +76,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var fixDifferentiatorParentTagForUnflattenCaseCache: Boolean? = null
private var fixFindShadowNodeByTagRaceConditionCache: Boolean? = null
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
private var fixScrollViewFpsListenerOnRecycleAndroidCache: Boolean? = null
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
private var fuseboxAssertSingleHostStateCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
Expand Down Expand Up @@ -617,6 +618,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

override fun fixScrollViewFpsListenerOnRecycleAndroid(): Boolean {
var cached = fixScrollViewFpsListenerOnRecycleAndroidCache
if (cached == null) {
cached = ReactNativeFeatureFlagsCxxInterop.fixScrollViewFpsListenerOnRecycleAndroid()
fixScrollViewFpsListenerOnRecycleAndroidCache = cached
}
return cached
}

override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean {
var cached = fixYogaFlexBasisFitContentInMainAxisCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<81989dbed82df7bd963d8023c595ff44>>
* @generated SignedSource<<89b2768e137e0f3c048321fcf83d8915>>
*/

/**
Expand Down Expand Up @@ -140,6 +140,8 @@ public object ReactNativeFeatureFlagsCxxInterop {

@DoNotStrip @JvmStatic public external fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean

@DoNotStrip @JvmStatic public external fun fixScrollViewFpsListenerOnRecycleAndroid(): Boolean

@DoNotStrip @JvmStatic public external fun fixYogaFlexBasisFitContentInMainAxis(): Boolean

@DoNotStrip @JvmStatic public external fun fuseboxAssertSingleHostState(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<93e83fb3dc9577acd9678803321e0fe1>>
* @generated SignedSource<<8af67efc26d16dc5981536b212addf07>>
*/

/**
Expand Down Expand Up @@ -135,6 +135,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi

override fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean = false

override fun fixScrollViewFpsListenerOnRecycleAndroid(): Boolean = false

override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean = false

override fun fuseboxAssertSingleHostState(): Boolean = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<9d07e8adeee69583b788069649306d8e>>
* @generated SignedSource<<6b839ac9b01a2cb9a173218c5c523ad1>>
*/

/**
Expand Down Expand Up @@ -80,6 +80,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var fixDifferentiatorParentTagForUnflattenCaseCache: Boolean? = null
private var fixFindShadowNodeByTagRaceConditionCache: Boolean? = null
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
private var fixScrollViewFpsListenerOnRecycleAndroidCache: Boolean? = null
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
private var fuseboxAssertSingleHostStateCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
Expand Down Expand Up @@ -677,6 +678,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

override fun fixScrollViewFpsListenerOnRecycleAndroid(): Boolean {
var cached = fixScrollViewFpsListenerOnRecycleAndroidCache
if (cached == null) {
cached = currentProvider.fixScrollViewFpsListenerOnRecycleAndroid()
accessedFeatureFlags.add("fixScrollViewFpsListenerOnRecycleAndroid")
fixScrollViewFpsListenerOnRecycleAndroidCache = cached
}
return cached
}

override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean {
var cached = fixYogaFlexBasisFitContentInMainAxisCache
if (cached == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<bcc599e04e3672d4bff293e267b3efa2>>
* @generated SignedSource<<cbe88f97e1e9635688424b9df25fb2e8>>
*/

/**
Expand Down Expand Up @@ -135,6 +135,8 @@ public interface ReactNativeFeatureFlagsProvider {

@DoNotStrip public fun fixMappingOfEventPrioritiesBetweenFabricAndReact(): Boolean

@DoNotStrip public fun fixScrollViewFpsListenerOnRecycleAndroid(): Boolean

@DoNotStrip public fun fixYogaFlexBasisFitContentInMainAxis(): Boolean

@DoNotStrip public fun fuseboxAssertSingleHostState(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ public ReactHorizontalScrollView(Context context) {

public ReactHorizontalScrollView(Context context, @Nullable FpsListener fpsListener) {
super(context);
mFpsListener = fpsListener;
mFpsListener =
ReactNativeFeatureFlags.fixScrollViewFpsListenerOnRecycleAndroid() ? fpsListener : null;

ViewCompat.setAccessibilityDelegate(this, new ReactScrollViewAccessibilityDelegate());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<32c8c18771d6690f50d60dbc8e3d07e2>>
* @generated SignedSource<<5148676757bfa3a35105ed03a0f7561e>>
*/

/**
Expand Down Expand Up @@ -375,6 +375,12 @@ class ReactNativeFeatureFlagsJavaProvider
return method(javaProvider_);
}

bool fixScrollViewFpsListenerOnRecycleAndroid() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fixScrollViewFpsListenerOnRecycleAndroid");
return method(javaProvider_);
}

bool fixYogaFlexBasisFitContentInMainAxis() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fixYogaFlexBasisFitContentInMainAxis");
Expand Down Expand Up @@ -875,6 +881,11 @@ bool JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabri
return ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact();
}

bool JReactNativeFeatureFlagsCxxInterop::fixScrollViewFpsListenerOnRecycleAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::fixScrollViewFpsListenerOnRecycleAndroid();
}

bool JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis();
Expand Down Expand Up @@ -1254,6 +1265,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"fixMappingOfEventPrioritiesBetweenFabricAndReact",
JReactNativeFeatureFlagsCxxInterop::fixMappingOfEventPrioritiesBetweenFabricAndReact),
makeNativeMethod(
"fixScrollViewFpsListenerOnRecycleAndroid",
JReactNativeFeatureFlagsCxxInterop::fixScrollViewFpsListenerOnRecycleAndroid),
makeNativeMethod(
"fixYogaFlexBasisFitContentInMainAxis",
JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<aacbc520b40625dbdba328590cc78112>>
* @generated SignedSource<<27ff6d79feca287140547a62c0288675>>
*/

/**
Expand Down Expand Up @@ -198,6 +198,9 @@ class JReactNativeFeatureFlagsCxxInterop
static bool fixMappingOfEventPrioritiesBetweenFabricAndReact(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool fixScrollViewFpsListenerOnRecycleAndroid(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

static bool fixYogaFlexBasisFitContentInMainAxis(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<483ac339c0d636c85f4639c60982c504>>
* @generated SignedSource<<caa1d02fa55d418d2568d75f2eaf498c>>
*/

/**
Expand Down Expand Up @@ -250,6 +250,10 @@ bool ReactNativeFeatureFlags::fixMappingOfEventPrioritiesBetweenFabricAndReact()
return getAccessor().fixMappingOfEventPrioritiesBetweenFabricAndReact();
}

bool ReactNativeFeatureFlags::fixScrollViewFpsListenerOnRecycleAndroid() {
return getAccessor().fixScrollViewFpsListenerOnRecycleAndroid();
}

bool ReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis() {
return getAccessor().fixYogaFlexBasisFitContentInMainAxis();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<<771a335070649f38cb559a95d80947aa>>
* @generated SignedSource<<d09da25cd3891f9502ae844e36a6d038>>
*/

/**
Expand Down Expand Up @@ -319,6 +319,11 @@ class ReactNativeFeatureFlags {
*/
RN_EXPORT static bool fixMappingOfEventPrioritiesBetweenFabricAndReact();

/**
* Preserve the FPS performance listener across ScrollView recycling on Android. Without this fix, initView() nulls mFpsListener on recycle, silently disabling FPS tracking.
*/
RN_EXPORT static bool fixScrollViewFpsListenerOnRecycleAndroid();

/**
* Fix flex basis computation to not apply FitContent constraint in the main axis for non-measure container nodes, preventing unnecessary re-measurement in scroll containers.
*/
Expand Down
Loading
Loading