mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-19 23:40:09 +08:00
Fixup recent fix to flex basis and put it behind an experimental flag
Reviewed By: gkassabli Differential Revision: D4222910 fbshipit-source-id: d693482441fcc4d37a288e2e3529057a04f60541
This commit is contained in:
committed by
Facebook Github Bot
parent
68c6d71cea
commit
dad520476e
@@ -68,6 +68,7 @@ typedef enum CSSDirection {
|
||||
|
||||
typedef enum CSSExperimentalFeature {
|
||||
CSSExperimentalFeatureRounding,
|
||||
CSSExperimentalFeatureWebFlexBasis,
|
||||
CSSExperimentalFeatureCount,
|
||||
} CSSExperimentalFeature;
|
||||
|
||||
|
||||
@@ -977,7 +977,8 @@ static void computeChildFlexBasis(const CSSNodeRef node,
|
||||
if (!CSSValueIsUndefined(CSSNodeStyleGetFlexBasis(child)) &&
|
||||
!CSSValueIsUndefined(isMainAxisRow ? width : height)) {
|
||||
if (CSSValueIsUndefined(child->layout.computedFlexBasis) ||
|
||||
child->layout.computedFlexBasisGeneration != gCurrentGenerationCount) {
|
||||
(CSSLayoutIsExperimentalFeatureEnabled(CSSExperimentalFeatureWebFlexBasis) &&
|
||||
child->layout.computedFlexBasisGeneration != gCurrentGenerationCount)) {
|
||||
child->layout.computedFlexBasis =
|
||||
fmaxf(CSSNodeStyleGetFlexBasis(child), getPaddingAndBorderAxis(child, mainAxis));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user