MCPcopy Create free account
hub / github.com/Snapchat/Valdi / findViewNodesWithId

Function findViewNodesWithId

valdi/test/utils/valdi_test_utils.cpp:264–274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

262
263void RuntimeListener::setLayoutSpecsToContextIfNeeded(Valdi::Runtime& runtime, const Valdi::SharedContext& context) {
264 if (!layoutTreeAutomatically) {
265 return;
266 }
267
268 auto tree = runtime.getViewNodeTreeManager().getViewNodeTreeForContextId(context->getContextId());
269 if (tree != nullptr && tree->getRootView() != nullptr) {
270 auto& rootView = getDummyView(tree->getRootView()).getImpl();
271
272 if (rootView.isLayoutInvalidated()) {
273 rootView.setLayoutInvalidated(false);
274 tree->setLayoutSpecs(rootView.getFrame().size(), Valdi::LayoutDirectionLTR);
275 }
276 }
277}

Callers 1

TEST_PFunction · 0.85

Calls 2

forEachViewNodeFunction · 0.85
getDebugIdMethod · 0.45

Tested by

no test coverage detected