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
@@ -32,13 +32,6 @@ void Config::setPointScaleFactor(float pixelsInPoint) {
|
||||
YGConfigSetPointScaleFactor(m_config, pixelsInPoint);
|
||||
}
|
||||
|
||||
void Config::setUseLegacyStretchBehaviour(bool useLegacyStretchBehaviour) {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
YGConfigSetUseLegacyStretchBehaviour(m_config, useLegacyStretchBehaviour);
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
void Config::setErrata(int errata) {
|
||||
YGConfigSetErrata(m_config, static_cast<YGErrata>(errata));
|
||||
}
|
||||
@@ -52,13 +45,6 @@ bool Config::isExperimentalFeatureEnabled(int feature) const {
|
||||
m_config, static_cast<YGExperimentalFeature>(feature));
|
||||
}
|
||||
|
||||
bool Config::useLegacyStretchBehaviour() const {
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated"
|
||||
return YGConfigGetUseLegacyStretchBehaviour(m_config);
|
||||
#pragma clang diagnostic pop
|
||||
}
|
||||
|
||||
int Config::getErrata() const {
|
||||
return static_cast<int>(YGConfigGetErrata(m_config));
|
||||
}
|
||||
|
@@ -32,13 +32,11 @@ public: // Prevent accidental copy
|
||||
public: // Setters
|
||||
void setExperimentalFeatureEnabled(int feature, bool enabled);
|
||||
void setPointScaleFactor(float pixelsInPoint);
|
||||
void setUseLegacyStretchBehaviour(bool useLegacyStretchBehaviour);
|
||||
void setErrata(int errata);
|
||||
void setUseWebDefaults(bool useWebDefaults);
|
||||
|
||||
public: // Getters
|
||||
bool isExperimentalFeatureEnabled(int feature) const;
|
||||
bool useLegacyStretchBehaviour() const;
|
||||
int getErrata() const;
|
||||
bool useWebDefaults() const;
|
||||
|
||||
|
@@ -32,13 +32,10 @@ EMSCRIPTEN_BINDINGS(YOGA_LAYOUT) {
|
||||
"setExperimentalFeatureEnabled",
|
||||
&Config::setExperimentalFeatureEnabled)
|
||||
.function("setPointScaleFactor", &Config::setPointScaleFactor)
|
||||
.function(
|
||||
"setUseLegacyStretchBehaviour", &Config::setUseLegacyStretchBehaviour)
|
||||
.function("setErrata", &Config::setErrata)
|
||||
.function("setUseWebDefaults", &Config::setUseWebDefaults)
|
||||
.function(
|
||||
"isExperimentalFeatureEnabled", &Config::isExperimentalFeatureEnabled)
|
||||
.function("useLegacyStretchBehaviour", &Config::useLegacyStretchBehaviour)
|
||||
.function("getErrata", &Config::getErrata)
|
||||
.function("useWebDefaults", &Config::useWebDefaults);
|
||||
|
||||
|
12
javascript/src/wrapAssembly.d.ts
vendored
12
javascript/src/wrapAssembly.d.ts
vendored
@@ -53,18 +53,6 @@ export type Config = {
|
||||
enabled: boolean,
|
||||
): void;
|
||||
setPointScaleFactor(factor: number): void;
|
||||
/**
|
||||
* @deprecated Please use "getErrata()"
|
||||
*/
|
||||
useLegacyStretchBehaviour(): boolean;
|
||||
/**
|
||||
* @deprecated "setUseLegacyStretchBehaviour" will be removed in the next
|
||||
* release. Usage should be replaced with "setErrata(ERRATA_ALL)" to opt out
|
||||
* of all future breaking conformance fixes, or
|
||||
* "setErrata(ERRATA_STRETCH_FLEX_BASIS)" to opt out of the specific
|
||||
* conformance fix previously disabled by "UseLegacyStretchBehaviour".
|
||||
*/
|
||||
setUseLegacyStretchBehaviour(useLegacyStretchBehaviour: boolean): void;
|
||||
getErrata(): Errata;
|
||||
setErrata(errata: Errata): void;
|
||||
useWebDefaults(): boolean;
|
||||
|
Reference in New Issue
Block a user