Breaking: Remove "UseLegacyStretchBehaviour" functions (#1368)
Summary: Pull Request resolved: https://github.com/facebook/yoga/pull/1368 X-link: https://github.com/facebook/react-native/pull/39372 These were marked as deprecated as part of the public Yoga 2.0 release, and were alredy emitting deprecation warnings. Remove them. Reviewed By: javache Differential Revision: D49131250 fbshipit-source-id: cc1d4e8b179697b9a11a685f4fc4e9d36e1a26a0
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a2d3fc6a3c
commit
c35f8819ae
@@ -1017,21 +1017,6 @@ YOGA_EXPORT void YGConfigSetUseWebDefaults(
|
||||
resolveRef(config)->setUseWebDefaults(enabled);
|
||||
}
|
||||
|
||||
YOGA_EXPORT bool YGConfigGetUseLegacyStretchBehaviour(
|
||||
const YGConfigConstRef config) {
|
||||
return resolveRef(config)->hasErrata(YGErrataStretchFlexBasis);
|
||||
}
|
||||
|
||||
YOGA_EXPORT void YGConfigSetUseLegacyStretchBehaviour(
|
||||
const YGConfigRef config,
|
||||
const bool useLegacyStretchBehaviour) {
|
||||
if (useLegacyStretchBehaviour) {
|
||||
resolveRef(config)->addErrata(YGErrataStretchFlexBasis);
|
||||
} else {
|
||||
resolveRef(config)->removeErrata(YGErrataStretchFlexBasis);
|
||||
}
|
||||
}
|
||||
|
||||
bool YGConfigGetUseWebDefaults(const YGConfigConstRef config) {
|
||||
return resolveRef(config)->useWebDefaults();
|
||||
}
|
||||
|
21
yoga/Yoga.h
21
yoga/Yoga.h
@@ -306,27 +306,6 @@ WIN_EXPORT void YGConfigSetPointScaleFactor(
|
||||
float pixelsInPoint);
|
||||
WIN_EXPORT float YGConfigGetPointScaleFactor(YGConfigConstRef config);
|
||||
|
||||
// Yoga previously had an error where containers would take the maximum space
|
||||
// possible instead of the minimum like they are supposed to. In practice this
|
||||
// resulted in implicit behaviour similar to align-self: stretch; Because this
|
||||
// was such a long-standing bug we must allow legacy users to switch back to
|
||||
// this behaviour.
|
||||
WIN_EXPORT YG_DEPRECATED(
|
||||
"Please use "
|
||||
"\"YGConfigGetErrata()\"") bool YGConfigGetUseLegacyStretchBehaviour(YGConfigConstRef
|
||||
config);
|
||||
WIN_EXPORT
|
||||
YG_DEPRECATED(
|
||||
"\"YGConfigSetUseLegacyStretchBehaviour\" will be removed in the next "
|
||||
"release. Usage should be replaced with \"YGConfigSetErrata(YGErrataAll)\" "
|
||||
"to opt out of all future breaking conformance fixes, or "
|
||||
"\"YGConfigSetErrata(YGErrataStretchFlexBasis)\" to opt out of the "
|
||||
"specific conformance fix previously disabled by "
|
||||
"\"UseLegacyStretchBehaviour\".")
|
||||
void YGConfigSetUseLegacyStretchBehaviour(
|
||||
YGConfigRef config,
|
||||
bool useLegacyStretchBehaviour);
|
||||
|
||||
// YGConfig
|
||||
WIN_EXPORT YGConfigRef YGConfigNew(void);
|
||||
WIN_EXPORT void YGConfigFree(YGConfigRef config);
|
||||
|
Reference in New Issue
Block a user