Optimize log print by using html format
Summary: See facebook/yoga#453. Optimizes the node log print by generating some enum text via ```enum.py``` and moving printing to new functions to reduce boilerplate code. Changes the log output to format the nodes in html to be able to copy paste it into browsers for quick debugging. Hides all default values. Closes https://github.com/facebook/yoga/pull/479 Reviewed By: gkassabli Differential Revision: D4802184 Pulled By: emilsjolander fbshipit-source-id: 143bd63cbc31fb0755d711062cb4e6a448049ba3
This commit is contained in:
committed by
Facebook Github Bot
parent
5112564f08
commit
586b57009a
@@ -24,12 +24,14 @@ typedef YG_ENUM_BEGIN(YGAlign) {
|
||||
YGAlignSpaceBetween,
|
||||
YGAlignSpaceAround,
|
||||
} YG_ENUM_END(YGAlign);
|
||||
WIN_EXPORT const char *YGAlignToString(const YGAlign value);
|
||||
|
||||
#define YGDimensionCount 2
|
||||
typedef YG_ENUM_BEGIN(YGDimension) {
|
||||
YGDimensionWidth,
|
||||
YGDimensionHeight,
|
||||
} YG_ENUM_END(YGDimension);
|
||||
WIN_EXPORT const char *YGDimensionToString(const YGDimension value);
|
||||
|
||||
#define YGDirectionCount 3
|
||||
typedef YG_ENUM_BEGIN(YGDirection) {
|
||||
@@ -37,12 +39,14 @@ typedef YG_ENUM_BEGIN(YGDirection) {
|
||||
YGDirectionLTR,
|
||||
YGDirectionRTL,
|
||||
} YG_ENUM_END(YGDirection);
|
||||
WIN_EXPORT const char *YGDirectionToString(const YGDirection value);
|
||||
|
||||
#define YGDisplayCount 2
|
||||
typedef YG_ENUM_BEGIN(YGDisplay) {
|
||||
YGDisplayFlex,
|
||||
YGDisplayNone,
|
||||
} YG_ENUM_END(YGDisplay);
|
||||
WIN_EXPORT const char *YGDisplayToString(const YGDisplay value);
|
||||
|
||||
#define YGEdgeCount 9
|
||||
typedef YG_ENUM_BEGIN(YGEdge) {
|
||||
@@ -56,6 +60,7 @@ typedef YG_ENUM_BEGIN(YGEdge) {
|
||||
YGEdgeVertical,
|
||||
YGEdgeAll,
|
||||
} YG_ENUM_END(YGEdge);
|
||||
WIN_EXPORT const char *YGEdgeToString(const YGEdge value);
|
||||
|
||||
#define YGExperimentalFeatureCount 3
|
||||
typedef YG_ENUM_BEGIN(YGExperimentalFeature) {
|
||||
@@ -63,6 +68,7 @@ typedef YG_ENUM_BEGIN(YGExperimentalFeature) {
|
||||
YGExperimentalFeatureWebFlexBasis,
|
||||
YGExperimentalFeatureMinFlexFix,
|
||||
} YG_ENUM_END(YGExperimentalFeature);
|
||||
WIN_EXPORT const char *YGExperimentalFeatureToString(const YGExperimentalFeature value);
|
||||
|
||||
#define YGFlexDirectionCount 4
|
||||
typedef YG_ENUM_BEGIN(YGFlexDirection) {
|
||||
@@ -71,6 +77,7 @@ typedef YG_ENUM_BEGIN(YGFlexDirection) {
|
||||
YGFlexDirectionRow,
|
||||
YGFlexDirectionRowReverse,
|
||||
} YG_ENUM_END(YGFlexDirection);
|
||||
WIN_EXPORT const char *YGFlexDirectionToString(const YGFlexDirection value);
|
||||
|
||||
#define YGJustifyCount 5
|
||||
typedef YG_ENUM_BEGIN(YGJustify) {
|
||||
@@ -80,6 +87,7 @@ typedef YG_ENUM_BEGIN(YGJustify) {
|
||||
YGJustifySpaceBetween,
|
||||
YGJustifySpaceAround,
|
||||
} YG_ENUM_END(YGJustify);
|
||||
WIN_EXPORT const char *YGJustifyToString(const YGJustify value);
|
||||
|
||||
#define YGLogLevelCount 5
|
||||
typedef YG_ENUM_BEGIN(YGLogLevel) {
|
||||
@@ -89,6 +97,7 @@ typedef YG_ENUM_BEGIN(YGLogLevel) {
|
||||
YGLogLevelDebug,
|
||||
YGLogLevelVerbose,
|
||||
} YG_ENUM_END(YGLogLevel);
|
||||
WIN_EXPORT const char *YGLogLevelToString(const YGLogLevel value);
|
||||
|
||||
#define YGMeasureModeCount 3
|
||||
typedef YG_ENUM_BEGIN(YGMeasureMode) {
|
||||
@@ -96,6 +105,7 @@ typedef YG_ENUM_BEGIN(YGMeasureMode) {
|
||||
YGMeasureModeExactly,
|
||||
YGMeasureModeAtMost,
|
||||
} YG_ENUM_END(YGMeasureMode);
|
||||
WIN_EXPORT const char *YGMeasureModeToString(const YGMeasureMode value);
|
||||
|
||||
#define YGOverflowCount 3
|
||||
typedef YG_ENUM_BEGIN(YGOverflow) {
|
||||
@@ -103,12 +113,14 @@ typedef YG_ENUM_BEGIN(YGOverflow) {
|
||||
YGOverflowHidden,
|
||||
YGOverflowScroll,
|
||||
} YG_ENUM_END(YGOverflow);
|
||||
WIN_EXPORT const char *YGOverflowToString(const YGOverflow value);
|
||||
|
||||
#define YGPositionTypeCount 2
|
||||
typedef YG_ENUM_BEGIN(YGPositionType) {
|
||||
YGPositionTypeRelative,
|
||||
YGPositionTypeAbsolute,
|
||||
} YG_ENUM_END(YGPositionType);
|
||||
WIN_EXPORT const char *YGPositionTypeToString(const YGPositionType value);
|
||||
|
||||
#define YGPrintOptionsCount 3
|
||||
typedef YG_ENUM_BEGIN(YGPrintOptions) {
|
||||
@@ -116,6 +128,7 @@ typedef YG_ENUM_BEGIN(YGPrintOptions) {
|
||||
YGPrintOptionsStyle = 2,
|
||||
YGPrintOptionsChildren = 4,
|
||||
} YG_ENUM_END(YGPrintOptions);
|
||||
WIN_EXPORT const char *YGPrintOptionsToString(const YGPrintOptions value);
|
||||
|
||||
#define YGUnitCount 4
|
||||
typedef YG_ENUM_BEGIN(YGUnit) {
|
||||
@@ -124,6 +137,7 @@ typedef YG_ENUM_BEGIN(YGUnit) {
|
||||
YGUnitPercent,
|
||||
YGUnitAuto,
|
||||
} YG_ENUM_END(YGUnit);
|
||||
WIN_EXPORT const char *YGUnitToString(const YGUnit value);
|
||||
|
||||
#define YGWrapCount 3
|
||||
typedef YG_ENUM_BEGIN(YGWrap) {
|
||||
@@ -131,5 +145,6 @@ typedef YG_ENUM_BEGIN(YGWrap) {
|
||||
YGWrapWrap,
|
||||
YGWrapWrapReverse,
|
||||
} YG_ENUM_END(YGWrap);
|
||||
WIN_EXPORT const char *YGWrapToString(const YGWrap value);
|
||||
|
||||
YG_EXTERN_C_END
|
||||
|
Reference in New Issue
Block a user