Skip to content

Commit 34f3f17

Browse files
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

34 files changed

+1012
-1042
lines changed

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a96a0f3903ea0a9d45ff7c30a3fd9efe830c4628
1+
45a6532a088432010c40cbcac1fb6b6f8d56dd69
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a96a0f3903ea0a9d45ff7c30a3fd9efe830c4628
1+
45a6532a088432010c40cbcac1fb6b6f8d56dd69

compiled/facebook-www/React-dev.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ __DEV__ &&
14091409
exports.useTransition = function () {
14101410
return resolveDispatcher().useTransition();
14111411
};
1412-
exports.version = "19.2.0-www-classic-a96a0f39-20250815";
1412+
exports.version = "19.2.0-www-classic-45a6532a-20250815";
14131413
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14141414
"function" ===
14151415
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-dev.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ __DEV__ &&
14091409
exports.useTransition = function () {
14101410
return resolveDispatcher().useTransition();
14111411
};
1412-
exports.version = "19.2.0-www-modern-a96a0f39-20250815";
1412+
exports.version = "19.2.0-www-modern-45a6532a-20250815";
14131413
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14141414
"function" ===
14151415
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-prod.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,4 +600,4 @@ exports.useSyncExternalStore = function (
600600
exports.useTransition = function () {
601601
return ReactSharedInternals.H.useTransition();
602602
};
603-
exports.version = "19.2.0-www-classic-a96a0f39-20250815";
603+
exports.version = "19.2.0-www-classic-45a6532a-20250815";

compiled/facebook-www/React-prod.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,4 +600,4 @@ exports.useSyncExternalStore = function (
600600
exports.useTransition = function () {
601601
return ReactSharedInternals.H.useTransition();
602602
};
603-
exports.version = "19.2.0-www-modern-a96a0f39-20250815";
603+
exports.version = "19.2.0-www-modern-45a6532a-20250815";

compiled/facebook-www/React-profiling.classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ exports.useSyncExternalStore = function (
604604
exports.useTransition = function () {
605605
return ReactSharedInternals.H.useTransition();
606606
};
607-
exports.version = "19.2.0-www-classic-a96a0f39-20250815";
607+
exports.version = "19.2.0-www-classic-45a6532a-20250815";
608608
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
609609
"function" ===
610610
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/React-profiling.modern.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ exports.useSyncExternalStore = function (
604604
exports.useTransition = function () {
605605
return ReactSharedInternals.H.useTransition();
606606
};
607-
exports.version = "19.2.0-www-modern-a96a0f39-20250815";
607+
exports.version = "19.2.0-www-modern-45a6532a-20250815";
608608
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
609609
"function" ===
610610
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.classic.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19588,10 +19588,10 @@ __DEV__ &&
1958819588
(function () {
1958919589
var internals = {
1959019590
bundleType: 1,
19591-
version: "19.2.0-www-classic-a96a0f39-20250815",
19591+
version: "19.2.0-www-classic-45a6532a-20250815",
1959219592
rendererPackageName: "react-art",
1959319593
currentDispatcherRef: ReactSharedInternals,
19594-
reconcilerVersion: "19.2.0-www-classic-a96a0f39-20250815"
19594+
reconcilerVersion: "19.2.0-www-classic-45a6532a-20250815"
1959519595
};
1959619596
internals.overrideHookState = overrideHookState;
1959719597
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -19625,7 +19625,7 @@ __DEV__ &&
1962519625
exports.Shape = Shape;
1962619626
exports.Surface = Surface;
1962719627
exports.Text = Text;
19628-
exports.version = "19.2.0-www-classic-a96a0f39-20250815";
19628+
exports.version = "19.2.0-www-classic-45a6532a-20250815";
1962919629
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1963019630
"function" ===
1963119631
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

compiled/facebook-www/ReactART-dev.modern.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19359,10 +19359,10 @@ __DEV__ &&
1935919359
(function () {
1936019360
var internals = {
1936119361
bundleType: 1,
19362-
version: "19.2.0-www-modern-a96a0f39-20250815",
19362+
version: "19.2.0-www-modern-45a6532a-20250815",
1936319363
rendererPackageName: "react-art",
1936419364
currentDispatcherRef: ReactSharedInternals,
19365-
reconcilerVersion: "19.2.0-www-modern-a96a0f39-20250815"
19365+
reconcilerVersion: "19.2.0-www-modern-45a6532a-20250815"
1936619366
};
1936719367
internals.overrideHookState = overrideHookState;
1936819368
internals.overrideHookStateDeletePath = overrideHookStateDeletePath;
@@ -19396,7 +19396,7 @@ __DEV__ &&
1939619396
exports.Shape = Shape;
1939719397
exports.Surface = Surface;
1939819398
exports.Text = Text;
19399-
exports.version = "19.2.0-www-modern-a96a0f39-20250815";
19399+
exports.version = "19.2.0-www-modern-45a6532a-20250815";
1940019400
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
1940119401
"function" ===
1940219402
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)