mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
explicitly dirty yoga node when cloned in case parent is dirty (#42711)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/42711 changelog: [internal] Reviewed By: NickGerleman Differential Revision: D53130776 fbshipit-source-id: b85a90835698ef5199622edcb64f64273d32724a
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5bf5f4b150
commit
39cb02f6f1
+4
-1
@@ -30,7 +30,10 @@ ParagraphShadowNode::ParagraphShadowNode(
|
||||
const ShadowNode& sourceShadowNode,
|
||||
const ShadowNodeFragment& fragment)
|
||||
: ConcreteViewShadowNode(sourceShadowNode, fragment) {
|
||||
if (!fragment.children && !fragment.props) {
|
||||
auto& sourceParagraphShadowNode =
|
||||
traitCast<ParagraphShadowNode const&>(sourceShadowNode);
|
||||
if (!fragment.children && !fragment.props &&
|
||||
sourceParagraphShadowNode.getIsLayoutClean()) {
|
||||
// This ParagraphShadowNode was cloned but did not change
|
||||
// in a way that affects its layout. Let's mark it clean
|
||||
// to stop Yoga from traversing it.
|
||||
|
||||
Reference in New Issue
Block a user