Skip to content

Commit

Permalink
explicitly dirty yoga node when cloned in case parent is dirty (#42711)
Browse files Browse the repository at this point in the history
Summary:

changelog: [internal]

Reviewed By: NickGerleman

Differential Revision: D53130776
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Jan 29, 2024
1 parent 6f7e8e1 commit bcfc3a5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit bcfc3a5

Please sign in to comment.