Baseline support #317

Closed
woehrl01 wants to merge 33 commits from baseline-support into master
20 changed files with 4602 additions and 7 deletions
Showing only changes of commit 2595e082d6 - Show all commits

View File

@@ -2531,7 +2531,7 @@ static void YGNodelayoutImpl(const YGNodeRef node,
if (YGNodeAlignItem(node, child) == YGAlignBaseline) {
const float ascent =
YGBaseline(child) + YGNodeLeadingMargin(child, crossAxis, availableInnerWidth);
const float descent = child->layout.measuredDimensions[dim[crossAxis]] +
const float descent = child->layout.measuredDimensions[YGDimensionHeight] +
YGNodeMarginForAxis(child, crossAxis, availableInnerWidth) -
ascent;
maxAscentForCurrentLine = fmaxf(maxAscentForCurrentLine, ascent);