Skip to content

Commit 862e57e

Browse files
NickGerlemanfacebook-github-bot
authored andcommitted
Remove "deduplicated" spannable path
Summary: This removes the bulk of code added in facebook#39630. We're not shipping it, as it caused performance regressions. After this, I'm going to see if I can delete the non-MapBuffer version of TextLayoutManager, which is probably Differential Revision: D56796936
1 parent c96c893 commit 862e57e

34 files changed

+34
-1086
lines changed

packages/react-native/ReactAndroid/api/ReactAndroid.api

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7088,7 +7088,7 @@ public class com/facebook/react/views/text/FontMetricsUtil {
70887088
public static fun getFontMetrics (Ljava/lang/CharSequence;Landroid/text/Layout;Landroid/text/TextPaint;Landroid/content/Context;)Lcom/facebook/react/bridge/WritableArray;
70897089
}
70907090

7091-
public abstract class com/facebook/react/views/text/ReactBaseTextShadowNode : com/facebook/react/uimanager/LayoutShadowNode, com/facebook/react/views/text/BasicTextAttributeProvider {
7091+
public abstract class com/facebook/react/views/text/ReactBaseTextShadowNode : com/facebook/react/uimanager/LayoutShadowNode {
70927092
public static final field DEFAULT_TEXT_SHADOW_COLOR I
70937093
public static final field PROP_SHADOW_COLOR Ljava/lang/String;
70947094
public static final field PROP_SHADOW_OFFSET Ljava/lang/String;
@@ -7126,22 +7126,6 @@ public abstract class com/facebook/react/views/text/ReactBaseTextShadowNode : co
71267126
protected field mTextShadowRadius F
71277127
public fun <init> ()V
71287128
public fun <init> (Lcom/facebook/react/views/text/ReactTextViewManagerCallback;)V
7129-
public fun getAccessibilityRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$AccessibilityRole;
7130-
public fun getBackgroundColor ()I
7131-
public fun getColor ()I
7132-
public fun getFontFamily ()Ljava/lang/String;
7133-
public fun getFontFeatureSettings ()Ljava/lang/String;
7134-
public fun getFontStyle ()I
7135-
public fun getFontWeight ()I
7136-
public fun getRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$Role;
7137-
public fun getTextShadowColor ()I
7138-
public fun getTextShadowOffsetDx ()F
7139-
public fun getTextShadowOffsetDy ()F
7140-
public fun getTextShadowRadius ()F
7141-
public fun isBackgroundColorSet ()Z
7142-
public fun isColorSet ()Z
7143-
public fun isLineThroughTextDecorationSet ()Z
7144-
public fun isUnderlineTextDecorationSet ()Z
71457129
public fun setAccessibilityRole (Ljava/lang/String;)V
71467130
public fun setAdjustFontSizeToFit (Z)V
71477131
public fun setAllowFontScaling (Z)V
@@ -7382,7 +7366,7 @@ public class com/facebook/react/views/text/ReactVirtualTextViewManager$$PropsSet
73827366
public fun setProperty (Lcom/facebook/react/views/text/ReactVirtualTextViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
73837367
}
73847368

7385-
public class com/facebook/react/views/text/TextAttributeProps : com/facebook/react/views/text/EffectiveTextAttributeProvider {
7369+
public class com/facebook/react/views/text/TextAttributeProps {
73867370
public static final field TA_KEY_ACCESSIBILITY_ROLE S
73877371
public static final field TA_KEY_ALIGNMENT S
73887372
public static final field TA_KEY_ALLOW_FONT_SCALING S

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<<71bd0e6d2f2bd2c768b86a073451430c>>
7+
* @generated SignedSource<<ed2d49ccaaa01c0f34e37ff43b53d1d8>>
88
*/
99

1010
/**
@@ -76,12 +76,6 @@ public object ReactNativeFeatureFlags {
7676
@JvmStatic
7777
public fun enableMicrotasks(): Boolean = accessor.enableMicrotasks()
7878

79-
/**
80-
* Uses new, deduplicated logic for constructing Android Spannables from text fragments
81-
*/
82-
@JvmStatic
83-
public fun enableSpannableBuildingUnification(): Boolean = accessor.enableSpannableBuildingUnification()
84-
8579
/**
8680
* Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
8781
*/

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<<d03e37b3d80929ca78d8a6eecd9852a9>>
7+
* @generated SignedSource<<50c8aeff2f02f26b75bcf62f448ca60d>>
88
*/
99

1010
/**
@@ -28,7 +28,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
2828
private var enableBackgroundExecutorCache: Boolean? = null
2929
private var enableCleanTextInputYogaNodeCache: Boolean? = null
3030
private var enableMicrotasksCache: Boolean? = null
31-
private var enableSpannableBuildingUnificationCache: Boolean? = null
3231
private var enableSynchronousStateUpdatesCache: Boolean? = null
3332
private var enableUIConsistencyCache: Boolean? = null
3433
private var fixMountedFlagAndFixPreallocationCloneCache: Boolean? = null
@@ -112,15 +111,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
112111
return cached
113112
}
114113

115-
override fun enableSpannableBuildingUnification(): Boolean {
116-
var cached = enableSpannableBuildingUnificationCache
117-
if (cached == null) {
118-
cached = ReactNativeFeatureFlagsCxxInterop.enableSpannableBuildingUnification()
119-
enableSpannableBuildingUnificationCache = cached
120-
}
121-
return cached
122-
}
123-
124114
override fun enableSynchronousStateUpdates(): Boolean {
125115
var cached = enableSynchronousStateUpdatesCache
126116
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<<5d418feb35bbe1bc78c9b2887acf0e3d>>
7+
* @generated SignedSource<<dbc8923e390428cf599ca1bb38d3c7ed>>
88
*/
99

1010
/**
@@ -44,8 +44,6 @@ public object ReactNativeFeatureFlagsCxxInterop {
4444

4545
@DoNotStrip @JvmStatic public external fun enableMicrotasks(): Boolean
4646

47-
@DoNotStrip @JvmStatic public external fun enableSpannableBuildingUnification(): Boolean
48-
4947
@DoNotStrip @JvmStatic public external fun enableSynchronousStateUpdates(): Boolean
5048

5149
@DoNotStrip @JvmStatic public external fun enableUIConsistency(): 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<<eae8be3ca2fef75be0f254a6711fe40c>>
7+
* @generated SignedSource<<a0cd02254838c990161b7b350c65402a>>
88
*/
99

1010
/**
@@ -39,8 +39,6 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
3939

4040
override fun enableMicrotasks(): Boolean = false
4141

42-
override fun enableSpannableBuildingUnification(): Boolean = false
43-
4442
override fun enableSynchronousStateUpdates(): Boolean = false
4543

4644
override fun enableUIConsistency(): 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<<5f08267961d732e2f573ed933abf5ab9>>
7+
* @generated SignedSource<<88e9d6c51edd3e6fca3c01b9a8968bba>>
88
*/
99

1010
/**
@@ -32,7 +32,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
3232
private var enableBackgroundExecutorCache: Boolean? = null
3333
private var enableCleanTextInputYogaNodeCache: Boolean? = null
3434
private var enableMicrotasksCache: Boolean? = null
35-
private var enableSpannableBuildingUnificationCache: Boolean? = null
3635
private var enableSynchronousStateUpdatesCache: Boolean? = null
3736
private var enableUIConsistencyCache: Boolean? = null
3837
private var fixMountedFlagAndFixPreallocationCloneCache: Boolean? = null
@@ -124,16 +123,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
124123
return cached
125124
}
126125

127-
override fun enableSpannableBuildingUnification(): Boolean {
128-
var cached = enableSpannableBuildingUnificationCache
129-
if (cached == null) {
130-
cached = currentProvider.enableSpannableBuildingUnification()
131-
accessedFeatureFlags.add("enableSpannableBuildingUnification")
132-
enableSpannableBuildingUnificationCache = cached
133-
}
134-
return cached
135-
}
136-
137126
override fun enableSynchronousStateUpdates(): Boolean {
138127
var cached = enableSynchronousStateUpdatesCache
139128
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<<0aac08cb953e08d090fedebf12a9e99c>>
7+
* @generated SignedSource<<08acc01776848d8f2b55d68dcc71fdec>>
88
*/
99

1010
/**
@@ -39,8 +39,6 @@ public interface ReactNativeFeatureFlagsProvider {
3939

4040
@DoNotStrip public fun enableMicrotasks(): Boolean
4141

42-
@DoNotStrip public fun enableSpannableBuildingUnification(): Boolean
43-
4442
@DoNotStrip public fun enableSynchronousStateUpdates(): Boolean
4543

4644
@DoNotStrip public fun enableUIConsistency(): Boolean

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/BasicTextAttributeProvider.kt

Lines changed: 0 additions & 48 deletions
This file was deleted.

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/EffectiveTextAttributeProvider.kt

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/text/HierarchicTextAttributeProvider.kt

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)