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

Method removeFromParent

valdi/src/valdi/runtime/Context/ViewNode.cpp:1466–1483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1464 if (_flags[kScrollAttributesBound]) {
1465 getYogaStyle(getYogaNodeForInsertingChildren()).setOverflow(facebook::yoga::Overflow::Scroll);
1466 }
1467 updateYogaMeasureFunc();
1468 } else {
1469 setIsLayout(true);
1470 _attributesApplier.setBoundAttributes(nullptr);
1471 }
1472 }
1473}
1474
1475void ViewNode::setViewClassNameForPlatform(ViewTransactionScope& viewTransactionScope,
1476 const StringBox& viewClassName,
1477 PlatformType platformType) {
1478 auto currentPlatformType = _viewNodeTree->getViewManagerContext()->getViewManager().getPlatformType();
1479 if (currentPlatformType != platformType) {
1480 // macOS and Linux fall through to iOS class names as the base fallback.
1481 // macosClass / linuxClass overwrite iosClass when explicitly set (bound later).
1482 bool isFallthrough = ((currentPlatformType == PlatformTypeMacOS || currentPlatformType == PlatformTypeLinux) &&
1483 platformType == PlatformTypeIOS) ||
1484 // Linux also accepts macosClass as a shared-desktop override.
1485 (currentPlatformType == PlatformTypeLinux && platformType == PlatformTypeMacOS);
1486 if (!isFallthrough) {

Callers 5

TESTFunction · 0.45
removeViewNodeMethod · 0.45
setRootViewNodeMethod · 0.45
insertChildAtMethod · 0.45
setIsLazyLayoutMethod · 0.45

Calls 6

resolveYogaNodeFunction · 0.85
YGNodeRemoveChildFunction · 0.85
getOwnerMethod · 0.80
onChildrenChangedMethod · 0.80
resetMethod · 0.65
setParentMethod · 0.45

Tested by 1

TESTFunction · 0.36