Set web defaults when resetting

Summary: Set web defaults when resetting

Reviewed By: astreet

Differential Revision: D4779742

fbshipit-source-id: 5b8c5d7bd432a12984e4ebfd3187da3d680272cd
This commit is contained in:
Emil Sjolander
2017-03-29 03:06:19 -07:00
committed by Facebook Github Bot
parent bc2fb5c7ab
commit 5b173c1b61
2 changed files with 18 additions and 0 deletions

View File

@@ -362,6 +362,10 @@ void YGNodeReset(const YGNodeRef node) {
const YGConfigRef config = node->config;
memcpy(node, &gYGNodeDefaults, sizeof(YGNode));
if (config->useWebDefaults) {
node->style.flexDirection = YGFlexDirectionRow;
node->style.alignContent = YGAlignStretch;
}
node->config = config;
}