Not re-calculate value in Step1.

Summary:
Not re-calculate `paddingAndBorderAxisMain`/`paddingAndBorderAxisCross`/`paddingAndBorderAxisRow`/`paddingAndBorderAxisColumn` in Step1 of `YGNodelayoutImpl`.

They can be figure out by values calculated before.
Closes https://github.com/facebook/yoga/pull/298

Reviewed By: dshahidehpour

Differential Revision: D4365533

Pulled By: emilsjolander

fbshipit-source-id: 6caf60bc6ef3addd49915b39b48f01a8b4926e9c
This commit is contained in:
desmondyao 2016-12-23 10:15:50 -08:00 committed by Facebook Github Bot
parent 8680681a3d
commit bc285de799
1 changed files with 7 additions and 7 deletions

View File

@ -1500,9 +1500,9 @@ static void YGNodelayoutImpl(const YGNodeRef node,
const YGMeasureMode measureModeMainDim = isMainAxisRow ? widthMeasureMode : heightMeasureMode; const YGMeasureMode measureModeMainDim = isMainAxisRow ? widthMeasureMode : heightMeasureMode;
const YGMeasureMode measureModeCrossDim = isMainAxisRow ? heightMeasureMode : widthMeasureMode; const YGMeasureMode measureModeCrossDim = isMainAxisRow ? heightMeasureMode : widthMeasureMode;
const float paddingAndBorderAxisRow = YGNodePaddingAndBorderForAxis(node, YGFlexDirectionRow); const float paddingAndBorderAxisRow = isMainAxisRow ? paddingAndBorderAxisMain : paddingAndBorderAxisCross;
const float paddingAndBorderAxisColumn = const float paddingAndBorderAxisColumn = isMainAxisRow ? paddingAndBorderAxisCross : paddingAndBorderAxisMain;
YGNodePaddingAndBorderForAxis(node, YGFlexDirectionColumn);
const float marginAxisRow = YGNodeMarginForAxis(node, YGFlexDirectionRow); const float marginAxisRow = YGNodeMarginForAxis(node, YGFlexDirectionRow);
const float marginAxisColumn = YGNodeMarginForAxis(node, YGFlexDirectionColumn); const float marginAxisColumn = YGNodeMarginForAxis(node, YGFlexDirectionColumn);