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

Method measureExternal

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

Source from the content-addressed store, hash-verified

1616 // values, so it would not notice the style no longer matches and would never re-apply.
1617 //
1618 // reapplyAttribute markDirty()s first, so it re-applies even though the cached value is
1619 // unchanged, and it no-ops when `position` was never set — leaving the Relative default in
1620 // place for the common case.
1621 _attributesApplier.reapplyAttribute(viewTransactionScope, getAttributeIds().getIdForName("position"));
1622 }
1623}
1624
1625void ViewNode::appendChild(ViewTransactionScope& viewTransactionScope, const Ref<ViewNode>& child) {
1626 insertChildAt(viewTransactionScope, child, getLiveChildCount());
1627}
1628
1629void ViewNode::insertChildAt(ViewTransactionScope& viewTransactionScope, const Ref<ViewNode>& child, size_t index) {
1630 SC_ASSERT(child.get() != this);
1631
1632 [[maybe_unused]] auto childHadParent = child->hasParent();
1633 child->removeFromParent(viewTransactionScope);
1634 child->_parent = weakRef(this);
1635 child->setHasParent(true);
1636 child->_flags[kParentManagesChildFrames] = managesChildFrames();
1637
1638 auto* yogaContainer = getYogaNodeForInsertingChildren();
1639 if (static_cast<size_t>(YGNodeGetChildCount(yogaContainer)) < index) {
1640 VALDI_ERROR(getLogger(),
1641 "Cannot insert child at index {} into container with size {} (child had parent: {})",
1642 index,

Callers

nothing calls this directly

Calls 9

toFloatMethod · 0.80
callMethod · 0.65
errorMethod · 0.65
valueMethod · 0.65
toStringMethod · 0.65
ValueClass · 0.50
SizeClass · 0.50
getArrayMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected