| 2331 | } |
| 2332 | |
| 2333 | _flags[kHasLazyLayoutNeedingCalculationFlag] = true; |
| 2334 | |
| 2335 | auto parent = getParent(); |
| 2336 | if (parent != nullptr) { |
| 2337 | parent->scheduleLazyLayout(); |
| 2338 | } else { |
| 2339 | scheduleUpdates(); |
| 2340 | } |
| 2341 | } |
| 2342 | |
| 2343 | struct MeasureMetrics { |
| 2344 | uint32_t totalMeasure = 0; |
| 2345 | }; |
| 2346 | |
| 2347 | static thread_local MeasureMetrics* currentMeasureMetrics = nullptr; |
| 2348 | |
| 2349 | facebook::yoga::StyleSizeLength resolveYogaValue(float containerSize, facebook::yoga::StyleSizeLength appliedValue) { |
| 2350 | float resolvedValue; |
| 2351 | |
| 2352 | if (appliedValue.isPoints()) { |
| 2353 | resolvedValue = std::min(appliedValue.value().unwrap(), containerSize); |
| 2354 | } else if (appliedValue.isPercent()) { |
| 2355 | resolvedValue = appliedValue.value().unwrap() * containerSize * 0.01f; |
| 2356 | } else { |
| 2357 | resolvedValue = containerSize; |
| 2358 | } |
| 2359 | |
| 2360 | return facebook::yoga::StyleSizeLength::points(resolvedValue); |
| 2361 | } |
| 2362 |
nothing calls this directly
no test coverage detected