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<<039798c50526ff1abf33bc7987aa78a9>>
* @generated SignedSource<<5144fb0350b71394206d614c68ef87f0>>
*/

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

/**
* 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.
*/
@JvmStatic
public fun fixYogaFlexBasisFitContentInMainAxis(): Boolean = accessor.fixYogaFlexBasisFitContentInMainAxis()

/**
* Enable system assertion validating that Fusebox is configured with a single host. When set, the CDP backend will dynamically disable features (Perf and Network) in the event that multiple hosts are registered (undefined behaviour), and broadcast this over `ReactNativeApplication.systemStateChanged`.
*/
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<<cbc85fcd815ba2585166a53e7b410f30>>
* @generated SignedSource<<d284f066f036908977797a381a044dfa>>
*/

/**
Expand Down Expand Up @@ -80,6 +80,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
private var fixFindShadowNodeByTagRaceConditionCache: Boolean? = null
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
private var fixTextClippingAndroid15useBoundsForWidthCache: Boolean? = null
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
private var fuseboxAssertSingleHostStateCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
private var fuseboxFrameRecordingEnabledCache: Boolean? = null
Expand Down Expand Up @@ -650,6 +651,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun fuseboxAssertSingleHostState(): Boolean {
var cached = fuseboxAssertSingleHostStateCache
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<<3d472893c05bdee6e09f834f52d3d92f>>
* @generated SignedSource<<de1c66a540520cd88c4d358ba30f2c6d>>
*/

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

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

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

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

@DoNotStrip @JvmStatic public external fun fuseboxEnabledRelease(): 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<<29f7031f91527f41f2f184596c542a5b>>
* @generated SignedSource<<ab3b1d2277b8cc9db1708ef94515fb35>>
*/

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

override fun fixTextClippingAndroid15useBoundsForWidth(): Boolean = false

override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean = false

override fun fuseboxAssertSingleHostState(): Boolean = true

override fun fuseboxEnabledRelease(): Boolean = false
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<<014ee4afdf58a61c9974df198068d81a>>
* @generated SignedSource<<7b87f5541ecf881d8ce51c5edd5b99b0>>
*/

/**
Expand Down Expand Up @@ -84,6 +84,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
private var fixFindShadowNodeByTagRaceConditionCache: Boolean? = null
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
private var fixTextClippingAndroid15useBoundsForWidthCache: Boolean? = null
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
private var fuseboxAssertSingleHostStateCache: Boolean? = null
private var fuseboxEnabledReleaseCache: Boolean? = null
private var fuseboxFrameRecordingEnabledCache: Boolean? = null
Expand Down Expand Up @@ -714,6 +715,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
return cached
}

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

override fun fuseboxAssertSingleHostState(): Boolean {
var cached = fuseboxAssertSingleHostStateCache
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<<acd57b19a67924a91c6b25904cb24d3b>>
* @generated SignedSource<<f34b257861830bae7012fc5201904831>>
*/

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

@DoNotStrip public fun fixTextClippingAndroid15useBoundsForWidth(): Boolean

@DoNotStrip public fun fixYogaFlexBasisFitContentInMainAxis(): Boolean

@DoNotStrip public fun fuseboxAssertSingleHostState(): Boolean

@DoNotStrip public fun fuseboxEnabledRelease(): Boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
package com.facebook.yoga;

public enum YogaExperimentalFeature {
WEB_FLEX_BASIS(0);
WEB_FLEX_BASIS(0),
FIX_FLEX_BASIS_FIT_CONTENT(1);

private final int mIntValue;

Expand All @@ -25,6 +26,7 @@ public int intValue() {
public static YogaExperimentalFeature fromInt(int value) {
switch (value) {
case 0: return WEB_FLEX_BASIS;
case 1: return FIX_FLEX_BASIS_FIT_CONTENT;
default: throw new IllegalArgumentException("Unknown enum value: " + value);
}
}
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<<a753500d987b8719f0ba1bba8d3e4dc4>>
* @generated SignedSource<<b4670c40175b42e04eb8f03b752a0c00>>
*/

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

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

bool fuseboxAssertSingleHostState() override {
static const auto method =
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fuseboxAssertSingleHostState");
Expand Down Expand Up @@ -877,6 +883,11 @@ bool JReactNativeFeatureFlagsCxxInterop::fixTextClippingAndroid15useBoundsForWid
return ReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth();
}

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

bool JReactNativeFeatureFlagsCxxInterop::fuseboxAssertSingleHostState(
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
return ReactNativeFeatureFlags::fuseboxAssertSingleHostState();
Expand Down Expand Up @@ -1233,6 +1244,9 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
makeNativeMethod(
"fixTextClippingAndroid15useBoundsForWidth",
JReactNativeFeatureFlagsCxxInterop::fixTextClippingAndroid15useBoundsForWidth),
makeNativeMethod(
"fixYogaFlexBasisFitContentInMainAxis",
JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis),
makeNativeMethod(
"fuseboxAssertSingleHostState",
JReactNativeFeatureFlagsCxxInterop::fuseboxAssertSingleHostState),
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<<6ff305bf95e95cd8a65c138fc24b43f8>>
* @generated SignedSource<<5433b4a2f4a0574591a38017422edac8>>
*/

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

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

static bool fuseboxAssertSingleHostState(
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<<903b6404deb3339d2cfeced5be354134>>
* @generated SignedSource<<bfb72cee88230c56d2c101be808ef300>>
*/

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

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

bool ReactNativeFeatureFlags::fuseboxAssertSingleHostState() {
return getAccessor().fuseboxAssertSingleHostState();
}
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<<5ae89f16fbc942bd1c857c85b0520a03>>
* @generated SignedSource<<4811a81c7839f2be5c8a127e6c8e310b>>
*/

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

/**
* 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.
*/
RN_EXPORT static bool fixYogaFlexBasisFitContentInMainAxis();

/**
* Enable system assertion validating that Fusebox is configured with a single host. When set, the CDP backend will dynamically disable features (Perf and Network) in the event that multiple hosts are registered (undefined behaviour), and broadcast this over `ReactNativeApplication.systemStateChanged`.
*/
Expand Down
Loading
Loading