Don't collect state for virtual nodes
Summary: Virtual nodes (such as RCTRawText and RCTVirtualText) have no state or node regions, don't need to be laid out, and thus should not be checked for state. Reviewed By: ahmedre Differential Revision: D2757089
This commit is contained in:
parent
312f04d2b7
commit
e9753a11ae
|
@ -270,10 +270,25 @@ import com.facebook.react.uimanager.CatalystStylesDiffMap;
|
||||||
|
|
||||||
for (int i = 0, childCount = node.getChildCount(); i != childCount; ++i) {
|
for (int i = 0, childCount = node.getChildCount(); i != childCount; ++i) {
|
||||||
FlatShadowNode child = (FlatShadowNode) node.getChildAt(i);
|
FlatShadowNode child = (FlatShadowNode) node.getChildAt(i);
|
||||||
|
if (child.isVirtual()) {
|
||||||
|
markLayoutSeenRecursively(child);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
processNodeAndCollectState(child, left, top, isAndroidView, needsCustomLayoutForChildren);
|
processNodeAndCollectState(child, left, top, isAndroidView, needsCustomLayoutForChildren);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void markLayoutSeenRecursively(FlatShadowNode node) {
|
||||||
|
if (node.hasNewLayout()) {
|
||||||
|
node.markLayoutSeen();
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0, childCount = node.getChildCount(); i != childCount; ++i) {
|
||||||
|
markLayoutSeenRecursively((FlatShadowNode) node.getChildAt(i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Collects state and updates View boundaries for a given node tree.
|
* Collects state and updates View boundaries for a given node tree.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue