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

Method isIncludedInViewParent

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

Source from the content-addressed store, hash-verified

2988 // newAbsoluteTop - screenPos rather than offset + delta, so a clamp or scroll between
2989 // record and now can't double-count.
2990 if (scrollState.hasPreserveAnchor() && stationary) {
2991 auto* anchorNode =
2992 preserveFindDescendantById(this, scrollState.getPreserveAnchorId(), kPreserveAnchorMaxDepth);
2993 // Only pin if the anchor is still laid out. A recycled/un-laid-out row keeps its rawId
2994 // but has no Yoga node, so preserveAnchorAbsoluteTop would read 0 and slam the viewport
2995 // to the content top. Skip and let step 2 re-pick a valid anchor.

Callers 1

TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64