diff --git a/lib/yoga/src/main/cpp/yoga/Yoga.cpp b/lib/yoga/src/main/cpp/yoga/Yoga.cpp index b9a5961d44d..0a50aa84a4e 100644 --- a/lib/yoga/src/main/cpp/yoga/Yoga.cpp +++ b/lib/yoga/src/main/cpp/yoga/Yoga.cpp @@ -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(); } diff --git a/lib/yoga/src/main/cpp/yoga/Yoga.h b/lib/yoga/src/main/cpp/yoga/Yoga.h index c9efb85fd8a..2697bb40ef9 100644 --- a/lib/yoga/src/main/cpp/yoga/Yoga.h +++ b/lib/yoga/src/main/cpp/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); diff --git a/lib/yoga/src/main/java/com/facebook/yoga/YogaConfig.java b/lib/yoga/src/main/java/com/facebook/yoga/YogaConfig.java index 931313594b1..bd7b2998ce3 100644 --- a/lib/yoga/src/main/java/com/facebook/yoga/YogaConfig.java +++ b/lib/yoga/src/main/java/com/facebook/yoga/YogaConfig.java @@ -18,18 +18,6 @@ public abstract class YogaConfig { public abstract void setPrintTreeFlag(boolean enable); public abstract void setPointScaleFactor(float pixelsInPoint); - /** - * 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. - * - * @deprecated "setUseLegacyStretchBehaviour" will be removed in the next release. Usage should be replaced with - * "setErrata(YogaErrata.ALL)" to opt out of all future breaking conformance fixes, or - * "setErrata(YogaErrata.STRETCH_FLEX_BASIS)" to opt out of the specific conformance fix previously disabled by - * "UseLegacyStretchBehaviour". - */ - @Deprecated - public abstract void setUseLegacyStretchBehaviour(boolean useLegacyStretchBehaviour); public abstract void setErrata(YogaErrata errata); diff --git a/lib/yoga/src/main/java/com/facebook/yoga/YogaConfigJNIBase.java b/lib/yoga/src/main/java/com/facebook/yoga/YogaConfigJNIBase.java index bbe526d7004..8e7c94921c9 100644 --- a/lib/yoga/src/main/java/com/facebook/yoga/YogaConfigJNIBase.java +++ b/lib/yoga/src/main/java/com/facebook/yoga/YogaConfigJNIBase.java @@ -43,15 +43,6 @@ public void setPointScaleFactor(float pixelsInPoint) { YogaNative.jni_YGConfigSetPointScaleFactorJNI(mNativePointer, pixelsInPoint); } - /** - * 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. - */ - public void setUseLegacyStretchBehaviour(boolean useLegacyStretchBehaviour) { - YogaNative.jni_YGConfigSetUseLegacyStretchBehaviourJNI(mNativePointer, useLegacyStretchBehaviour); - } - public void setErrata(YogaErrata errata) { YogaNative.jni_YGConfigSetErrataJNI(mNativePointer, errata.intValue()); } diff --git a/lib/yoga/src/main/java/com/facebook/yoga/YogaNative.java b/lib/yoga/src/main/java/com/facebook/yoga/YogaNative.java index 74f4a98cb47..89e3cde6b02 100644 --- a/lib/yoga/src/main/java/com/facebook/yoga/YogaNative.java +++ b/lib/yoga/src/main/java/com/facebook/yoga/YogaNative.java @@ -24,7 +24,6 @@ public class YogaNative { static native void jni_YGConfigSetUseWebDefaultsJNI(long nativePointer, boolean useWebDefaults); static native void jni_YGConfigSetPrintTreeFlagJNI(long nativePointer, boolean enable); static native void jni_YGConfigSetPointScaleFactorJNI(long nativePointer, float pixelsInPoint); - static native void jni_YGConfigSetUseLegacyStretchBehaviourJNI(long nativePointer, boolean useLegacyStretchBehaviour); static native void jni_YGConfigSetErrataJNI(long nativePointer, int errata); static native int jni_YGConfigGetErrataJNI(long nativePointer); static native void jni_YGConfigSetLoggerJNI(long nativePointer, YogaLogger logger); diff --git a/lib/yogajni/src/main/cpp/jni/YGJNIVanilla.cpp b/lib/yogajni/src/main/cpp/jni/YGJNIVanilla.cpp index a95a00340d2..86f740e1f57 100644 --- a/lib/yogajni/src/main/cpp/jni/YGJNIVanilla.cpp +++ b/lib/yogajni/src/main/cpp/jni/YGJNIVanilla.cpp @@ -93,18 +93,6 @@ static void jni_YGConfigSetPointScaleFactorJNI( YGConfigSetPointScaleFactor(config, pixelsInPoint); } -static void jni_YGConfigSetUseLegacyStretchBehaviourJNI( - JNIEnv* /*env*/, - jobject /*obj*/, - jlong nativePointer, - jboolean useLegacyStretchBehaviour) { - const YGConfigRef config = _jlong2YGConfigRef(nativePointer); -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated" - YGConfigSetUseLegacyStretchBehaviour(config, useLegacyStretchBehaviour); -#pragma clang diagnostic pop -} - static void jni_YGConfigSetErrataJNI( JNIEnv* /*env*/, jobject /*obj*/, @@ -790,9 +778,6 @@ static JNINativeMethod methods[] = { {"jni_YGConfigSetPointScaleFactorJNI", "(JF)V", (void*) jni_YGConfigSetPointScaleFactorJNI}, - {"jni_YGConfigSetUseLegacyStretchBehaviourJNI", - "(JZ)V", - (void*) jni_YGConfigSetUseLegacyStretchBehaviourJNI}, {"jni_YGConfigSetErrataJNI", "(JI)V", (void*) jni_YGConfigSetErrataJNI}, {"jni_YGConfigGetErrataJNI", "(J)I", (void*) jni_YGConfigGetErrataJNI}, {"jni_YGConfigSetLoggerJNI",