Files
react-native/ReactCommon/react/renderer/components
Valentin Shergin 099e7aa94d Fabric: New way (third attempt) to specify layout constraints for YGNodeCalculateLayout
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
2021-02-22 14:47:40 -08:00
..