Remove YGExperimentalFeatureFixAbsoluteTrailingColumnMargin (#1317)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1317 X-link: https://github.com/facebook/react-native/pull/37374 This is edge-casey enough, and I actually broke this in D42282358 without us noticing (I changed height to width of the bottom usage, instead, copy/pasting the value of the top one). Reviewed By: yungsters Differential Revision: D45766764 fbshipit-source-id: b600b79b8436534fe48ef2acbfde8ba64068e593
This commit is contained in:
committed by
Facebook GitHub Bot
parent
506027925d
commit
0aec0a1ac4
@@ -107,8 +107,6 @@ const char* YGExperimentalFeatureToString(const YGExperimentalFeature value) {
|
||||
return "web-flex-basis";
|
||||
case YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge:
|
||||
return "absolute-percentage-against-padding-edge";
|
||||
case YGExperimentalFeatureFixAbsoluteTrailingColumnMargin:
|
||||
return "fix-absolute-trailing-column-margin";
|
||||
case YGExperimentalFeatureFixJNILocalRefOverflows:
|
||||
return "fix-jnilocal-ref-overflows";
|
||||
}
|
||||
|
@@ -66,7 +66,6 @@ YG_ENUM_SEQ_DECL(
|
||||
YGExperimentalFeature,
|
||||
YGExperimentalFeatureWebFlexBasis,
|
||||
YGExperimentalFeatureAbsolutePercentageAgainstPaddingEdge,
|
||||
YGExperimentalFeatureFixAbsoluteTrailingColumnMargin,
|
||||
YGExperimentalFeatureFixJNILocalRefOverflows)
|
||||
|
||||
YG_ENUM_SEQ_DECL(
|
||||
|
@@ -1543,19 +1543,13 @@ static void YGNodeAbsoluteLayoutChild(
|
||||
depth,
|
||||
generationCount);
|
||||
|
||||
auto trailingMarginOuterSize =
|
||||
node->getConfig()->isExperimentalFeatureEnabled(
|
||||
YGExperimentalFeatureFixAbsoluteTrailingColumnMargin)
|
||||
? isMainAxisRow ? height : width
|
||||
: width;
|
||||
|
||||
if (child->isTrailingPosDefined(mainAxis) &&
|
||||
!child->isLeadingPositionDefined(mainAxis)) {
|
||||
child->setLayoutPosition(
|
||||
node->getLayout().measuredDimensions[dim[mainAxis]] -
|
||||
child->getLayout().measuredDimensions[dim[mainAxis]] -
|
||||
node->getTrailingBorder(mainAxis) -
|
||||
child->getTrailingMargin(mainAxis, trailingMarginOuterSize)
|
||||
child->getTrailingMargin(mainAxis, isMainAxisRow ? width : height)
|
||||
.unwrap() -
|
||||
child->getTrailingPosition(mainAxis, isMainAxisRow ? width : height)
|
||||
.unwrap(),
|
||||
@@ -1598,7 +1592,7 @@ static void YGNodeAbsoluteLayoutChild(
|
||||
node->getLayout().measuredDimensions[dim[crossAxis]] -
|
||||
child->getLayout().measuredDimensions[dim[crossAxis]] -
|
||||
node->getTrailingBorder(crossAxis) -
|
||||
child->getTrailingMargin(crossAxis, trailingMarginOuterSize)
|
||||
child->getTrailingMargin(crossAxis, isMainAxisRow ? height : width)
|
||||
.unwrap() -
|
||||
child
|
||||
->getTrailingPosition(crossAxis, isMainAxisRow ? height : width)
|
||||
|
Reference in New Issue
Block a user