Marker for measure callbacks

Summary:
@public

Wraps measure callbacks with a marker.

Reviewed By: SidharthGuglani

Differential Revision: D13896745

fbshipit-source-id: d6e14fe93f666b06516be1aef7f8e1bfe45440a7
This commit is contained in:
David Aurelio
2019-02-01 03:31:12 -08:00
committed by Facebook Github Bot
parent 719fa3cca3
commit 0d026bd1a0
4 changed files with 66 additions and 12 deletions

View File

@@ -1688,8 +1688,14 @@ static void YGNodeWithMeasureFuncSetMeasuredDimensions(
YGDimensionHeight);
} else {
// Measure the text under the current constraints.
const YGSize measuredSize = node->getMeasure()(
node, innerWidth, widthMeasureMode, innerHeight, heightMeasureMode);
const YGSize measuredSize = marker::MarkerSection<YGMarkerMeasure>::wrap(
node,
node->getMeasure(),
node,
innerWidth,
widthMeasureMode,
innerHeight,
heightMeasureMode);
node->setLayoutMeasuredDimension(
YGNodeBoundAxis(