mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 21:53:30 +00:00
Re-enable Yoga cloning in React Shadow Node
Reviewed By: achen1 Differential Revision: D7435365 fbshipit-source-id: 3e04b3252945112cf0c7206b0e6fb63535499eb9
This commit is contained in:
parent
5be4ff0261
commit
8a99241f81
@ -96,9 +96,6 @@ public class FabricReconciler {
|
||||
indicesToRemove.add(0, j);
|
||||
if (!addedTags.contains(nodeToRemove.getReactTag())) {
|
||||
tagsToDelete.add(nodeToRemove.getReactTag());
|
||||
// TODO: T26729293 since we are not cloning ReactShadowNode's we need to "manually" remove
|
||||
// from the ReactShadowTree when one of the nodes is deleted in JS.
|
||||
nodeToRemove.getParent().removeChildAt(j);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -150,9 +150,7 @@ public class ReactShadowNodeImpl implements ReactShadowNode<ReactShadowNodeImpl>
|
||||
@Override
|
||||
public ReactShadowNodeImpl mutableCopy() {
|
||||
ReactShadowNodeImpl copy = copy();
|
||||
copy.mYogaNode = mYogaNode;
|
||||
// TODO: T26729293 clone YogaNode instead of reusing the same instance
|
||||
//copy.mYogaNode = mYogaNode.clone();
|
||||
copy.mYogaNode = mYogaNode.clone();
|
||||
copy.mNativeChildren = mNativeChildren == null ? null : new ArrayList<>(mNativeChildren);
|
||||
copy.mTotalNativeChildren = mTotalNativeChildren;
|
||||
copy.mChildren = mChildren == null ? null : new ArrayList<>(mChildren);
|
||||
@ -170,9 +168,7 @@ public class ReactShadowNodeImpl implements ReactShadowNode<ReactShadowNodeImpl>
|
||||
@Override
|
||||
public ReactShadowNodeImpl mutableCopyWithNewChildren() {
|
||||
ReactShadowNodeImpl copy = copy();
|
||||
copy.mYogaNode = mYogaNode;
|
||||
// TODO: T26729293 clone YogaNode instead of reusing the same instance
|
||||
//copy.mYogaNode = mYogaNode.clone();
|
||||
copy.mYogaNode = mYogaNode.cloneWithNewChildren();
|
||||
copy.mNativeChildren = null;
|
||||
copy.mChildren = null;
|
||||
copy.mTotalNativeChildren = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user