fix: some subview didn't enable yoga, and crash with NaN frame #933
Reference in New Issue
Block a user
No description provided.
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.
If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!
they haven't merge yet?
they haven't merge yet?
I don't think this fix is correct.
YGApplyLayoutToViewHierarchy
is not applied to the children of leaf Yoga nodes. Leafs specifically get a measure function which integrates with the backing component.A UIView backed by non-leaf Yoga Node having non-Yoga children (the way this issue would be encountered), would break other assumptions and not provide a correct layout, so we should not treat it gracefully.
We could replace this with an
NSCAssert
though for clarity.We are deprecating YogaKit as part of the Yoga 2.0 release. We are still going to release a new revision based on the current state of the repo, but won't be accepting new contributions, since we are going to be removing it from the repo after.
Pull request closed