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

Method invalidateMeasuredSize

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

Source from the content-addressed store, hash-verified

1542 _flags[kParentManagesChildFrames] = false;
1543 if (previousParentManagedChildFrames) {
1544 getYogaStyle(_yogaNode).setPositionType(facebook::yoga::PositionType::Relative);
1545 // Relative is the default, not necessarily what this node declared. insertChildAt forces
1546 // Absolute for a managed-child-frames parent but only restores position in that same branch,
1547 // so a node declaring `position: "absolute"` that moves from a managed parent to a standard
1548 // one would keep the Relative set above — and the attributes applier caches last-applied
1549 // values, so it would not notice the style no longer matches and would never re-apply.
1550 //
1551 // reapplyAttribute markDirty()s first, so it re-applies even though the cached value is
1552 // unchanged, and it no-ops when `position` was never set — leaving the Relative default in
1553 // place for the common case.
1554 _attributesApplier.reapplyAttribute(viewTransactionScope, getAttributeIds().getIdForName("position"));
1555 }
1556}
1557
1558void ViewNode::appendChild(ViewTransactionScope& viewTransactionScope, const Ref<ViewNode>& child) {
1559 insertChildAt(viewTransactionScope, child, getLiveChildCount());
1560}
1561

Callers 2

invalidateLayoutMethod · 0.80

Calls 1

resolveRefFunction · 0.50

Tested by

no test coverage detected