mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Replace usages of YGConfigSetUseLegacyStretchBehaviour (#37093)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/37093 This replaces product usages of `YGConfigSetUseLegacyStretchBehaviour` with instead setting `YGErrataAll`, to opt out of future conformance fixes which may impact compatibility. We need to still audit C/C++ usage for where we should be applying `YGErrataClassic`, port this change to the RN desktop fork, then mark the function as deprecated (taking care to allow deprecated functions in the Yoga bindings to call deprecated C ABI functions without warning). Changelog: [Internal] Reviewed By: yungsters Differential Revision: D45300631 fbshipit-source-id: 9f94bdbbe7eda091adac016231083b2486c583d9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
f635341461
commit
b0cf746c1f
@@ -50,7 +50,7 @@ typedef NS_ENUM(unsigned int, meta_prop_t) {
|
||||
dispatch_once(&onceToken, ^{
|
||||
yogaConfig = YGConfigNew();
|
||||
YGConfigSetPointScaleFactor(yogaConfig, RCTScreenScale());
|
||||
YGConfigSetUseLegacyStretchBehaviour(yogaConfig, true);
|
||||
YGConfigSetErrata(yogaConfig, YGErrataAll);
|
||||
});
|
||||
return yogaConfig;
|
||||
}
|
||||
|
||||
+1
-1
@@ -745,7 +745,7 @@ YogaLayoutableShadowNode &YogaLayoutableShadowNode::shadowNodeFromContext(
|
||||
YGConfig &YogaLayoutableShadowNode::initializeYogaConfig(YGConfig &config) {
|
||||
YGConfigSetCloneNodeFunc(
|
||||
&config, YogaLayoutableShadowNode::yogaNodeCloneCallbackConnector);
|
||||
YGConfigSetUseLegacyStretchBehaviour(&config, true);
|
||||
YGConfigSetErrata(&config, YGErrataAll);
|
||||
#ifdef RN_DEBUG_YOGA_LOGGER
|
||||
YGConfigSetPrintTreeFlag(&config, true);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user