Skip to content

Commit

Permalink
Revert "Extra log for case where availableHeight is undefined and siz…
Browse files Browse the repository at this point in the history
…ing mode != max content (microsoft#1687)"

Summary:
Reverting facebook/yoga#1687 as it appears to regress Yoga performance anywhere from 10-33%.

## Changelog

[Internal]

Differential Revision: D65863569
  • Loading branch information
rozele authored and facebook-github-bot committed Nov 13, 2024
1 parent d3c5446 commit edd1223
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include <cfloat>
#include <cmath>
#include <cstring>
#include <string>

#include <yoga/Yoga.h>

Expand Down Expand Up @@ -693,13 +692,6 @@ static float distributeFreeSpaceSecondPass(
}
}

yoga::assertFatalWithNode(
currentLineChild,
yoga::isDefined(updatedMainSize),
("updatedMainSize is undefined. mainAxisOwnerSize: " +
std::to_string(mainAxisOwnerSize))
.c_str());

deltaFreeSpace += updatedMainSize - childFlexBasis;

const float marginMain = currentLineChild->style().computeMarginForAxis(
Expand Down Expand Up @@ -793,20 +785,6 @@ static float distributeFreeSpaceSecondPass(
const bool isLayoutPass = performLayout && !requiresStretchLayout;
// Recursively call the layout algorithm for this child with the updated
// main size.

yoga::assertFatalWithNode(
currentLineChild,
yoga::isUndefined(childMainSize)
? childMainSizingMode == SizingMode::MaxContent
: true,
"childMainSize is undefined so childMainSizingMode must be MaxContent");
yoga::assertFatalWithNode(
currentLineChild,
yoga::isUndefined(childCrossSize)
? childCrossSizingMode == SizingMode::MaxContent
: true,
"childCrossSize is undefined so childCrossSizingMode must be MaxContent");

calculateLayoutInternal(
currentLineChild,
childWidth,
Expand Down

0 comments on commit edd1223

Please sign in to comment.