Added bool config to YGConfig to configure using web defaults

Summary:
Added bool config to YGConfig to configure using web defaults. See #445.
Closes https://github.com/facebook/yoga/pull/449

Reviewed By: astreet

Differential Revision: D4642272

Pulled By: emilsjolander

fbshipit-source-id: 4f35bd17b7f764f42295052a4a8b4ae46c192d7e
This commit is contained in:
Lukas Wöhrl
2017-03-03 10:47:42 -08:00
committed by Facebook Github Bot
parent a706f4c97c
commit 62f47190fb
3 changed files with 41 additions and 5 deletions

View File

@@ -235,6 +235,12 @@ WIN_EXPORT void YGConfigSetExperimentalFeatureEnabled(const YGConfigRef config,
WIN_EXPORT bool YGConfigIsExperimentalFeatureEnabled(const YGConfigRef config,
const YGExperimentalFeature feature);
// Using the web defaults is the prefered configuration for new projects.
// Usage of non web defaults should be considered as legacy.
WIN_EXPORT void YGConfigSetUseWebDefaults(const YGConfigRef config, const bool enabled);
WIN_EXPORT bool YGConfigGetUseWebDefaults(const YGConfigRef config);
WIN_EXPORT void
YGSetMemoryFuncs(YGMalloc ygmalloc, YGCalloc yccalloc, YGRealloc ygrealloc, YGFree ygfree);