Change comment on Yoga measure modes in RN (#41732)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/41732

Was reading the code in this file and noticed that this comment is no longer true after D51068417 (https://github.com/facebook/yoga/pull/1460). Updated the comment to reflect the current state of things

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D51730986

fbshipit-source-id: beaa5de9576d86e56def35f6e970376c7be8f7ee
This commit is contained in:
Joe Vilches authored and Facebook GitHub Bot committed 2023-11-30 18:28:24 -08:00
1 parent 7e5f15b889
commit 89ec746b52
1 file changed
+5 -7
@@ -604,13 +604,11 @@ void YogaLayoutableShadowNode::layoutTree(
react_native_assert(!std::isinf(minimumSize.width));
react_native_assert(!std::isinf(minimumSize.height));
// Internally Yoga uses three different measurement modes controlling layout
// constraints: `Undefined`, `Exactly`, and `AtMost`. These modes are an
// implementation detail and are not defined in `CSS Flexible Box Layout
// Module`. Yoga C++ API (and `YGNodeCalculateLayout` function particularly)
// does not allow to specify the measure modes explicitly. Instead, it infers
// these from styles associated with the root node.
// To pass the actual layout constraints to Yoga we represent them as
// Yoga C++ API (and `YGNodeCalculateLayout` function particularly)
// does not allow to specify sizing modes (see
// https://www.w3.org/TR/css-sizing-3/#auto-box-sizes) explicitly. Instead, it
// infers these from styles associated with the root node. To pass the actual
// layout constraints to Yoga we represent them as
// `(min/max)(Height/Width)` style properties. Also, we pass `ownerWidth` &
// `ownerHeight` to allow proper calculation of relative (e.g. specified in
// percents) style values.