Commit 07abbe7
Support textBreakStrategy and justificationMode for Selectable Facsimile TextView (#55660)
Summary:
`getReactTextUpdateFromPreparedLayout()` hardcoded `textBreakStrategy` to
`BREAK_STRATEGY_HIGH_QUALITY` and `justificationMode` to `0`, causing
user-specified values like `textBreakStrategy: "simple"` or
`textAlign: "justify"` to be ignored when the PreparedLayout code path
is used via `ReferenceStateWrapper`.
This change surfaces the `textBreakStrategy` and `justificationMode`
values already computed in `TextLayoutManager.createLayout()` by:
- Introducing a `CreateLayoutResult` wrapper to return them alongside the `Layout`
- Adding both fields to `PreparedLayout`
- Propagating them through `FabricUIManager.reusePreparedLayoutWithNewReactTags()`
- Using the real values in `ReactTextViewManager.getReactTextUpdateFromPreparedLayout()`
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D939333101 parent 2d7961e commit 07abbe7
File tree
4 files changed
+49
-27
lines changed- packages/react-native/ReactAndroid/src/main/java/com/facebook/react
- fabric
- views/text
4 files changed
+49
-27
lines changedLines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
690 | | - | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
691 | 693 | | |
692 | 694 | | |
693 | 695 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
214 | | - | |
| 213 | + | |
| 214 | + | |
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| |||
Lines changed: 42 additions & 24 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
830 | | - | |
831 | | - | |
832 | | - | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
833 | 834 | | |
834 | 835 | | |
835 | 836 | | |
| |||
841 | 842 | | |
842 | 843 | | |
843 | 844 | | |
844 | | - | |
| 845 | + | |
845 | 846 | | |
846 | 847 | | |
847 | 848 | | |
| |||
899 | 900 | | |
900 | 901 | | |
901 | 902 | | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
908 | 918 | | |
909 | | - | |
910 | | - | |
911 | 919 | | |
912 | | - | |
913 | | - | |
914 | | - | |
915 | 920 | | |
916 | 921 | | |
917 | 922 | | |
| |||
937 | 942 | | |
938 | 943 | | |
939 | 944 | | |
940 | | - | |
| 945 | + | |
941 | 946 | | |
942 | 947 | | |
943 | 948 | | |
| |||
956 | 961 | | |
957 | 962 | | |
958 | 963 | | |
959 | | - | |
| 964 | + | |
960 | 965 | | |
961 | 966 | | |
962 | 967 | | |
963 | 968 | | |
964 | 969 | | |
965 | 970 | | |
966 | | - | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
967 | 979 | | |
968 | 980 | | |
969 | 981 | | |
| |||
1373 | 1385 | | |
1374 | 1386 | | |
1375 | 1387 | | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
| 1393 | + | |
1376 | 1394 | | |
1377 | 1395 | | |
1378 | 1396 | | |
| |||
0 commit comments