Skip to content

Commit f49cbd1

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
Back out "Add fixYogaFlexBasisFitContentInMainAxis flag to avoid unnecessary re-measurement"
Summary: X-link: facebook/yoga#1912 Original commit changeset: 158715167080 Original Phabricator Diff: D94658492 Differential Revision: D95669495
1 parent 1c2cdda commit f49cbd1

27 files changed

+68
-286
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<55bcfe664afd673f0a9767468a3ca98f>>
7+
* @generated SignedSource<<e6da91a25406bc0930e6415da9bdcd55>>
88
*/
99

1010
/**
@@ -390,12 +390,6 @@ public object ReactNativeFeatureFlags {
390390
@JvmStatic
391391
public fun fixTextClippingAndroid15useBoundsForWidth(): Boolean = accessor.fixTextClippingAndroid15useBoundsForWidth()
392392

393-
/**
394-
* When enabled, Yoga will not apply a FitContent constraint in the main axis during flex basis computation for non-measure container nodes. This prevents unnecessary re-measurement and cascading clones when a sibling changes size in a ScrollView.
395-
*/
396-
@JvmStatic
397-
public fun fixYogaFlexBasisFitContentInMainAxis(): Boolean = accessor.fixYogaFlexBasisFitContentInMainAxis()
398-
399393
/**
400394
* 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`.
401395
*/

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<5ec50a8b4d2627a478ec9633e84ab046>>
7+
* @generated SignedSource<<a4c3c9732db567bf8ab9915f731e57ff>>
88
*/
99

1010
/**
@@ -80,7 +80,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
8080
private var fixFindShadowNodeByTagRaceConditionCache: Boolean? = null
8181
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
8282
private var fixTextClippingAndroid15useBoundsForWidthCache: Boolean? = null
83-
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
8483
private var fuseboxAssertSingleHostStateCache: Boolean? = null
8584
private var fuseboxEnabledReleaseCache: Boolean? = null
8685
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
@@ -650,15 +649,6 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
650649
return cached
651650
}
652651

653-
override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean {
654-
var cached = fixYogaFlexBasisFitContentInMainAxisCache
655-
if (cached == null) {
656-
cached = ReactNativeFeatureFlagsCxxInterop.fixYogaFlexBasisFitContentInMainAxis()
657-
fixYogaFlexBasisFitContentInMainAxisCache = cached
658-
}
659-
return cached
660-
}
661-
662652
override fun fuseboxAssertSingleHostState(): Boolean {
663653
var cached = fuseboxAssertSingleHostStateCache
664654
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<daf8cd270e8f69e6e0c410b4007ee28e>>
7+
* @generated SignedSource<<ce1f59ca437f7d8e24bdcbd651e44cc2>>
88
*/
99

1010
/**
@@ -148,8 +148,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
148148

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

151-
@DoNotStrip @JvmStatic public external fun fixYogaFlexBasisFitContentInMainAxis(): Boolean
152-
153151
@DoNotStrip @JvmStatic public external fun fuseboxAssertSingleHostState(): Boolean
154152

155153
@DoNotStrip @JvmStatic public external fun fuseboxEnabledRelease(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<0e10c51dcebd6077237c0c0aaff251e8>>
7+
* @generated SignedSource<<cd851e80f207b3e141400802917e4981>>
88
*/
99

1010
/**
@@ -143,8 +143,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
143143

144144
override fun fixTextClippingAndroid15useBoundsForWidth(): Boolean = false
145145

146-
override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean = false
147-
148146
override fun fuseboxAssertSingleHostState(): Boolean = true
149147

150148
override fun fuseboxEnabledRelease(): Boolean = false

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<b1d196c0623e11fbcf59b38143fbe37e>>
7+
* @generated SignedSource<<ff9e56efafa98cf4c466c976739a2957>>
88
*/
99

1010
/**
@@ -84,7 +84,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
8484
private var fixFindShadowNodeByTagRaceConditionCache: Boolean? = null
8585
private var fixMappingOfEventPrioritiesBetweenFabricAndReactCache: Boolean? = null
8686
private var fixTextClippingAndroid15useBoundsForWidthCache: Boolean? = null
87-
private var fixYogaFlexBasisFitContentInMainAxisCache: Boolean? = null
8887
private var fuseboxAssertSingleHostStateCache: Boolean? = null
8988
private var fuseboxEnabledReleaseCache: Boolean? = null
9089
private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
@@ -714,16 +713,6 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
714713
return cached
715714
}
716715

717-
override fun fixYogaFlexBasisFitContentInMainAxis(): Boolean {
718-
var cached = fixYogaFlexBasisFitContentInMainAxisCache
719-
if (cached == null) {
720-
cached = currentProvider.fixYogaFlexBasisFitContentInMainAxis()
721-
accessedFeatureFlags.add("fixYogaFlexBasisFitContentInMainAxis")
722-
fixYogaFlexBasisFitContentInMainAxisCache = cached
723-
}
724-
return cached
725-
}
726-
727716
override fun fuseboxAssertSingleHostState(): Boolean {
728717
var cached = fuseboxAssertSingleHostStateCache
729718
if (cached == null) {

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<fd463e05fc06ba5bae4f1e0bb99e72b2>>
7+
* @generated SignedSource<<39585bb818914cc7a02e18399fe49cbe>>
88
*/
99

1010
/**
@@ -143,8 +143,6 @@ public interface ReactNativeFeatureFlagsProvider {
143143

144144
@DoNotStrip public fun fixTextClippingAndroid15useBoundsForWidth(): Boolean
145145

146-
@DoNotStrip public fun fixYogaFlexBasisFitContentInMainAxis(): Boolean
147-
148146
@DoNotStrip public fun fuseboxAssertSingleHostState(): Boolean
149147

150148
@DoNotStrip public fun fuseboxEnabledRelease(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/yoga/YogaErrata.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ public enum YogaErrata {
1414
STRETCH_FLEX_BASIS(1),
1515
ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING(2),
1616
ABSOLUTE_PERCENT_AGAINST_INNER_SIZE(4),
17-
FLEX_BASIS_FIT_CONTENT_IN_MAIN_AXIS(8),
1817
ALL(2147483647),
1918
CLASSIC(2147483646);
2019

@@ -34,7 +33,6 @@ public static YogaErrata fromInt(int value) {
3433
case 1: return STRETCH_FLEX_BASIS;
3534
case 2: return ABSOLUTE_POSITION_WITHOUT_INSETS_EXCLUDES_PADDING;
3635
case 4: return ABSOLUTE_PERCENT_AGAINST_INNER_SIZE;
37-
case 8: return FLEX_BASIS_FIT_CONTENT_IN_MAIN_AXIS;
3836
case 2147483647: return ALL;
3937
case 2147483646: return CLASSIC;
4038
default: throw new IllegalArgumentException("Unknown enum value: " + value);

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<e1d6bbba43ad263257ed723f3a6c2600>>
7+
* @generated SignedSource<<0497864a0645d430ac6373047d6d2ea8>>
88
*/
99

1010
/**
@@ -399,12 +399,6 @@ class ReactNativeFeatureFlagsJavaProvider
399399
return method(javaProvider_);
400400
}
401401

402-
bool fixYogaFlexBasisFitContentInMainAxis() override {
403-
static const auto method =
404-
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fixYogaFlexBasisFitContentInMainAxis");
405-
return method(javaProvider_);
406-
}
407-
408402
bool fuseboxAssertSingleHostState() override {
409403
static const auto method =
410404
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("fuseboxAssertSingleHostState");
@@ -877,11 +871,6 @@ bool JReactNativeFeatureFlagsCxxInterop::fixTextClippingAndroid15useBoundsForWid
877871
return ReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth();
878872
}
879873

880-
bool JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis(
881-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
882-
return ReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis();
883-
}
884-
885874
bool JReactNativeFeatureFlagsCxxInterop::fuseboxAssertSingleHostState(
886875
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
887876
return ReactNativeFeatureFlags::fuseboxAssertSingleHostState();
@@ -1233,9 +1222,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
12331222
makeNativeMethod(
12341223
"fixTextClippingAndroid15useBoundsForWidth",
12351224
JReactNativeFeatureFlagsCxxInterop::fixTextClippingAndroid15useBoundsForWidth),
1236-
makeNativeMethod(
1237-
"fixYogaFlexBasisFitContentInMainAxis",
1238-
JReactNativeFeatureFlagsCxxInterop::fixYogaFlexBasisFitContentInMainAxis),
12391225
makeNativeMethod(
12401226
"fuseboxAssertSingleHostState",
12411227
JReactNativeFeatureFlagsCxxInterop::fuseboxAssertSingleHostState),

packages/react-native/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<c3a280ebf9c5b95d484f3b79fb1ac3e5>>
7+
* @generated SignedSource<<9e245713f519765f04c5517c1de47c70>>
88
*/
99

1010
/**
@@ -210,9 +210,6 @@ class JReactNativeFeatureFlagsCxxInterop
210210
static bool fixTextClippingAndroid15useBoundsForWidth(
211211
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
212212

213-
static bool fixYogaFlexBasisFitContentInMainAxis(
214-
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
215-
216213
static bool fuseboxAssertSingleHostState(
217214
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
218215

packages/react-native/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* This source code is licensed under the MIT license found in the
55
* LICENSE file in the root directory of this source tree.
66
*
7-
* @generated SignedSource<<6630f6e51cce8abe8457e6ca17b4db05>>
7+
* @generated SignedSource<<10986d98341baa81d1aa3fc90f739367>>
88
*/
99

1010
/**
@@ -266,10 +266,6 @@ bool ReactNativeFeatureFlags::fixTextClippingAndroid15useBoundsForWidth() {
266266
return getAccessor().fixTextClippingAndroid15useBoundsForWidth();
267267
}
268268

269-
bool ReactNativeFeatureFlags::fixYogaFlexBasisFitContentInMainAxis() {
270-
return getAccessor().fixYogaFlexBasisFitContentInMainAxis();
271-
}
272-
273269
bool ReactNativeFeatureFlags::fuseboxAssertSingleHostState() {
274270
return getAccessor().fuseboxAssertSingleHostState();
275271
}

0 commit comments

Comments
 (0)