Refactor cloning of YogaNode

Summary: see Test Plan

Reviewed By: priteshrnandgaonkar

Differential Revision: D7339832

fbshipit-source-id: 2de6f47ae7601ac083d3b9fbe10ffaf6307ae760
This commit is contained in:
David Vacca
2018-04-01 18:27:04 -07:00
committed by Facebook Github Bot
parent 187fc54596
commit 17901ea5c2
9 changed files with 103 additions and 59 deletions

View File

@@ -62,8 +62,7 @@ typedef int (*YGLogger)(const YGConfigRef config,
YGLogLevel level,
const char *format,
va_list args);
typedef void (*YGNodeClonedFunc)(YGNodeRef oldNode,
YGNodeRef newNode,
typedef YGNodeRef (*YGCloneNodeFunc)(YGNodeRef oldNode,
YGNodeRef parent,
int childIndex);
@@ -283,8 +282,8 @@ WIN_EXPORT bool YGConfigIsExperimentalFeatureEnabled(const YGConfigRef config,
WIN_EXPORT void YGConfigSetUseWebDefaults(const YGConfigRef config, const bool enabled);
WIN_EXPORT bool YGConfigGetUseWebDefaults(const YGConfigRef config);
WIN_EXPORT void YGConfigSetNodeClonedFunc(const YGConfigRef config,
const YGNodeClonedFunc callback);
WIN_EXPORT void YGConfigSetCloneNodeFunc(const YGConfigRef config,
const YGCloneNodeFunc callback);
// Export only for C#
WIN_EXPORT YGConfigRef YGConfigGetDefault(void);