mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Cleanup enableAndroidLineHeightCentering flag (#48577)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48577 This has been enabled by default for about two and a half months. Let's clean up the old path. Changelog: [Internal] Reviewed By: javache Differential Revision: D67985133 fbshipit-source-id: 024c1b3f10d7d23caba04ed4b6eec122de1a7c14
This commit is contained in:
committed by
Facebook GitHub Bot
parent
2ab9a8c135
commit
e53b76b6c6
+1
-7
@@ -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<<a5c3dc485960e5f1d86dbdc657eb12a7>>
|
||||
* @generated SignedSource<<3e10f8d2f623da3b7b502d8fa78f82a4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -58,12 +58,6 @@ public object ReactNativeFeatureFlags {
|
||||
@JvmStatic
|
||||
public fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean = accessor.enableAccumulatedUpdatesInRawPropsAndroid()
|
||||
|
||||
/**
|
||||
* When enabled, custom line height calculation will be centered from top to bottom.
|
||||
*/
|
||||
@JvmStatic
|
||||
public fun enableAndroidLineHeightCentering(): Boolean = accessor.enableAndroidLineHeightCentering()
|
||||
|
||||
/**
|
||||
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.
|
||||
*/
|
||||
|
||||
+1
-11
@@ -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<<0fc5a042b5d22ea606980f6b53f2f1ec>>
|
||||
* @generated SignedSource<<497bbb23778fe0f9763e9bfa715ea3aa>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -25,7 +25,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
|
||||
private var disableEventLoopOnBridgelessCache: Boolean? = null
|
||||
private var disableMountItemReorderingAndroidCache: Boolean? = null
|
||||
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
|
||||
private var enableAndroidLineHeightCenteringCache: Boolean? = null
|
||||
private var enableBridgelessArchitectureCache: Boolean? = null
|
||||
private var enableCppPropsIteratorSetterCache: Boolean? = null
|
||||
private var enableDeletionOfUnmountedViewsCache: Boolean? = null
|
||||
@@ -112,15 +111,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableAndroidLineHeightCentering(): Boolean {
|
||||
var cached = enableAndroidLineHeightCenteringCache
|
||||
if (cached == null) {
|
||||
cached = ReactNativeFeatureFlagsCxxInterop.enableAndroidLineHeightCentering()
|
||||
enableAndroidLineHeightCenteringCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableBridgelessArchitecture(): Boolean {
|
||||
var cached = enableBridgelessArchitectureCache
|
||||
if (cached == null) {
|
||||
|
||||
+1
-3
@@ -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<<bc9bae61731d639f4a62b8f7ed92959a>>
|
||||
* @generated SignedSource<<d801f87c988fbd921e2379f236e1711f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -38,8 +38,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableAndroidLineHeightCentering(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableBridgelessArchitecture(): Boolean
|
||||
|
||||
@DoNotStrip @JvmStatic public external fun enableCppPropsIteratorSetter(): Boolean
|
||||
|
||||
+1
-3
@@ -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<<c3b554cdb31bf0a29d45889f51295c74>>
|
||||
* @generated SignedSource<<5de2cfc00f486b7d07266939ce18a397>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -33,8 +33,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
|
||||
|
||||
override fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean = false
|
||||
|
||||
override fun enableAndroidLineHeightCentering(): Boolean = true
|
||||
|
||||
override fun enableBridgelessArchitecture(): Boolean = false
|
||||
|
||||
override fun enableCppPropsIteratorSetter(): Boolean = false
|
||||
|
||||
+1
-12
@@ -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<<ca5452a19b165ae2d7bfaf6657a94a25>>
|
||||
* @generated SignedSource<<f1ed4107e24ced5d2673bfb065573062>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -29,7 +29,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
||||
private var disableEventLoopOnBridgelessCache: Boolean? = null
|
||||
private var disableMountItemReorderingAndroidCache: Boolean? = null
|
||||
private var enableAccumulatedUpdatesInRawPropsAndroidCache: Boolean? = null
|
||||
private var enableAndroidLineHeightCenteringCache: Boolean? = null
|
||||
private var enableBridgelessArchitectureCache: Boolean? = null
|
||||
private var enableCppPropsIteratorSetterCache: Boolean? = null
|
||||
private var enableDeletionOfUnmountedViewsCache: Boolean? = null
|
||||
@@ -121,16 +120,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableAndroidLineHeightCentering(): Boolean {
|
||||
var cached = enableAndroidLineHeightCenteringCache
|
||||
if (cached == null) {
|
||||
cached = currentProvider.enableAndroidLineHeightCentering()
|
||||
accessedFeatureFlags.add("enableAndroidLineHeightCentering")
|
||||
enableAndroidLineHeightCenteringCache = cached
|
||||
}
|
||||
return cached
|
||||
}
|
||||
|
||||
override fun enableBridgelessArchitecture(): Boolean {
|
||||
var cached = enableBridgelessArchitectureCache
|
||||
if (cached == null) {
|
||||
|
||||
+1
-3
@@ -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<<9c3445b2d25b3b624a8edd8c7dac74b1>>
|
||||
* @generated SignedSource<<3cd802bdd1d383ea0668e43319d53b3f>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -33,8 +33,6 @@ public interface ReactNativeFeatureFlagsProvider {
|
||||
|
||||
@DoNotStrip public fun enableAccumulatedUpdatesInRawPropsAndroid(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableAndroidLineHeightCentering(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableBridgelessArchitecture(): Boolean
|
||||
|
||||
@DoNotStrip public fun enableCppPropsIteratorSetter(): Boolean
|
||||
|
||||
+1
-7
@@ -21,7 +21,6 @@ import com.facebook.infer.annotation.Assertions;
|
||||
import com.facebook.react.bridge.ReadableArray;
|
||||
import com.facebook.react.bridge.ReadableMap;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
|
||||
import com.facebook.react.uimanager.IllegalViewOperationException;
|
||||
import com.facebook.react.uimanager.LayoutShadowNode;
|
||||
import com.facebook.react.uimanager.NativeViewHierarchyOptimizer;
|
||||
@@ -35,7 +34,6 @@ import com.facebook.react.views.text.internal.ReactTextInlineImageShadowNode;
|
||||
import com.facebook.react.views.text.internal.span.CustomLetterSpacingSpan;
|
||||
import com.facebook.react.views.text.internal.span.CustomLineHeightSpan;
|
||||
import com.facebook.react.views.text.internal.span.CustomStyleSpan;
|
||||
import com.facebook.react.views.text.internal.span.LegacyLineHeightSpan;
|
||||
import com.facebook.react.views.text.internal.span.ReactAbsoluteSizeSpan;
|
||||
import com.facebook.react.views.text.internal.span.ReactBackgroundColorSpan;
|
||||
import com.facebook.react.views.text.internal.span.ReactClickableSpan;
|
||||
@@ -231,11 +229,7 @@ public abstract class ReactBaseTextShadowNode extends LayoutShadowNode {
|
||||
if (!Float.isNaN(effectiveLineHeight)
|
||||
&& (parentTextAttributes == null
|
||||
|| parentTextAttributes.getEffectiveLineHeight() != effectiveLineHeight)) {
|
||||
if (ReactNativeFeatureFlags.enableAndroidLineHeightCentering()) {
|
||||
ops.add(new SetSpanOperation(start, end, new CustomLineHeightSpan(effectiveLineHeight)));
|
||||
} else {
|
||||
ops.add(new SetSpanOperation(start, end, new LegacyLineHeightSpan(effectiveLineHeight)));
|
||||
}
|
||||
ops.add(new SetSpanOperation(start, end, new CustomLineHeightSpan(effectiveLineHeight)));
|
||||
}
|
||||
ops.add(new SetSpanOperation(start, end, new ReactTagSpan(textShadowNode.getReactTag())));
|
||||
}
|
||||
|
||||
+3
-11
@@ -32,14 +32,12 @@ import com.facebook.react.bridge.WritableArray;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.common.build.ReactBuildConfig;
|
||||
import com.facebook.react.common.mapbuffer.MapBuffer;
|
||||
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
|
||||
import com.facebook.react.uimanager.PixelUtil;
|
||||
import com.facebook.react.uimanager.ReactAccessibilityDelegate.AccessibilityRole;
|
||||
import com.facebook.react.uimanager.ReactAccessibilityDelegate.Role;
|
||||
import com.facebook.react.views.text.internal.span.CustomLetterSpacingSpan;
|
||||
import com.facebook.react.views.text.internal.span.CustomLineHeightSpan;
|
||||
import com.facebook.react.views.text.internal.span.CustomStyleSpan;
|
||||
import com.facebook.react.views.text.internal.span.LegacyLineHeightSpan;
|
||||
import com.facebook.react.views.text.internal.span.ReactAbsoluteSizeSpan;
|
||||
import com.facebook.react.views.text.internal.span.ReactBackgroundColorSpan;
|
||||
import com.facebook.react.views.text.internal.span.ReactClickableSpan;
|
||||
@@ -319,15 +317,9 @@ public class TextLayoutManager {
|
||||
textAttributes.mTextShadowColor)));
|
||||
}
|
||||
if (!Float.isNaN(textAttributes.getEffectiveLineHeight())) {
|
||||
if (ReactNativeFeatureFlags.enableAndroidLineHeightCentering()) {
|
||||
ops.add(
|
||||
new SetSpanOperation(
|
||||
start, end, new CustomLineHeightSpan(textAttributes.getEffectiveLineHeight())));
|
||||
} else {
|
||||
ops.add(
|
||||
new SetSpanOperation(
|
||||
start, end, new LegacyLineHeightSpan(textAttributes.getEffectiveLineHeight())));
|
||||
}
|
||||
ops.add(
|
||||
new SetSpanOperation(
|
||||
start, end, new CustomLineHeightSpan(textAttributes.getEffectiveLineHeight())));
|
||||
}
|
||||
|
||||
ops.add(new SetSpanOperation(start, end, new ReactTagSpan(reactTag)));
|
||||
|
||||
-69
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
package com.facebook.react.views.text.internal.span
|
||||
|
||||
import android.graphics.Paint.FontMetricsInt
|
||||
import android.text.style.LineHeightSpan
|
||||
import kotlin.math.ceil
|
||||
import kotlin.math.floor
|
||||
import kotlin.math.min
|
||||
|
||||
/**
|
||||
* We use a custom [LineHeightSpan], because `lineSpacingExtra` is broken. Details here:
|
||||
* https://github.com/facebook/react-native/issues/7546
|
||||
*/
|
||||
public class LegacyLineHeightSpan(height: Float) : LineHeightSpan, ReactSpan {
|
||||
public val lineHeight: Int = ceil(height.toDouble()).toInt()
|
||||
|
||||
public override fun chooseHeight(
|
||||
text: CharSequence?,
|
||||
start: Int,
|
||||
end: Int,
|
||||
spanstartv: Int,
|
||||
v: Int,
|
||||
fm: FontMetricsInt,
|
||||
) {
|
||||
// This is more complicated that I wanted it to be. You can find a good explanation of what the
|
||||
// FontMetrics mean here: http://stackoverflow.com/questions/27631736.
|
||||
// The general solution is that if there's not enough height to show the full line height, we
|
||||
// will prioritize in this order: descent, ascent, bottom, top
|
||||
|
||||
if (fm.descent > lineHeight) {
|
||||
// Show as much descent as possible
|
||||
fm.descent = min(lineHeight.toDouble(), fm.descent.toDouble()).toInt()
|
||||
fm.bottom = fm.descent
|
||||
fm.ascent = 0
|
||||
fm.top = fm.ascent
|
||||
} else if (-fm.ascent + fm.descent > lineHeight) {
|
||||
// Show all descent, and as much ascent as possible
|
||||
fm.bottom = fm.descent
|
||||
fm.ascent = -lineHeight + fm.descent
|
||||
fm.top = fm.ascent
|
||||
} else if (-fm.ascent + fm.bottom > lineHeight) {
|
||||
// Show all ascent, descent, as much bottom as possible
|
||||
fm.top = fm.ascent
|
||||
fm.bottom = fm.ascent + lineHeight
|
||||
} else if (-fm.top + fm.bottom > lineHeight) {
|
||||
// Show all ascent, descent, bottom, as much top as possible
|
||||
fm.top = fm.bottom - lineHeight
|
||||
} else {
|
||||
// Show proportionally additional ascent / top & descent / bottom
|
||||
val additional = lineHeight - (-fm.top + fm.bottom)
|
||||
|
||||
// Round up for the negative values and down for the positive values (arbitrary choice)
|
||||
// So that bottom - top equals additional even if it's an odd number.
|
||||
val top = (fm.top - ceil(additional / 2.0f)).toInt()
|
||||
val bottom = (fm.bottom + floor(additional / 2.0f)).toInt()
|
||||
|
||||
fm.top = top
|
||||
fm.ascent = top
|
||||
fm.descent = bottom
|
||||
fm.bottom = bottom
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-9
@@ -50,7 +50,6 @@ import com.facebook.react.bridge.ReactContext;
|
||||
import com.facebook.react.bridge.ReactSoftExceptionLogger;
|
||||
import com.facebook.react.common.ReactConstants;
|
||||
import com.facebook.react.common.build.ReactBuildConfig;
|
||||
import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
|
||||
import com.facebook.react.uimanager.BackgroundStyleApplicator;
|
||||
import com.facebook.react.uimanager.LengthPercentage;
|
||||
import com.facebook.react.uimanager.LengthPercentageType;
|
||||
@@ -72,7 +71,6 @@ import com.facebook.react.views.text.TextLayoutManager;
|
||||
import com.facebook.react.views.text.internal.span.CustomLetterSpacingSpan;
|
||||
import com.facebook.react.views.text.internal.span.CustomLineHeightSpan;
|
||||
import com.facebook.react.views.text.internal.span.CustomStyleSpan;
|
||||
import com.facebook.react.views.text.internal.span.LegacyLineHeightSpan;
|
||||
import com.facebook.react.views.text.internal.span.ReactAbsoluteSizeSpan;
|
||||
import com.facebook.react.views.text.internal.span.ReactBackgroundColorSpan;
|
||||
import com.facebook.react.views.text.internal.span.ReactForegroundColorSpan;
|
||||
@@ -873,13 +871,7 @@ public class ReactEditText extends AppCompatEditText {
|
||||
|
||||
float lineHeight = mTextAttributes.getEffectiveLineHeight();
|
||||
if (!Float.isNaN(lineHeight)) {
|
||||
if (ReactNativeFeatureFlags.enableAndroidLineHeightCentering()) {
|
||||
workingText.setSpan(
|
||||
new CustomLineHeightSpan(lineHeight), 0, workingText.length(), spanFlags);
|
||||
} else {
|
||||
workingText.setSpan(
|
||||
new LegacyLineHeightSpan(lineHeight), 0, workingText.length(), spanFlags);
|
||||
}
|
||||
workingText.setSpan(new CustomLineHeightSpan(lineHeight), 0, workingText.length(), spanFlags);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-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<<1f6ba072411c3ce3fc3659677da540c1>>
|
||||
* @generated SignedSource<<7c3853858da56eb5f471abccf9dcbf55>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -69,12 +69,6 @@ class ReactNativeFeatureFlagsProviderHolder
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool enableAndroidLineHeightCentering() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableAndroidLineHeightCentering");
|
||||
return method(javaProvider_);
|
||||
}
|
||||
|
||||
bool enableBridgelessArchitecture() override {
|
||||
static const auto method =
|
||||
getReactNativeFeatureFlagsProviderJavaClass()->getMethod<jboolean()>("enableBridgelessArchitecture");
|
||||
@@ -344,11 +338,6 @@ bool JReactNativeFeatureFlagsCxxInterop::enableAccumulatedUpdatesInRawPropsAndro
|
||||
return ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::enableAndroidLineHeightCentering(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::enableAndroidLineHeightCentering();
|
||||
}
|
||||
|
||||
bool JReactNativeFeatureFlagsCxxInterop::enableBridgelessArchitecture(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop> /*unused*/) {
|
||||
return ReactNativeFeatureFlags::enableBridgelessArchitecture();
|
||||
@@ -595,9 +584,6 @@ void JReactNativeFeatureFlagsCxxInterop::registerNatives() {
|
||||
makeNativeMethod(
|
||||
"enableAccumulatedUpdatesInRawPropsAndroid",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableAccumulatedUpdatesInRawPropsAndroid),
|
||||
makeNativeMethod(
|
||||
"enableAndroidLineHeightCentering",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableAndroidLineHeightCentering),
|
||||
makeNativeMethod(
|
||||
"enableBridgelessArchitecture",
|
||||
JReactNativeFeatureFlagsCxxInterop::enableBridgelessArchitecture),
|
||||
|
||||
+1
-4
@@ -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<<6a9b64bcb7d6e6115d3125c0fad09f19>>
|
||||
* @generated SignedSource<<77b4ed5aa33290ba9da1719544e974cb>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -45,9 +45,6 @@ class JReactNativeFeatureFlagsCxxInterop
|
||||
static bool enableAccumulatedUpdatesInRawPropsAndroid(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool enableAndroidLineHeightCentering(
|
||||
facebook::jni::alias_ref<JReactNativeFeatureFlagsCxxInterop>);
|
||||
|
||||
static bool enableBridgelessArchitecture(
|
||||
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<<406e907a7652665aebfb8e44010068e2>>
|
||||
* @generated SignedSource<<7d301656072183649246db8fa738fc4d>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -46,10 +46,6 @@ bool ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid() {
|
||||
return getAccessor().enableAccumulatedUpdatesInRawPropsAndroid();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::enableAndroidLineHeightCentering() {
|
||||
return getAccessor().enableAndroidLineHeightCentering();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlags::enableBridgelessArchitecture() {
|
||||
return getAccessor().enableBridgelessArchitecture();
|
||||
}
|
||||
|
||||
@@ -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<<3ffac6c04d5fbc9ca34a7b4e6b7de56d>>
|
||||
* @generated SignedSource<<eee9560521020eb75fa84c6e0cef31a3>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -64,11 +64,6 @@ class ReactNativeFeatureFlags {
|
||||
*/
|
||||
RN_EXPORT static bool enableAccumulatedUpdatesInRawPropsAndroid();
|
||||
|
||||
/**
|
||||
* When enabled, custom line height calculation will be centered from top to bottom.
|
||||
*/
|
||||
RN_EXPORT static bool enableAndroidLineHeightCentering();
|
||||
|
||||
/**
|
||||
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.
|
||||
*/
|
||||
|
||||
+41
-59
@@ -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<<ceeecb476d5040a514090f43c332b6c6>>
|
||||
* @generated SignedSource<<a360603ae99888aa172cc1b85d3893e4>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -119,24 +119,6 @@ bool ReactNativeFeatureFlagsAccessor::enableAccumulatedUpdatesInRawPropsAndroid(
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::enableAndroidLineHeightCentering() {
|
||||
auto flagValue = enableAndroidLineHeightCentering_.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(5, "enableAndroidLineHeightCentering");
|
||||
|
||||
flagValue = currentProvider_->enableAndroidLineHeightCentering();
|
||||
enableAndroidLineHeightCentering_ = flagValue;
|
||||
}
|
||||
|
||||
return flagValue.value();
|
||||
}
|
||||
|
||||
bool ReactNativeFeatureFlagsAccessor::enableBridgelessArchitecture() {
|
||||
auto flagValue = enableBridgelessArchitecture_.load();
|
||||
|
||||
@@ -146,7 +128,7 @@ bool ReactNativeFeatureFlagsAccessor::enableBridgelessArchitecture() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(6, "enableBridgelessArchitecture");
|
||||
markFlagAsAccessed(5, "enableBridgelessArchitecture");
|
||||
|
||||
flagValue = currentProvider_->enableBridgelessArchitecture();
|
||||
enableBridgelessArchitecture_ = flagValue;
|
||||
@@ -164,7 +146,7 @@ bool ReactNativeFeatureFlagsAccessor::enableCppPropsIteratorSetter() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(7, "enableCppPropsIteratorSetter");
|
||||
markFlagAsAccessed(6, "enableCppPropsIteratorSetter");
|
||||
|
||||
flagValue = currentProvider_->enableCppPropsIteratorSetter();
|
||||
enableCppPropsIteratorSetter_ = flagValue;
|
||||
@@ -182,7 +164,7 @@ bool ReactNativeFeatureFlagsAccessor::enableDeletionOfUnmountedViews() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(8, "enableDeletionOfUnmountedViews");
|
||||
markFlagAsAccessed(7, "enableDeletionOfUnmountedViews");
|
||||
|
||||
flagValue = currentProvider_->enableDeletionOfUnmountedViews();
|
||||
enableDeletionOfUnmountedViews_ = flagValue;
|
||||
@@ -200,7 +182,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEagerRootViewAttachment() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(9, "enableEagerRootViewAttachment");
|
||||
markFlagAsAccessed(8, "enableEagerRootViewAttachment");
|
||||
|
||||
flagValue = currentProvider_->enableEagerRootViewAttachment();
|
||||
enableEagerRootViewAttachment_ = flagValue;
|
||||
@@ -218,7 +200,7 @@ bool ReactNativeFeatureFlagsAccessor::enableEventEmitterRetentionDuringGesturesO
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(10, "enableEventEmitterRetentionDuringGesturesOnAndroid");
|
||||
markFlagAsAccessed(9, "enableEventEmitterRetentionDuringGesturesOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->enableEventEmitterRetentionDuringGesturesOnAndroid();
|
||||
enableEventEmitterRetentionDuringGesturesOnAndroid_ = flagValue;
|
||||
@@ -236,7 +218,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricLogs() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(11, "enableFabricLogs");
|
||||
markFlagAsAccessed(10, "enableFabricLogs");
|
||||
|
||||
flagValue = currentProvider_->enableFabricLogs();
|
||||
enableFabricLogs_ = flagValue;
|
||||
@@ -254,7 +236,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFabricRenderer() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(12, "enableFabricRenderer");
|
||||
markFlagAsAccessed(11, "enableFabricRenderer");
|
||||
|
||||
flagValue = currentProvider_->enableFabricRenderer();
|
||||
enableFabricRenderer_ = flagValue;
|
||||
@@ -272,7 +254,7 @@ bool ReactNativeFeatureFlagsAccessor::enableFixForViewCommandRace() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(13, "enableFixForViewCommandRace");
|
||||
markFlagAsAccessed(12, "enableFixForViewCommandRace");
|
||||
|
||||
flagValue = currentProvider_->enableFixForViewCommandRace();
|
||||
enableFixForViewCommandRace_ = flagValue;
|
||||
@@ -290,7 +272,7 @@ bool ReactNativeFeatureFlagsAccessor::enableGranularShadowTreeStateReconciliatio
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(14, "enableGranularShadowTreeStateReconciliation");
|
||||
markFlagAsAccessed(13, "enableGranularShadowTreeStateReconciliation");
|
||||
|
||||
flagValue = currentProvider_->enableGranularShadowTreeStateReconciliation();
|
||||
enableGranularShadowTreeStateReconciliation_ = flagValue;
|
||||
@@ -308,7 +290,7 @@ bool ReactNativeFeatureFlagsAccessor::enableIOSViewClipToPaddingBox() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(15, "enableIOSViewClipToPaddingBox");
|
||||
markFlagAsAccessed(14, "enableIOSViewClipToPaddingBox");
|
||||
|
||||
flagValue = currentProvider_->enableIOSViewClipToPaddingBox();
|
||||
enableIOSViewClipToPaddingBox_ = flagValue;
|
||||
@@ -326,7 +308,7 @@ bool ReactNativeFeatureFlagsAccessor::enableImagePrefetchingAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(16, "enableImagePrefetchingAndroid");
|
||||
markFlagAsAccessed(15, "enableImagePrefetchingAndroid");
|
||||
|
||||
flagValue = currentProvider_->enableImagePrefetchingAndroid();
|
||||
enableImagePrefetchingAndroid_ = flagValue;
|
||||
@@ -344,7 +326,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(17, "enableLayoutAnimationsOnAndroid");
|
||||
markFlagAsAccessed(16, "enableLayoutAnimationsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->enableLayoutAnimationsOnAndroid();
|
||||
enableLayoutAnimationsOnAndroid_ = flagValue;
|
||||
@@ -362,7 +344,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLayoutAnimationsOnIOS() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(18, "enableLayoutAnimationsOnIOS");
|
||||
markFlagAsAccessed(17, "enableLayoutAnimationsOnIOS");
|
||||
|
||||
flagValue = currentProvider_->enableLayoutAnimationsOnIOS();
|
||||
enableLayoutAnimationsOnIOS_ = flagValue;
|
||||
@@ -380,7 +362,7 @@ bool ReactNativeFeatureFlagsAccessor::enableLongTaskAPI() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(19, "enableLongTaskAPI");
|
||||
markFlagAsAccessed(18, "enableLongTaskAPI");
|
||||
|
||||
flagValue = currentProvider_->enableLongTaskAPI();
|
||||
enableLongTaskAPI_ = flagValue;
|
||||
@@ -398,7 +380,7 @@ bool ReactNativeFeatureFlagsAccessor::enableNewBackgroundAndBorderDrawables() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(20, "enableNewBackgroundAndBorderDrawables");
|
||||
markFlagAsAccessed(19, "enableNewBackgroundAndBorderDrawables");
|
||||
|
||||
flagValue = currentProvider_->enableNewBackgroundAndBorderDrawables();
|
||||
enableNewBackgroundAndBorderDrawables_ = flagValue;
|
||||
@@ -416,7 +398,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePreciseSchedulingForPremountItemsOnA
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(21, "enablePreciseSchedulingForPremountItemsOnAndroid");
|
||||
markFlagAsAccessed(20, "enablePreciseSchedulingForPremountItemsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->enablePreciseSchedulingForPremountItemsOnAndroid();
|
||||
enablePreciseSchedulingForPremountItemsOnAndroid_ = flagValue;
|
||||
@@ -434,7 +416,7 @@ bool ReactNativeFeatureFlagsAccessor::enablePropsUpdateReconciliationAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(22, "enablePropsUpdateReconciliationAndroid");
|
||||
markFlagAsAccessed(21, "enablePropsUpdateReconciliationAndroid");
|
||||
|
||||
flagValue = currentProvider_->enablePropsUpdateReconciliationAndroid();
|
||||
enablePropsUpdateReconciliationAndroid_ = flagValue;
|
||||
@@ -452,7 +434,7 @@ bool ReactNativeFeatureFlagsAccessor::enableReportEventPaintTime() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(23, "enableReportEventPaintTime");
|
||||
markFlagAsAccessed(22, "enableReportEventPaintTime");
|
||||
|
||||
flagValue = currentProvider_->enableReportEventPaintTime();
|
||||
enableReportEventPaintTime_ = flagValue;
|
||||
@@ -470,7 +452,7 @@ bool ReactNativeFeatureFlagsAccessor::enableSynchronousStateUpdates() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(24, "enableSynchronousStateUpdates");
|
||||
markFlagAsAccessed(23, "enableSynchronousStateUpdates");
|
||||
|
||||
flagValue = currentProvider_->enableSynchronousStateUpdates();
|
||||
enableSynchronousStateUpdates_ = flagValue;
|
||||
@@ -488,7 +470,7 @@ bool ReactNativeFeatureFlagsAccessor::enableUIConsistency() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(25, "enableUIConsistency");
|
||||
markFlagAsAccessed(24, "enableUIConsistency");
|
||||
|
||||
flagValue = currentProvider_->enableUIConsistency();
|
||||
enableUIConsistency_ = flagValue;
|
||||
@@ -506,7 +488,7 @@ bool ReactNativeFeatureFlagsAccessor::enableViewRecycling() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(26, "enableViewRecycling");
|
||||
markFlagAsAccessed(25, "enableViewRecycling");
|
||||
|
||||
flagValue = currentProvider_->enableViewRecycling();
|
||||
enableViewRecycling_ = flagValue;
|
||||
@@ -524,7 +506,7 @@ bool ReactNativeFeatureFlagsAccessor::excludeYogaFromRawProps() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(27, "excludeYogaFromRawProps");
|
||||
markFlagAsAccessed(26, "excludeYogaFromRawProps");
|
||||
|
||||
flagValue = currentProvider_->excludeYogaFromRawProps();
|
||||
excludeYogaFromRawProps_ = flagValue;
|
||||
@@ -542,7 +524,7 @@ bool ReactNativeFeatureFlagsAccessor::fixDifferentiatorEmittingUpdatesWithWrongP
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(28, "fixDifferentiatorEmittingUpdatesWithWrongParentTag");
|
||||
markFlagAsAccessed(27, "fixDifferentiatorEmittingUpdatesWithWrongParentTag");
|
||||
|
||||
flagValue = currentProvider_->fixDifferentiatorEmittingUpdatesWithWrongParentTag();
|
||||
fixDifferentiatorEmittingUpdatesWithWrongParentTag_ = flagValue;
|
||||
@@ -560,7 +542,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMappingOfEventPrioritiesBetweenFabricAn
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(29, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
||||
markFlagAsAccessed(28, "fixMappingOfEventPrioritiesBetweenFabricAndReact");
|
||||
|
||||
flagValue = currentProvider_->fixMappingOfEventPrioritiesBetweenFabricAndReact();
|
||||
fixMappingOfEventPrioritiesBetweenFabricAndReact_ = flagValue;
|
||||
@@ -578,7 +560,7 @@ bool ReactNativeFeatureFlagsAccessor::fixMountingCoordinatorReportedPendingTrans
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(30, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid");
|
||||
markFlagAsAccessed(29, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->fixMountingCoordinatorReportedPendingTransactionsOnAndroid();
|
||||
fixMountingCoordinatorReportedPendingTransactionsOnAndroid_ = flagValue;
|
||||
@@ -596,7 +578,7 @@ bool ReactNativeFeatureFlagsAccessor::fuseboxEnabledRelease() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(31, "fuseboxEnabledRelease");
|
||||
markFlagAsAccessed(30, "fuseboxEnabledRelease");
|
||||
|
||||
flagValue = currentProvider_->fuseboxEnabledRelease();
|
||||
fuseboxEnabledRelease_ = flagValue;
|
||||
@@ -614,7 +596,7 @@ bool ReactNativeFeatureFlagsAccessor::initEagerTurboModulesOnNativeModulesQueueA
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(32, "initEagerTurboModulesOnNativeModulesQueueAndroid");
|
||||
markFlagAsAccessed(31, "initEagerTurboModulesOnNativeModulesQueueAndroid");
|
||||
|
||||
flagValue = currentProvider_->initEagerTurboModulesOnNativeModulesQueueAndroid();
|
||||
initEagerTurboModulesOnNativeModulesQueueAndroid_ = flagValue;
|
||||
@@ -632,7 +614,7 @@ bool ReactNativeFeatureFlagsAccessor::lazyAnimationCallbacks() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(33, "lazyAnimationCallbacks");
|
||||
markFlagAsAccessed(32, "lazyAnimationCallbacks");
|
||||
|
||||
flagValue = currentProvider_->lazyAnimationCallbacks();
|
||||
lazyAnimationCallbacks_ = flagValue;
|
||||
@@ -650,7 +632,7 @@ bool ReactNativeFeatureFlagsAccessor::loadVectorDrawablesOnImages() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(34, "loadVectorDrawablesOnImages");
|
||||
markFlagAsAccessed(33, "loadVectorDrawablesOnImages");
|
||||
|
||||
flagValue = currentProvider_->loadVectorDrawablesOnImages();
|
||||
loadVectorDrawablesOnImages_ = flagValue;
|
||||
@@ -668,7 +650,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(35, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
markFlagAsAccessed(34, "traceTurboModulePromiseRejectionsOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->traceTurboModulePromiseRejectionsOnAndroid();
|
||||
traceTurboModulePromiseRejectionsOnAndroid_ = flagValue;
|
||||
@@ -686,7 +668,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(36, "useAlwaysAvailableJSErrorHandling");
|
||||
markFlagAsAccessed(35, "useAlwaysAvailableJSErrorHandling");
|
||||
|
||||
flagValue = currentProvider_->useAlwaysAvailableJSErrorHandling();
|
||||
useAlwaysAvailableJSErrorHandling_ = flagValue;
|
||||
@@ -704,7 +686,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(37, "useFabricInterop");
|
||||
markFlagAsAccessed(36, "useFabricInterop");
|
||||
|
||||
flagValue = currentProvider_->useFabricInterop();
|
||||
useFabricInterop_ = flagValue;
|
||||
@@ -722,7 +704,7 @@ bool ReactNativeFeatureFlagsAccessor::useImmediateExecutorInAndroidBridgeless()
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(38, "useImmediateExecutorInAndroidBridgeless");
|
||||
markFlagAsAccessed(37, "useImmediateExecutorInAndroidBridgeless");
|
||||
|
||||
flagValue = currentProvider_->useImmediateExecutorInAndroidBridgeless();
|
||||
useImmediateExecutorInAndroidBridgeless_ = flagValue;
|
||||
@@ -740,7 +722,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(39, "useNativeViewConfigsInBridgelessMode");
|
||||
markFlagAsAccessed(38, "useNativeViewConfigsInBridgelessMode");
|
||||
|
||||
flagValue = currentProvider_->useNativeViewConfigsInBridgelessMode();
|
||||
useNativeViewConfigsInBridgelessMode_ = flagValue;
|
||||
@@ -758,7 +740,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimisedViewPreallocationOnAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(40, "useOptimisedViewPreallocationOnAndroid");
|
||||
markFlagAsAccessed(39, "useOptimisedViewPreallocationOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimisedViewPreallocationOnAndroid();
|
||||
useOptimisedViewPreallocationOnAndroid_ = flagValue;
|
||||
@@ -776,7 +758,7 @@ bool ReactNativeFeatureFlagsAccessor::useOptimizedEventBatchingOnAndroid() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(41, "useOptimizedEventBatchingOnAndroid");
|
||||
markFlagAsAccessed(40, "useOptimizedEventBatchingOnAndroid");
|
||||
|
||||
flagValue = currentProvider_->useOptimizedEventBatchingOnAndroid();
|
||||
useOptimizedEventBatchingOnAndroid_ = flagValue;
|
||||
@@ -794,7 +776,7 @@ bool ReactNativeFeatureFlagsAccessor::useRawPropsJsiValue() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(42, "useRawPropsJsiValue");
|
||||
markFlagAsAccessed(41, "useRawPropsJsiValue");
|
||||
|
||||
flagValue = currentProvider_->useRawPropsJsiValue();
|
||||
useRawPropsJsiValue_ = flagValue;
|
||||
@@ -812,7 +794,7 @@ bool ReactNativeFeatureFlagsAccessor::useRuntimeShadowNodeReferenceUpdate() {
|
||||
// be accessing the provider multiple times but the end state of this
|
||||
// instance and the returned flag value would be the same.
|
||||
|
||||
markFlagAsAccessed(43, "useRuntimeShadowNodeReferenceUpdate");
|
||||
markFlagAsAccessed(42, "useRuntimeShadowNodeReferenceUpdate");
|
||||
|
||||
flagValue = currentProvider_->useRuntimeShadowNodeReferenceUpdate();
|
||||
useRuntimeShadowNodeReferenceUpdate_ = flagValue;
|
||||
@@ -830,7 +812,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(44, "useTurboModuleInterop");
|
||||
markFlagAsAccessed(43, "useTurboModuleInterop");
|
||||
|
||||
flagValue = currentProvider_->useTurboModuleInterop();
|
||||
useTurboModuleInterop_ = flagValue;
|
||||
@@ -848,7 +830,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(45, "useTurboModules");
|
||||
markFlagAsAccessed(44, "useTurboModules");
|
||||
|
||||
flagValue = currentProvider_->useTurboModules();
|
||||
useTurboModules_ = flagValue;
|
||||
|
||||
+2
-4
@@ -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<<66b48cfaecb25d9470f726990f7dfea3>>
|
||||
* @generated SignedSource<<8eb2b5d6dd367826ff7bc899afbdea60>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -37,7 +37,6 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
bool disableEventLoopOnBridgeless();
|
||||
bool disableMountItemReorderingAndroid();
|
||||
bool enableAccumulatedUpdatesInRawPropsAndroid();
|
||||
bool enableAndroidLineHeightCentering();
|
||||
bool enableBridgelessArchitecture();
|
||||
bool enableCppPropsIteratorSetter();
|
||||
bool enableDeletionOfUnmountedViews();
|
||||
@@ -89,14 +88,13 @@ class ReactNativeFeatureFlagsAccessor {
|
||||
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
||||
bool wasOverridden_;
|
||||
|
||||
std::array<std::atomic<const char*>, 46> accessedFeatureFlags_;
|
||||
std::array<std::atomic<const char*>, 45> accessedFeatureFlags_;
|
||||
|
||||
std::atomic<std::optional<bool>> commonTestFlag_;
|
||||
std::atomic<std::optional<bool>> completeReactInstanceCreationOnBgThreadOnAndroid_;
|
||||
std::atomic<std::optional<bool>> disableEventLoopOnBridgeless_;
|
||||
std::atomic<std::optional<bool>> disableMountItemReorderingAndroid_;
|
||||
std::atomic<std::optional<bool>> enableAccumulatedUpdatesInRawPropsAndroid_;
|
||||
std::atomic<std::optional<bool>> enableAndroidLineHeightCentering_;
|
||||
std::atomic<std::optional<bool>> enableBridgelessArchitecture_;
|
||||
std::atomic<std::optional<bool>> enableCppPropsIteratorSetter_;
|
||||
std::atomic<std::optional<bool>> enableDeletionOfUnmountedViews_;
|
||||
|
||||
+1
-5
@@ -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<<a19a85c7e9746a0640d8f0f6695a0c13>>
|
||||
* @generated SignedSource<<e38a0e9474ac349a4b8153862470c856>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -47,10 +47,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool enableAndroidLineHeightCentering() override {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool enableBridgelessArchitecture() override {
|
||||
return false;
|
||||
}
|
||||
|
||||
+1
-10
@@ -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<<a0ba27d7f852a8d546f0124cc03a494e>>
|
||||
* @generated SignedSource<<e5e8a3b63e42ed4b5cab143d46d20260>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -90,15 +90,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
||||
return ReactNativeFeatureFlagsDefaults::enableAccumulatedUpdatesInRawPropsAndroid();
|
||||
}
|
||||
|
||||
bool enableAndroidLineHeightCentering() override {
|
||||
auto value = values_["enableAndroidLineHeightCentering"];
|
||||
if (!value.isNull()) {
|
||||
return value.getBool();
|
||||
}
|
||||
|
||||
return ReactNativeFeatureFlagsDefaults::enableAndroidLineHeightCentering();
|
||||
}
|
||||
|
||||
bool enableBridgelessArchitecture() override {
|
||||
auto value = values_["enableBridgelessArchitecture"];
|
||||
if (!value.isNull()) {
|
||||
|
||||
+1
-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<<66cb80f7f8491acd8d1a2a5cf065ccc2>>
|
||||
* @generated SignedSource<<36bfe0037e4dba3b6eb6e95075914fce>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -30,7 +30,6 @@ class ReactNativeFeatureFlagsProvider {
|
||||
virtual bool disableEventLoopOnBridgeless() = 0;
|
||||
virtual bool disableMountItemReorderingAndroid() = 0;
|
||||
virtual bool enableAccumulatedUpdatesInRawPropsAndroid() = 0;
|
||||
virtual bool enableAndroidLineHeightCentering() = 0;
|
||||
virtual bool enableBridgelessArchitecture() = 0;
|
||||
virtual bool enableCppPropsIteratorSetter() = 0;
|
||||
virtual bool enableDeletionOfUnmountedViews() = 0;
|
||||
|
||||
+1
-6
@@ -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<<d93f15f9d99b8b7d5847d08f01590c4a>>
|
||||
* @generated SignedSource<<f5a1ea8dd3d64e435b6954c39dacb76a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -69,11 +69,6 @@ bool NativeReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid(
|
||||
return ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::enableAndroidLineHeightCentering(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::enableAndroidLineHeightCentering();
|
||||
}
|
||||
|
||||
bool NativeReactNativeFeatureFlags::enableBridgelessArchitecture(
|
||||
jsi::Runtime& /*runtime*/) {
|
||||
return ReactNativeFeatureFlags::enableBridgelessArchitecture();
|
||||
|
||||
+1
-3
@@ -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<<843c77a8566dc0ddc68d66100a58bba8>>
|
||||
* @generated SignedSource<<fc3960bfa407d1fc123ee4c71eac644a>>
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -47,8 +47,6 @@ class NativeReactNativeFeatureFlags
|
||||
|
||||
bool enableAccumulatedUpdatesInRawPropsAndroid(jsi::Runtime& runtime);
|
||||
|
||||
bool enableAndroidLineHeightCentering(jsi::Runtime& runtime);
|
||||
|
||||
bool enableBridgelessArchitecture(jsi::Runtime& runtime);
|
||||
|
||||
bool enableCppPropsIteratorSetter(jsi::Runtime& runtime);
|
||||
|
||||
@@ -95,15 +95,6 @@ const definitions: FeatureFlagDefinitions = {
|
||||
purpose: 'experimentation',
|
||||
},
|
||||
},
|
||||
enableAndroidLineHeightCentering: {
|
||||
defaultValue: true,
|
||||
metadata: {
|
||||
description:
|
||||
'When enabled, custom line height calculation will be centered from top to bottom.',
|
||||
expectedReleaseValue: true,
|
||||
purpose: 'release',
|
||||
},
|
||||
},
|
||||
enableBridgelessArchitecture: {
|
||||
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<<9f06559964f84b034ddd8a4cbc359afa>>
|
||||
* @generated SignedSource<<3037cf1c938dae492b656333cec9633c>>
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
@@ -56,7 +56,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
||||
disableEventLoopOnBridgeless: Getter<boolean>,
|
||||
disableMountItemReorderingAndroid: Getter<boolean>,
|
||||
enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
|
||||
enableAndroidLineHeightCentering: Getter<boolean>,
|
||||
enableBridgelessArchitecture: Getter<boolean>,
|
||||
enableCppPropsIteratorSetter: Getter<boolean>,
|
||||
enableDeletionOfUnmountedViews: Getter<boolean>,
|
||||
@@ -208,10 +207,6 @@ export const disableMountItemReorderingAndroid: Getter<boolean> = createNativeFl
|
||||
* When enabled, Andoid will accumulate updates in rawProps to reduce the number of mounting instructions for cascading rerenders.
|
||||
*/
|
||||
export const enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean> = createNativeFlagGetter('enableAccumulatedUpdatesInRawPropsAndroid', false);
|
||||
/**
|
||||
* When enabled, custom line height calculation will be centered from top to bottom.
|
||||
*/
|
||||
export const enableAndroidLineHeightCentering: Getter<boolean> = createNativeFlagGetter('enableAndroidLineHeightCentering', true);
|
||||
/**
|
||||
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.
|
||||
*/
|
||||
|
||||
+1
-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<<b063eb3f07ed16a539b02d32497b4099>>
|
||||
* @generated SignedSource<<37e95652ef5d824bb05e78ebdb051e43>>
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
@@ -29,7 +29,6 @@ export interface Spec extends TurboModule {
|
||||
+disableEventLoopOnBridgeless?: () => boolean;
|
||||
+disableMountItemReorderingAndroid?: () => boolean;
|
||||
+enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean;
|
||||
+enableAndroidLineHeightCentering?: () => boolean;
|
||||
+enableBridgelessArchitecture?: () => boolean;
|
||||
+enableCppPropsIteratorSetter?: () => boolean;
|
||||
+enableDeletionOfUnmountedViews?: () => boolean;
|
||||
|
||||
Reference in New Issue
Block a user