Skip to content

Minimize EditText Spans 1/N: Fix precedence - #36543

Closed
NickGerleman wants to merge 1 commit into
react:mainfrom
NickGerleman:export-D44240779
Closed

Minimize EditText Spans 1/N: Fix precedence#36543
NickGerleman wants to merge 1 commit into
react:mainfrom
NickGerleman:export-D44240779

Conversation

@NickGerleman

Copy link
Copy Markdown
Contributor

Summary:
This is part of a series of changes to minimize the number of spans committed to EditText, as a mitigation for platform issues on Samsung devices. See this GitHub thread for greater context on the platform behavior.

We cache the backing EditText span on text change to later measure. To measure outside of a TextInput we need to restore any spans we removed. Spans may overlap, so base attributes should be behind everything else.

The logic here for dealing with precedence is incorrect, and we should instead accomplish this by twiddling with the SPAN_PRIORITY bits.

Changelog:
[Android][Fixed] - Minimize Spans 1/N: Fix precedence

Differential Revision: D44240779

@facebook-github-botfacebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Mar 21, 2023
@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44240779

@analysis-bot

analysis-bot commented Mar 21, 2023

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a8,518,684-126
androidhermesarmeabi-v7a7,834,959-141
androidhermesx868,997,816-138
androidhermesx86_648,853,974-139
androidjscarm64-v8a9,139,873-121
androidjscarmeabi-v7a8,332,091-110
androidjscx869,193,541-111
androidjscx86_649,452,620-124

Base commit: 776fe7a
Branch: main

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44240779

@facebook-github-bot

Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44240779

@github-actions

Copy link
Copy Markdown

This pull request was successfully merged by @NickGerleman in 1743dd7.

When will my fix make it into a release? | Upcoming Releases

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BugCLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.fb-exportedMergedThis PR has been merged.p: FacebookPartner: FacebookPartnerPlatform: AndroidAndroid applications.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@NickGerleman@facebook-github-bot@analysis-bot@react-native-bot