Fabric: Fixed lost YogaNode's context in YogaLayoutableShadowNode
Summary: We replace yogaNode with newly creaded (by Yoga) one. So, we have to set up context. Reviewed By: mdvacca Differential Revision: D7376345 fbshipit-source-id: 7926a10e3f057fc385e7731c354827aeb8245760
This commit is contained in:
parent
1bb6db36be
commit
8f9212b839
|
@ -31,7 +31,6 @@ SharedYogaConfig YogaLayoutableShadowNode::suitableYogaConfig() {
|
||||||
return sharedYogaConfig;
|
return sharedYogaConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
YogaLayoutableShadowNode::YogaLayoutableShadowNode(
|
YogaLayoutableShadowNode::YogaLayoutableShadowNode(
|
||||||
const SharedYogaStylableProps &props,
|
const SharedYogaStylableProps &props,
|
||||||
const SharedShadowNodeSharedList &children
|
const SharedShadowNodeSharedList &children
|
||||||
|
@ -198,6 +197,7 @@ void YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector(YGNode *oldYogaNod
|
||||||
assert(newShadowNode);
|
assert(newShadowNode);
|
||||||
|
|
||||||
// And finally, we have to replace underline yoga node with the new one provided by Yoga.
|
// And finally, we have to replace underline yoga node with the new one provided by Yoga.
|
||||||
|
newYogaNode->setContext((void *)newShadowNode.get());
|
||||||
newShadowNode->yogaNode_ = std::shared_ptr<YGNode>(newYogaNode);
|
newShadowNode->yogaNode_ = std::shared_ptr<YGNode>(newYogaNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue