mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
099e7aa94d
Summary: Surprisingly, it's not that trivial to pass `LayoutContrants` to `YGNodeCalculateLayout` in a way that always works. The problem is that `YGNodeCalculateLayout` does not allow expressing the constraints explicitly, so we need to pass them as `YGStyle` properties of a root node. With this approach, we unconditionally apply them as `YGStyle`s as actual values or `Undefined` value (which overrides some other values that can be previously set by calling this function or other code). We also intentionally preserve `height` and `width` values because it's a common use-case when a component explicitly specifies its size. Changelog: [Internal] Fabric-specific internal change. Reviewed By: mdvacca Differential Revision: D26583550 fbshipit-source-id: 2cd506fbdc9e6a1a8f119d09ccfd34f876a13625