Skip to content

Commit

Permalink
Remove "deduplicated" spannable path
Browse files Browse the repository at this point in the history
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
  • Loading branch information
NickGerleman authored and facebook-github-bot committed May 1, 2024
1 parent c96c893 commit 90d44d2
Show file tree
Hide file tree
Showing 34 changed files with 34 additions and 1,086 deletions.
20 changes: 2 additions & 18 deletions packages/react-native/ReactAndroid/api/ReactAndroid.api
Original file line number Diff line number Diff line change
Expand Up @@ -7088,7 +7088,7 @@ public class com/facebook/react/views/text/FontMetricsUtil {
public static fun getFontMetrics (Ljava/lang/CharSequence;Landroid/text/Layout;Landroid/text/TextPaint;Landroid/content/Context;)Lcom/facebook/react/bridge/WritableArray;
}

public abstract class com/facebook/react/views/text/ReactBaseTextShadowNode : com/facebook/react/uimanager/LayoutShadowNode, com/facebook/react/views/text/BasicTextAttributeProvider {
public abstract class com/facebook/react/views/text/ReactBaseTextShadowNode : com/facebook/react/uimanager/LayoutShadowNode {
public static final field DEFAULT_TEXT_SHADOW_COLOR I
public static final field PROP_SHADOW_COLOR Ljava/lang/String;
public static final field PROP_SHADOW_OFFSET Ljava/lang/String;
Expand Down Expand Up @@ -7126,22 +7126,6 @@ public abstract class com/facebook/react/views/text/ReactBaseTextShadowNode : co
protected field mTextShadowRadius F
public fun <init> ()V
public fun <init> (Lcom/facebook/react/views/text/ReactTextViewManagerCallback;)V
public fun getAccessibilityRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$AccessibilityRole;
public fun getBackgroundColor ()I
public fun getColor ()I
public fun getFontFamily ()Ljava/lang/String;
public fun getFontFeatureSettings ()Ljava/lang/String;
public fun getFontStyle ()I
public fun getFontWeight ()I
public fun getRole ()Lcom/facebook/react/uimanager/ReactAccessibilityDelegate$Role;
public fun getTextShadowColor ()I
public fun getTextShadowOffsetDx ()F
public fun getTextShadowOffsetDy ()F
public fun getTextShadowRadius ()F
public fun isBackgroundColorSet ()Z
public fun isColorSet ()Z
public fun isLineThroughTextDecorationSet ()Z
public fun isUnderlineTextDecorationSet ()Z
public fun setAccessibilityRole (Ljava/lang/String;)V
public fun setAdjustFontSizeToFit (Z)V
public fun setAllowFontScaling (Z)V
Expand Down Expand Up @@ -7382,7 +7366,7 @@ public class com/facebook/react/views/text/ReactVirtualTextViewManager$$PropsSet
public fun setProperty (Lcom/facebook/react/views/text/ReactVirtualTextViewManager;Landroid/view/View;Ljava/lang/String;Ljava/lang/Object;)V
}

public class com/facebook/react/views/text/TextAttributeProps : com/facebook/react/views/text/EffectiveTextAttributeProvider {
public class com/facebook/react/views/text/TextAttributeProps {
public static final field TA_KEY_ACCESSIBILITY_ROLE S
public static final field TA_KEY_ALIGNMENT S
public static final field TA_KEY_ALLOW_FONT_SCALING S
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<<71bd0e6d2f2bd2c768b86a073451430c>>
* @generated SignedSource<<ed2d49ccaaa01c0f34e37ff43b53d1d8>>
*/

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

/**
* Uses new, deduplicated logic for constructing Android Spannables from text fragments
*/
@JvmStatic
public fun enableSpannableBuildingUnification(): Boolean = accessor.enableSpannableBuildingUnification()

/**
* Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
*/
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<<d03e37b3d80929ca78d8a6eecd9852a9>>
* @generated SignedSource<<50c8aeff2f02f26b75bcf62f448ca60d>>
*/

/**
Expand All @@ -28,7 +28,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
private var enableBackgroundExecutorCache: Boolean? = null
private var enableCleanTextInputYogaNodeCache: Boolean? = null
private var enableMicrotasksCache: Boolean? = null
private var enableSpannableBuildingUnificationCache: Boolean? = null
private var enableSynchronousStateUpdatesCache: Boolean? = null
private var enableUIConsistencyCache: Boolean? = null
private var fixMountedFlagAndFixPreallocationCloneCache: Boolean? = null
Expand Down Expand Up @@ -112,15 +111,6 @@ public class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAccesso
return cached
}

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

override fun enableSynchronousStateUpdates(): Boolean {
var cached = enableSynchronousStateUpdatesCache
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<<5d418feb35bbe1bc78c9b2887acf0e3d>>
* @generated SignedSource<<dbc8923e390428cf599ca1bb38d3c7ed>>
*/

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

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

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

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

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

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

override fun enableMicrotasks(): Boolean = false

override fun enableSpannableBuildingUnification(): Boolean = false

override fun enableSynchronousStateUpdates(): Boolean = false

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

/**
Expand Down Expand Up @@ -32,7 +32,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
private var enableBackgroundExecutorCache: Boolean? = null
private var enableCleanTextInputYogaNodeCache: Boolean? = null
private var enableMicrotasksCache: Boolean? = null
private var enableSpannableBuildingUnificationCache: Boolean? = null
private var enableSynchronousStateUpdatesCache: Boolean? = null
private var enableUIConsistencyCache: Boolean? = null
private var fixMountedFlagAndFixPreallocationCloneCache: Boolean? = null
Expand Down Expand Up @@ -124,16 +123,6 @@ public class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcces
return cached
}

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

override fun enableSynchronousStateUpdates(): Boolean {
var cached = enableSynchronousStateUpdatesCache
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<<0aac08cb953e08d090fedebf12a9e99c>>
* @generated SignedSource<<08acc01776848d8f2b55d68dcc71fdec>>
*/

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

@DoNotStrip public fun enableMicrotasks(): Boolean

@DoNotStrip public fun enableSpannableBuildingUnification(): Boolean

@DoNotStrip public fun enableSynchronousStateUpdates(): Boolean

@DoNotStrip public fun enableUIConsistency(): Boolean
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 90d44d2

Please sign in to comment.