Add errata supporting changes to position: static (#1434)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1434 X-link: https://github.com/facebook/react-native/pull/41130 I will use this errata to gate my changes that actually make position: static behave like the web. We have future plans to make position: relative the default again but users could still have declared certain nodes as position: static, so I think this is needed regardless. Reviewed By: NickGerleman Differential Revision: D50506915 fbshipit-source-id: b0d9e6883167de6ff002352c9288053324464cb9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6cc9e58246
commit
52ae53a7c8
@@ -97,6 +97,8 @@ const char* YGErrataToString(const YGErrata value) {
|
||||
return "stretch-flex-basis";
|
||||
case YGErrataStartingEndingEdgeFromFlexDirection:
|
||||
return "starting-ending-edge-from-flex-direction";
|
||||
case YGErrataPositionStaticBehavesLikeRelative:
|
||||
return "position-static-behaves-like-relative";
|
||||
case YGErrataAll:
|
||||
return "all";
|
||||
case YGErrataClassic:
|
||||
|
@@ -57,6 +57,7 @@ YG_ENUM_DECL(
|
||||
YGErrataNone = 0,
|
||||
YGErrataStretchFlexBasis = 1,
|
||||
YGErrataStartingEndingEdgeFromFlexDirection = 2,
|
||||
YGErrataPositionStaticBehavesLikeRelative = 4,
|
||||
YGErrataAll = 2147483647,
|
||||
YGErrataClassic = 2147483646)
|
||||
YG_DEFINE_ENUM_FLAG_OPERATORS(YGErrata)
|
||||
|
@@ -19,6 +19,7 @@ enum class Errata : uint32_t {
|
||||
None = YGErrataNone,
|
||||
StretchFlexBasis = YGErrataStretchFlexBasis,
|
||||
StartingEndingEdgeFromFlexDirection = YGErrataStartingEndingEdgeFromFlexDirection,
|
||||
PositionStaticBehavesLikeRelative = YGErrataPositionStaticBehavesLikeRelative,
|
||||
All = YGErrataAll,
|
||||
Classic = YGErrataClassic,
|
||||
};
|
||||
@@ -27,7 +28,7 @@ YG_DEFINE_ENUM_FLAG_OPERATORS(Errata)
|
||||
|
||||
template <>
|
||||
constexpr inline int32_t ordinalCount<Errata>() {
|
||||
return 5;
|
||||
return 6;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
Reference in New Issue
Block a user