@@ -35,8 +35,10 @@ static void testShadowNodeTreeLifeCycle(
3535
3636 auto eventDispatcher = EventDispatcher::Shared{};
3737 auto contextContainer = std::make_shared<ContextContainer>();
38- auto componentDescriptorParameters =
39- ComponentDescriptorParameters{eventDispatcher, contextContainer, nullptr };
38+ auto componentDescriptorParameters = ComponentDescriptorParameters{
39+ .eventDispatcher = eventDispatcher,
40+ .contextContainer = contextContainer,
41+ .flavor = nullptr };
4042 auto viewComponentDescriptor =
4143 ViewComponentDescriptor (componentDescriptorParameters);
4244 auto rootComponentDescriptor =
@@ -49,21 +51,26 @@ static void testShadowNodeTreeLifeCycle(
4951 for (int i = 0 ; i < repeats; i++) {
5052 allNodes.clear ();
5153
52- auto family =
53- rootComponentDescriptor. createFamily ({ Tag (1 ), SurfaceId (1 ), nullptr });
54+ auto family = rootComponentDescriptor. createFamily (
55+ {. tag = Tag (1 ), . surfaceId = SurfaceId (1 ), . instanceHandle = nullptr });
5456
5557 // Creating an initial root shadow node.
5658 auto emptyRootNode = std::const_pointer_cast<RootShadowNode>(
5759 std::static_pointer_cast<const RootShadowNode>(
5860 rootComponentDescriptor.createShadowNode (
59- ShadowNodeFragment{RootShadowNode::defaultSharedProps ()},
61+ ShadowNodeFragment{
62+ .props = RootShadowNode::defaultSharedProps ()},
6063 family)));
6164
6265 // Applying size constraints.
6366 emptyRootNode = emptyRootNode->clone (
6467 parserContext,
6568 LayoutConstraints{
66- Size{512 , 0 }, Size{512 , std::numeric_limits<Float>::infinity ()}},
69+ .minimumSize = Size{.width = 512 , .height = 0 },
70+ .maximumSize =
71+ Size{
72+ .width = 512 ,
73+ .height = std::numeric_limits<Float>::infinity ()}},
6774 LayoutContext{});
6875
6976 // Generation of a random tree.
@@ -73,8 +80,9 @@ static void testShadowNodeTreeLifeCycle(
7380 // Injecting a tree into the root node.
7481 auto currentRootNode = std::static_pointer_cast<const RootShadowNode>(
7582 emptyRootNode->ShadowNode ::clone (ShadowNodeFragment{
76- ShadowNodeFragment::propsPlaceholder (),
77- std::make_shared<std::vector<std::shared_ptr<const ShadowNode>>>(
83+ .props = ShadowNodeFragment::propsPlaceholder (),
84+ .children = std::make_shared<
85+ std::vector<std::shared_ptr<const ShadowNode>>>(
7886 std::vector<std::shared_ptr<const ShadowNode>>{
7987 singleRootChildNode})}));
8088
@@ -184,8 +192,10 @@ static void testShadowNodeTreeLifeCycleExtensiveFlatteningUnflattening(
184192 auto eventDispatcher = EventDispatcher::Shared{};
185193 auto contextContainer = std::make_shared<ContextContainer>();
186194
187- auto componentDescriptorParameters =
188- ComponentDescriptorParameters{eventDispatcher, contextContainer, nullptr };
195+ auto componentDescriptorParameters = ComponentDescriptorParameters{
196+ .eventDispatcher = eventDispatcher,
197+ .contextContainer = contextContainer,
198+ .flavor = nullptr };
189199 auto viewComponentDescriptor =
190200 ViewComponentDescriptor (componentDescriptorParameters);
191201 auto rootComponentDescriptor =
@@ -198,21 +208,26 @@ static void testShadowNodeTreeLifeCycleExtensiveFlatteningUnflattening(
198208 for (int i = 0 ; i < repeats; i++) {
199209 allNodes.clear ();
200210
201- auto family =
202- rootComponentDescriptor. createFamily ({ Tag (1 ), SurfaceId (1 ), nullptr });
211+ auto family = rootComponentDescriptor. createFamily (
212+ {. tag = Tag (1 ), . surfaceId = SurfaceId (1 ), . instanceHandle = nullptr });
203213
204214 // Creating an initial root shadow node.
205215 auto emptyRootNode = std::const_pointer_cast<RootShadowNode>(
206216 std::static_pointer_cast<const RootShadowNode>(
207217 rootComponentDescriptor.createShadowNode (
208- ShadowNodeFragment{RootShadowNode::defaultSharedProps ()},
218+ ShadowNodeFragment{
219+ .props = RootShadowNode::defaultSharedProps ()},
209220 family)));
210221
211222 // Applying size constraints.
212223 emptyRootNode = emptyRootNode->clone (
213224 parserContext,
214225 LayoutConstraints{
215- Size{512 , 0 }, Size{512 , std::numeric_limits<Float>::infinity ()}},
226+ .minimumSize = Size{.width = 512 , .height = 0 },
227+ .maximumSize =
228+ Size{
229+ .width = 512 ,
230+ .height = std::numeric_limits<Float>::infinity ()}},
216231 LayoutContext{});
217232
218233 // Generation of a random tree.
@@ -222,8 +237,9 @@ static void testShadowNodeTreeLifeCycleExtensiveFlatteningUnflattening(
222237 // Injecting a tree into the root node.
223238 auto currentRootNode = std::static_pointer_cast<const RootShadowNode>(
224239 emptyRootNode->ShadowNode ::clone (ShadowNodeFragment{
225- ShadowNodeFragment::propsPlaceholder (),
226- std::make_shared<std::vector<std::shared_ptr<const ShadowNode>>>(
240+ .props = ShadowNodeFragment::propsPlaceholder (),
241+ .children = std::make_shared<
242+ std::vector<std::shared_ptr<const ShadowNode>>>(
227243 std::vector<std::shared_ptr<const ShadowNode>>{
228244 singleRootChildNode})}));
229245
0 commit comments