Commit be59611
Top-down onLayout events
Summary:
This makes Android Paper/Classic renderer fire `onLayout` events top down, like in Fabric/new Architecture, and like iOS on Paper/classic architecture. This makes it much more sane under its model to calculate insets using parent dimensions.
I thought iOS Paper also was bottom-up, but it turns out that is only Android and Windows.
This is marginally breaky since event ordering can be relied on, but to my knowledge was never hit during the Fabric migration, and any JS code written for both Android and iOS will need to support this model already.
Changelog:
[General][Changed] - Make layout events top-down on Android classic renderer
Differential Revision: D49627996
fbshipit-source-id: 18641174cc97ec98b6c26542c86de1f2aa6e8b371 parent babbc3e commit be59611
File tree
3 files changed
+60
-31
lines changed- packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager
3 files changed
+60
-31
lines changedpackages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
Lines changed: 25 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
340 | | - | |
341 | 340 | | |
342 | | - | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
343 | 366 | | |
344 | 367 | | |
345 | 368 | | |
| |||
386 | 409 | | |
387 | 410 | | |
388 | 411 | | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | 412 | | |
394 | 413 | | |
395 | 414 | | |
| |||
Lines changed: 33 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
| 34 | + | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| |||
665 | 667 | | |
666 | 668 | | |
667 | 669 | | |
668 | | - | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
669 | 684 | | |
670 | 685 | | |
671 | 686 | | |
| |||
951 | 966 | | |
952 | 967 | | |
953 | 968 | | |
954 | | - | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
955 | 974 | | |
956 | 975 | | |
957 | 976 | | |
958 | 977 | | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
959 | 984 | | |
960 | 985 | | |
961 | 986 | | |
962 | 987 | | |
963 | | - | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
964 | 992 | | |
965 | 993 | | |
966 | 994 | | |
967 | | - | |
968 | | - | |
969 | | - | |
970 | | - | |
971 | | - | |
972 | | - | |
973 | | - | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
981 | | - | |
982 | | - | |
983 | | - | |
984 | | - | |
985 | | - | |
986 | | - | |
| 995 | + | |
| 996 | + | |
987 | 997 | | |
988 | 998 | | |
989 | 999 | | |
| |||
0 commit comments