Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for (de)serializing node state #42751

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

12 changes: 0 additions & 12 deletions packages/react-native/ReactCommon/yoga/yoga/YGEnums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,18 +223,6 @@ const char* YGPositionTypeToString(const YGPositionType value) {
return "unknown";
}

const char* YGPrintOptionsToString(const YGPrintOptions value) {
switch (value) {
case YGPrintOptionsLayout:
return "layout";
case YGPrintOptionsStyle:
return "style";
case YGPrintOptionsChildren:
return "children";
}
return "unknown";
}

const char* YGUnitToString(const YGUnit value) {
switch (value) {
case YGUnitUndefined:
Expand Down
7 changes: 0 additions & 7 deletions packages/react-native/ReactCommon/yoga/yoga/YGEnums.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,6 @@ YG_ENUM_DECL(
YGPositionTypeRelative,
YGPositionTypeAbsolute)

YG_ENUM_DECL(
YGPrintOptions,
YGPrintOptionsLayout = 1,
YGPrintOptionsStyle = 2,
YGPrintOptionsChildren = 4)
YG_DEFINE_ENUM_FLAG_OPERATORS(YGPrintOptions)

YG_ENUM_DECL(
YGUnit,
YGUnitUndefined,
Expand Down
4 changes: 4 additions & 0 deletions packages/react-native/ReactCommon/yoga/yoga/YGNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,10 @@ void YGNodeSetAlwaysFormsContainingBlock(
resolveRef(node)->setAlwaysFormsContainingBlock(alwaysFormsContainingBlock);
}

bool YGNodeGetAlwaysFormsContainingBlock(YGNodeConstRef node) {
return resolveRef(node)->alwaysFormsContainingBlock();
}

// TODO: This leaks internal details to the public API. Remove after removing
// ComponentKit usage of it.
bool YGNodeCanUseCachedMeasurement(
Expand Down
8 changes: 8 additions & 0 deletions packages/react-native/ReactCommon/yoga/yoga/YGNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,14 @@ YG_EXPORT void YGNodeSetAlwaysFormsContainingBlock(
YGNodeRef node,
bool alwaysFormsContainingBlock);

/**
* Whether the node will always form a containing block for any descendant. This
* can happen in situation where the client implements something like a
* transform that can affect containing blocks but is not handled by Yoga
* directly.
*/
YG_EXPORT bool YGNodeGetAlwaysFormsContainingBlock(YGNodeConstRef node);

/**
* @deprecated
*/
Expand Down
38 changes: 0 additions & 38 deletions packages/react-native/ReactCommon/yoga/yoga/enums/PrintOptions.h

This file was deleted.

Loading