| 52 | } |
| 53 | |
| 54 | YGSize Node::measure( |
| 55 | float availableWidth, |
| 56 | MeasureMode widthMode, |
| 57 | float availableHeight, |
| 58 | MeasureMode heightMode) { |
| 59 | const auto size = measureFunc_( |
| 60 | this, |
| 61 | availableWidth, |
| 62 | unscopedEnum(widthMode), |
| 63 | availableHeight, |
| 64 | unscopedEnum(heightMode)); |
| 65 | |
| 66 | if (yoga::isUndefined(size.height) || size.height < 0 || |
| 67 | yoga::isUndefined(size.width) || size.width < 0) { |
| 68 | yoga::log( |
| 69 | this, |
| 70 | LogLevel::Warn, |
| 71 | "Measure function returned an invalid dimension to Yoga: [width=%f, height=%f]", |
| 72 | size.width, |
| 73 | size.height); |
| 74 | return { |
| 75 | .width = maxOrDefined(0.0f, size.width), |
| 76 | .height = maxOrDefined(0.0f, size.height)}; |
| 77 | } |
| 78 | |
| 79 | return size; |
| 80 | } |
| 81 | |
| 82 | float Node::baseline(float width, float height) const { |
| 83 | return baselineFunc_(this, width, height); |
nothing calls this directly
no test coverage detected