diff --git a/packages/react-native/ReactCommon/yoga/yoga/node/Node.cpp b/packages/react-native/ReactCommon/yoga/yoga/node/Node.cpp index d0a5567a6b432a..adb63663bed9b5 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/node/Node.cpp +++ b/packages/react-native/ReactCommon/yoga/yoga/node/Node.cpp @@ -10,7 +10,6 @@ #include #include -#include #include #include @@ -50,29 +49,12 @@ Node::Node(Node&& node) noexcept } YGSize Node::measure( - float availableWidth, + float width, MeasureMode widthMode, - float availableHeight, + float height, MeasureMode heightMode) { - const auto size = measureFunc_( - this, - availableWidth, - unscopedEnum(widthMode), - availableHeight, - unscopedEnum(heightMode)); - - if (yoga::isUndefined(size.height) || size.height < 0 || - yoga::isUndefined(size.width) || size.width < 0) { - yoga::log( - this, - LogLevel::Error, - "Measure function returned an invalid dimension to Yoga: [width=%f, height=%f]", - size.width, - size.height); - return {.width = 0.0f, .height = 0.0f}; - } - - return size; + return measureFunc_( + this, width, unscopedEnum(widthMode), height, unscopedEnum(heightMode)); } float Node::baseline(float width, float height) const { diff --git a/packages/react-native/ReactCommon/yoga/yoga/node/Node.h b/packages/react-native/ReactCommon/yoga/yoga/node/Node.h index cd029b40d46671..8f5ee591cc59e6 100644 --- a/packages/react-native/ReactCommon/yoga/yoga/node/Node.h +++ b/packages/react-native/ReactCommon/yoga/yoga/node/Node.h @@ -66,9 +66,9 @@ class YG_EXPORT Node : public ::YGNode { } YGSize measure( - float availableWidth, + float width, MeasureMode widthMode, - float availableHeight, + float height, MeasureMode heightMode); bool hasBaselineFunc() const noexcept {