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 0a708e18c0 - Show all commits

View File

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