Repository navigation
Preserve selective cloning of hidden Yoga children - #60185
Merged
cipolleschi merged 3 commits intoNov 20, 2026
Merged
Conversation
cipolleschi
marked this pull request as ready for review
November 20, 2026 17:19
cipolleschi
enabled auto-merge (squash)
November 20, 2026 17:34
javache
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Restore the selective
display: nonechild-cloning behaviour from react/yoga#2058 in React Native's bundled Yoga. When a shared subtree contains both an already-zeroed child and a child that needs zeroing, clone only the latter. The existing implementation clones every unowned sibling as soon as one child needs changing.Use
cloneChildIfNeeded(i)before recursing into each child that needs zeroing. This preserves RN #59688's inlinedcloneChildrenIfNeeded()loop and min-content fix.Changelog:
[GENERAL] [FIXED] - Avoid unnecessary cloning of unchanged children in hidden layouts
Test Plan:
test/BaselineTest.cppusing the standalone CMake harness on macOS arm64 with Apple Clang 21.0.0 and GoogleTest 1.12.1.git diff --checkpassed.Commands run:
Full Fantom Text/View strict-layout regressions, Android/iOS builds, sanitizer checks, and pre-merge internal CI were not run in this validation.