Skip to content

Fix font-scale invalidation for mounted text inputs (#59492) - #59492

Open
javache wants to merge 2 commits into
react:mainfrom
javache:export-D127571972
Open

javache wants to merge 2 commits into
react:mainfrom
javache:export-D127571972

Conversation

@javache

@javache javache commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

Invalidate font-sensitive measurements and cached flex bases locally, propagating through visible ancestors without crossing display:none boundaries. Preserve hidden-subtree layout caching and add regressions for simultaneous viewport/font-scale changes with percentage flex basis on a measurable node and its ancestor.

Changelog: [General][Fixed] - Update text layout after font-scale changes while preserving hidden-subtree caching.

Reviewed By: christophpurrer

Differential Revision: D127571972

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 26, 2026
@meta-codesync

meta-codesync Bot commented Oct 26, 2026

Copy link
Copy Markdown

@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D127571972.

@meta-codesync meta-codesync Bot changed the title Fix font-scale invalidation for mounted text inputs Fix font-scale invalidation for mounted text inputs (#59492) Oct 26, 2026
javache added a commit to javache/react-native that referenced this pull request Oct 26, 2026
Summary:
Pull Request resolved: react#59492

Restart ancestor invalidation when a measurable clone was already dirtied before it had an owner. Correct the default and capped TextInput expectations from stale cached bounds to the bounds of a fresh mount at the expected scale.

Changelog: [General][Fixed] - Remeasure text inputs after font scale changes when parent layout constraints are unchanged.

Reviewed By: christophpurrer

Differential Revision: D127571972
@javache
javache force-pushed the export-D127571972 branch 2 times, most recently from b2ab644 to b834e07 Compare October 26, 2026 17:20
javache added a commit to javache/react-native that referenced this pull request Oct 26, 2026
Summary:
Pull Request resolved: react#59492

Restart ancestor invalidation when a measurable clone was already dirtied before it had an owner. Correct the default and capped TextInput expectations from stale cached bounds to the bounds of a fresh mount at the expected scale.

Changelog: [General][Fixed] - Remeasure text inputs after font scale changes when parent layout constraints are unchanged.

Reviewed By: christophpurrer

Differential Revision: D127571972
javache added a commit to javache/react-native that referenced this pull request Oct 26, 2026
Summary:
Pull Request resolved: react#59492

Restart ancestor invalidation when a measurable clone was already dirtied before it had an owner. Correct the default and capped TextInput expectations from stale cached bounds to the bounds of a fresh mount at the expected scale.

Changelog: [General][Fixed] - Remeasure text inputs after font scale changes when parent layout constraints are unchanged.

Reviewed By: christophpurrer

Differential Revision: D127571972
javache added a commit to javache/react-native that referenced this pull request Nov 26, 2026
Summary:

Restart ancestor invalidation when a measurable clone was already dirtied before it had an owner. Correct the default and capped TextInput expectations from stale cached bounds to the bounds of a fresh mount at the expected scale.

Changelog: [General][Fixed] - Remeasure text inputs after font scale changes when parent layout constraints are unchanged.

Reviewed By: christophpurrer

Differential Revision: D127571972

@christophpurrer christophpurrer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review automatically exported from Phabricator review in Meta.

@github-actions github-actions Bot added the Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging. label Nov 26, 2026
javache added a commit to javache/react-native that referenced this pull request Nov 26, 2026
Summary:
Pull Request resolved: react#59492

Restart ancestor invalidation when a measurable clone was already dirtied before it had an owner. Correct the default and capped TextInput expectations from stale cached bounds to the bounds of a fresh mount at the expected scale.

Changelog: [General][Fixed] - Remeasure text inputs after font scale changes when parent layout constraints are unchanged.

Reviewed By: christophpurrer

Differential Revision: D127571972
javache added a commit to javache/react-native that referenced this pull request Nov 26, 2026
Summary:
Pull Request resolved: react#59492

Restart ancestor invalidation when a measurable clone was already dirtied before it had an owner. Correct the default and capped TextInput expectations from stale cached bounds to the bounds of a fresh mount at the expected scale.

Changelog: [General][Fixed] - Remeasure text inputs after font scale changes when parent layout constraints are unchanged.

Reviewed By: christophpurrer

Differential Revision: D127571972
javache added a commit to javache/react-native that referenced this pull request Nov 26, 2026
Summary:
Pull Request resolved: react#59492

Invalidate font-sensitive measurements and cached flex bases locally, propagating through visible ancestors without crossing display:none boundaries. Keep mounted text inputs responsive to font-scale changes while preserving hidden-subtree layout caching. Add regressions for simultaneous viewport/font-scale changes with percentage flex basis on a measurable node and its ancestor.

Changelog: [General][Fixed] - Update text layout after font-scale changes while preserving hidden-subtree caching.

Reviewed By: christophpurrer

Differential Revision: D127571972
javache added a commit to javache/react-native that referenced this pull request Nov 27, 2026
Summary:
Pull Request resolved: react#59492

Invalidate font-sensitive measurements and cached flex bases locally, propagating through visible ancestors without crossing display:none boundaries. Preserve hidden-subtree layout caching and add regressions for simultaneous viewport/font-scale changes with percentage flex basis on a measurable node and its ancestor.

Changelog: [General][Fixed] - Update text layout after font-scale changes while preserving hidden-subtree caching.

Reviewed By: christophpurrer

Differential Revision: D127571972
Summary:
Pull Request resolved: react#59491

Add runtime font-scale coverage for mounted Text and TextInput under unchanged parent constraints, plus native iOS Text Dynamic Type coverage. Provide general surface-constraint updates with separate queued UI-thread and convenience APIs. Reuse Fantom's text-input object library in the ReactCommon C++ tests so the same native sources are not compiled and linked twice.

Changelog: [Internal]

Differential Revision: D127578740
Summary:
Pull Request resolved: react#59492

Invalidate font-sensitive measurements and cached flex bases locally, propagating through visible ancestors without crossing display:none boundaries. Preserve hidden-subtree layout caching and add regressions for simultaneous viewport/font-scale changes with percentage flex basis on a measurable node and its ancestor.

Changelog: [General][Fixed] - Update text layout after font-scale changes while preserving hidden-subtree caching.

Reviewed By: christophpurrer

Differential Revision: D127571972
@github-actions github-actions Bot removed the Meta Review Required This PR is considered risky and requires Meta to import it to do more testing before merging. label Nov 30, 2026

This branch has not been deployed

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. meta-exported p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants