diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp b/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp index cf0aa8dfde3..162ffac0bb1 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp +++ b/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.cpp @@ -1556,7 +1556,7 @@ static void calculateShadowViewMutationsV2( /** * Only used by unit tests currently. */ -static void sliceChildShadowNodeViewPairsRecursivelyLegacy( +static void sliceChildShadowNodeViewPairsRecursivelyForTesting( ShadowViewNodePair::OwningList& pairList, Point layoutOffset, const ShadowNode& shadowNode) { @@ -1587,7 +1587,7 @@ static void sliceChildShadowNodeViewPairsRecursivelyLegacy( pairList.push_back({shadowView, &childShadowNode}); } - sliceChildShadowNodeViewPairsRecursivelyLegacy( + sliceChildShadowNodeViewPairsRecursivelyForTesting( pairList, origin, childShadowNode); } } @@ -1596,7 +1596,7 @@ static void sliceChildShadowNodeViewPairsRecursivelyLegacy( /** * Only used by unit tests currently. */ -ShadowViewNodePair::OwningList sliceChildShadowNodeViewPairsLegacy( +ShadowViewNodePair::OwningList sliceChildShadowNodeViewPairsForTesting( const ShadowNode& shadowNode) { auto pairList = ShadowViewNodePair::OwningList{}; @@ -1606,7 +1606,8 @@ ShadowViewNodePair::OwningList sliceChildShadowNodeViewPairsLegacy( return pairList; } - sliceChildShadowNodeViewPairsRecursivelyLegacy(pairList, {0, 0}, shadowNode); + sliceChildShadowNodeViewPairsRecursivelyForTesting( + pairList, {0, 0}, shadowNode); return pairList; } diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.h b/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.h index 1aaa5760ca0..6215bad061c 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.h +++ b/packages/react-native/ReactCommon/react/renderer/mounting/Differentiator.h @@ -63,7 +63,7 @@ ShadowViewNodePair::NonOwningList sliceChildShadowNodeViewPairsV2( * Generates a list of `ShadowViewNodePair`s that represents a layer of a * flattened view hierarchy. This is *only* used by unit tests currently. */ -ShadowViewNodePair::OwningList sliceChildShadowNodeViewPairsLegacy( +ShadowViewNodePair::OwningList sliceChildShadowNodeViewPairsForTesting( const ShadowNode& shadowNode); } // namespace facebook::react diff --git a/packages/react-native/ReactCommon/react/renderer/mounting/stubs.cpp b/packages/react-native/ReactCommon/react/renderer/mounting/stubs.cpp index 59867f48c0e..fedd71c8d7d 100644 --- a/packages/react-native/ReactCommon/react/renderer/mounting/stubs.cpp +++ b/packages/react-native/ReactCommon/react/renderer/mounting/stubs.cpp @@ -55,7 +55,7 @@ static void calculateShadowViewMutationsForNewTree( parentShadowView, newChildPair.shadowView, static_cast(index))); auto newGrandChildPairs = - sliceChildShadowNodeViewPairsLegacy(*newChildPair.shadowNode); + sliceChildShadowNodeViewPairsForTesting(*newChildPair.shadowNode); calculateShadowViewMutationsForNewTree( mutations, newChildPair.shadowView, newGrandChildPairs); @@ -70,7 +70,7 @@ StubViewTree buildStubViewTreeWithoutUsingDifferentiator( calculateShadowViewMutationsForNewTree( mutations, ShadowView(rootShadowNode), - sliceChildShadowNodeViewPairsLegacy(rootShadowNode)); + sliceChildShadowNodeViewPairsForTesting(rootShadowNode)); auto emptyRootShadowNode = rootShadowNode.clone(ShadowNodeFragment{ ShadowNodeFragment::propsPlaceholder(),