Commit 34f3f17
committed
Add compareDocumentPosition to Fabric FragmentInstance (#34103)
Stacked on #34069
Same basic semantics as the react-dom for determining document position
of a Fragment compared to a given node. It's simpler here because we
don't have to deal with inserted nodes or portals. So we can skip a
bunch of the validation logic.
The logic for handling empty fragments is the same so I've split out
`compareDocumentPositionForEmptyFragment` into a shared module. There
doesn't seem to be a great place to put shared DOM logic between Fabric
and DOM configs at the moment. There may be more of this coming as we
add more and more DOM APIs to RN.
For testing I've written Fantom tests internally which pass the basic
cases on this build. The renderer we have configured for Fabric tests in
the repo doesn't support the Element APIs we need like
`compareDocumentPosition`.
DiffTrain build for [45a6532](45a6532)1 parent 293f813 commit 34f3f17
File tree
34 files changed
+1012
-1042
lines changed- compiled/facebook-www
34 files changed
+1012
-1042
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1409 | 1409 | | |
1410 | 1410 | | |
1411 | 1411 | | |
1412 | | - | |
| 1412 | + | |
1413 | 1413 | | |
1414 | 1414 | | |
1415 | 1415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1409 | 1409 | | |
1410 | 1410 | | |
1411 | 1411 | | |
1412 | | - | |
| 1412 | + | |
1413 | 1413 | | |
1414 | 1414 | | |
1415 | 1415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
| 603 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
603 | | - | |
| 603 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
| 607 | + | |
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
604 | 604 | | |
605 | 605 | | |
606 | 606 | | |
607 | | - | |
| 607 | + | |
608 | 608 | | |
609 | 609 | | |
610 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19588 | 19588 | | |
19589 | 19589 | | |
19590 | 19590 | | |
19591 | | - | |
| 19591 | + | |
19592 | 19592 | | |
19593 | 19593 | | |
19594 | | - | |
| 19594 | + | |
19595 | 19595 | | |
19596 | 19596 | | |
19597 | 19597 | | |
| |||
19625 | 19625 | | |
19626 | 19626 | | |
19627 | 19627 | | |
19628 | | - | |
| 19628 | + | |
19629 | 19629 | | |
19630 | 19630 | | |
19631 | 19631 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19359 | 19359 | | |
19360 | 19360 | | |
19361 | 19361 | | |
19362 | | - | |
| 19362 | + | |
19363 | 19363 | | |
19364 | 19364 | | |
19365 | | - | |
| 19365 | + | |
19366 | 19366 | | |
19367 | 19367 | | |
19368 | 19368 | | |
| |||
19396 | 19396 | | |
19397 | 19397 | | |
19398 | 19398 | | |
19399 | | - | |
| 19399 | + | |
19400 | 19400 | | |
19401 | 19401 | | |
19402 | 19402 | | |
| |||
0 commit comments