Reland Fix possible invalid measurements when width or height is zero pixels #1823
Reference in New Issue
Block a user
No description provided.
Delete Branch "export-D76851589"
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?
Summary:
Fixes https://github.com/facebook/yoga/issues/1819
Yoga has a fast path when measuring a node, if it thinks it knows its dimensions ahead of time.
This path has some eroneous logic, to set both axis to owner size, if either will evaluate to zero, while having an
YGMeasureModeAtMost
/FitContent
constraint. This means that if a node is given a zero width, and Yoga later measures with withFitContent
, its height will become the maximum allowable height, even if it shouldn't be that large.We can fix this, by only allowing if both axis are this fixed case, instead of just one.
This bug has existed for about a decade (going back to at least D3312496).
Changelog:
[General][Fixed] - Fix possible invalid measurements with width or height is zero pixels
Reviewed By: yungsters
Differential Revision: D76851589
The latest updates on your projects. Learn more about Vercel for Git ↗︎
This pull request was exported from Phabricator. Differential Revision: D76851589
This pull request has been merged in facebook/yoga@4b5ca50117.
Pull request closed