From eae5cdfe686f8781d1410eab9a7ed7fc826d935b Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Fri, 16 May 2014 18:04:24 -0700 Subject: [PATCH] -Weverything and fix all the warnings --- Makefile | 2 +- lib/jasmine-2.0.0/jasmine_favicon.png | Bin 2057 -> 1371 bytes src/Layout-test-utils.c | 16 +- src/Layout.c | 78 +- src/Layout.h | 2 +- src/__tests__/Layout-test.c | 6658 ++++++++++++------------- src/transpile.html | 114 +- 7 files changed, 3365 insertions(+), 3505 deletions(-) mode change 100755 => 100644 lib/jasmine-2.0.0/jasmine_favicon.png diff --git a/Makefile b/Makefile index 00d64153..f7d26ec4 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ test: - @gcc src/__tests__/Layout-test.c src/Layout.c src/Layout-test-utils.c && ./a.out + @gcc -Weverything -Werror -Wno-padded src/__tests__/Layout-test.c src/Layout.c src/Layout-test-utils.c && ./a.out @rm a.out diff --git a/lib/jasmine-2.0.0/jasmine_favicon.png b/lib/jasmine-2.0.0/jasmine_favicon.png old mode 100755 new mode 100644 index 3562e278f108d0f6a918d198f21e055e601c7e71..30cf8d0ca52388e03be350b8e8f38e84b03675d6 GIT binary patch delta 1353 zcmV-P1-AN$5ZelnBYyx9bVXQnQ*UN;cVTj60B~++V{&zKXh3yI^8f$^1xZ9fR9M5M zS9^#RWfZ@?qqjs4=^aRl6-4%+sH|vv(5idC`Eb=tsWj*XQ4sX}9&>ls?#|5Jn^srK zM^uK?7Km=xo1)TE1nFr}Vuogt8AKc9?VPzYbI z^?JR~&JuIQ;Xad{z9W6#QSSsyeFuMkfwdFX*Ra+EOuAlCUcHj9Jg8l}BX01z-P1fr zR^fs@uY6&3d7H4AqtjpiXI@r(Eg_WYZ2p57*y=P)PL}#60i>pnG zxHu{kK=sDzVX$cMD4*qgoWF<^gErUG1(gaehiqn7RO~h(zJO5CD<_ z9{fS_{(o3_s8Bxu!)Jz8D%kTLDxD1=*a2;QS1FOO>jH)mw_% zfEwU)_u>Up790)a`y_9_$JOgewb6=T`ndu{1Ts4vHz6;eeqRn1Fv}?9GD8*#x%`{ZW@>Scw=>+_Va zQGYGE1B}kB&95C|zsF_+KyO3QYBdjF`H|GDM*v$1n`aqDp&~pc=fS%nSU*N2dK5ss z8!KJtRZ(3Ya*4?~PjYc`$ox=SbcYQVhZYj4Aq4O~c~By3T@$5e5P?Od*G=}Kc3gp% z5`h`^nLDY%^*NxLk3{VmQ>RI)28oSl3V+dv6_etlcw?pLURj=9J~IAY=K3s~l;F(_ z1Z|OS3+;G#4)Q)Z7Nuy6izWFE$ces*4jcnqoNnh0!!@rfJQl%#^L~q zjmek=9QC$2?C2X(6A^lV(r9S7qko>qu_}KoGXbOqT=d+!93rzYcPI@fAFBzWS`BoG zbF(hM4u~YqyqxQ6tgvI*t+gFWd&S*TVDne@_W>j%jH5`36x8OO315sSXO4(=n~( zhe@P*t8%*AR-ANka)STw!U-svlwPAEV~0Jfe~kETh|ML>Xq#&bCER{}oI*xj@PSqX zO2z=P9@gBXl>ZL^Ycf8s(N6Ue{6xoQgWr&F*_+t?uydmJkH+SI@TH@1<^JG300000 LNkvXXu0mjfU37=~ delta 2044 zcmV& zijKvfTC%$Wid1aFR2$ii+A1Wx?rx%@&1NNpLfWZ1g6QrB21_kem?Ba;0|mzpS}7H& zg-YZnkRK=6?7O$$ecAi=Wg&q(^Y)(Kd(J)Q+;i`el#*S{2!B5u9#z^+w=-gujL~$G zY^o$y3SG58C%(fZ<$fXAjw!~~yZi~ibusHgXJiLr^BSkHjP(>TdI$@Sy_iKI^9AJB z_IW)kpI-m8a&Fi$tOMad*jp<2GVJ)5&@LQyg^?MjC8MRa$-1?}iJjMhrmDuN1{dv! z&5S%nOOpI6Nq^c6-a#mL!a#LXzkwU>0Zr;0Fv3pS9%mr5&24<{=Km z=Y_A38U8-#m$`&C^8#aWzG71#I>TdO_ZYH(dV+7%{eRP?!Epgg%uL3YP>P-k35^@TyTo{qc5sdmsrWY3rDhF-=pPEwO%#viwl%aAGUk?hTJo_+SKxegW8<6*%J|&*Cg>PmgVU<`foq z5CzlLQWY+9^W3n?JCpPRXJT&kTjp1qXTEIqNq@l}25vVeRp32du8NfL)q!v^cK3i5 zM&4sJiDyp0AcezWCq;6>si$h=ll)mnM+dUKQvv-)~4z|z)5ma zLB#A$deY3e6LnmiRY)6TtWj{2Kl-iG1AKGLAK6Gm?PaWDclSvdDV@k(ILru_m9 z>3`8(lev&PL#gGfa&4PeVeLEPKMGd_H<@Q7@m6ADepY8%voCrLM=P$>i@^I`_U=L8 zg849AjzHAF^PNZKC;uy*z+1uD+IOO_7ralko@D$`$w1}=alX6RAKg&e!@p!iZ^8IN z$Xv<_=pH3on_BiaOm=N39BbdILY%97#(&;ZjO>`Bf$Tg98r4{I+t>;Gx9AN&gp=1Z z;x`PWy-RvW(GF}T3E8>$O5D1F(coIhq3WWVhg!JK1LW&Df;^~TyDrGsM@&uzs&2d? z1B%|@U`KPh8g^bdL@0-JkdXh;D15MO*f^I{l>?3eEPPrqvYl$aDy)H`v$rEpRe!j8 z)e#)8_z0caY5quoprd&dhBoQi@h5XvGiWEl8`PC@oN^$GG3F7u#-t=_-mdA#v_*X? zD*e*}ywYVUCG0U>cK(4ZzDscPViUI@FKs9`m? z1fIJj=8OCk;r&y;;S#z<5dSZ7^<3}ij^mJvIyNY4V~}tJ4u8n~nhAwl zY#3YNf^O8py;xYO0FPMk;hpErUe);|cR~Eu>}@#@^23yKsnZbkTQ~QN^s| z-j9nA{trMecX*OsL%P%xZhy#V3Pe!Q^ye&5l1G&Dg0IFZ?@ncjMn>|QAzDCsPjy7{ zjGy!fvEZmY_?t|c{OASqAU5FWkz5cDL>4%B7J%{E98K;GZZMB9u=%Crdhu zGI~TmWN;UZLkDy=37JDh6DGf|WNinY+-QD@5Sv+L9CiBMVBZG?D+QDFzeZW!1Z;Cx ziFiuOxo36nGhr+QZGVdpe0ptix!tVP#UwpEg(zO($P+zYy|&s;ne!%8S8wS@d>ahT z(t?t)-*=PvnR?l1ntR4Me+32nelStr=B8^{?c6rbm^zU zY7R7B&ZO9mg(~!7m@O!;my)-HQp^7Cq7MO86pKHi+weyrh>gs4GnMf%{o+3NOG)w1 zaX=AQ1Xhgo%Je#bcPl(^e2$8L51~7VaH^-8dQ(ioX}AV*Gx1%LC$Gw=wRrsGkj}fC ze_jW)K-?EygmwGj`SUHRWiBxP8=bNS9dYY$aw9sRl(M(rVjS#h>{hki3l2EF7ecGM zPl$EqU(C!%3Kw+1t=t@legm)DN?cIi#QB_x-Qj#oDTtj!9**Fz`98t<_9qi{pSkr$ ag8vVT*&*|bLTmv50000layout.dimensions[CSS_WIDTH] != b->layout.dimensions[CSS_WIDTH] || - a->layout.dimensions[CSS_HEIGHT] != b->layout.dimensions[CSS_HEIGHT] || - a->layout.position[CSS_TOP] != b->layout.position[CSS_TOP] || - a->layout.position[CSS_LEFT] != b->layout.position[CSS_LEFT] || - a->children_count != b->children_count) { +static bool eq(float a, float b) { + return fabs(a - b) < 0.0001; +} + +static bool are_layout_equal(css_node_t *a, css_node_t *b) { + if (!eq(a->layout.dimensions[CSS_WIDTH], b->layout.dimensions[CSS_WIDTH]) || + !eq(a->layout.dimensions[CSS_HEIGHT], b->layout.dimensions[CSS_HEIGHT]) || + !eq(a->layout.position[CSS_TOP], b->layout.position[CSS_TOP]) || + !eq(a->layout.position[CSS_LEFT], b->layout.position[CSS_LEFT]) || + !eq(a->children_count, b->children_count)) { return false; } for (int i = 0; i < a->children_count; ++i) { diff --git a/src/Layout.c b/src/Layout.c index 99343304..069e52c3 100644 --- a/src/Layout.c +++ b/src/Layout.c @@ -6,7 +6,11 @@ #include "Layout.h" -void init_css_node(css_node_t *node) { +static bool eq(float a, float b) { + return fabs(a - b) < 0.0001; +} + +static void init_css_node(css_node_t *node) { node->style.align_items = CSS_ALIGN_FLEX_START; // Some of the fields default to undefined and not 0 @@ -29,14 +33,14 @@ css_node_t *new_css_node() { } void init_css_node_children(css_node_t *node, int children_count) { - node->children = calloc(children_count, sizeof(css_node_t)); + node->children = calloc((unsigned long)children_count, sizeof(css_node_t)); for (int i = 0; i < children_count; ++i) { init_css_node(&node->children[i]); } node->children_count = children_count; } -void cleanup_css_node(css_node_t *node) { +static void cleanup_css_node(css_node_t *node) { for (int i = 0; i < node->children_count; ++i) { cleanup_css_node(&node->children[i]); } @@ -48,29 +52,29 @@ void free_css_node(css_node_t *node) { free(node); } -void indent(int n) { +static void indent(int n) { for (int i = 0; i < n; ++i) { printf(" "); } } -void print_number_0(const char *str, float number) { - if (number != 0) { +static void print_number_0(const char *str, float number) { + if (!eq(number, 0)) { printf("%s: %g, ", str, number); } } -void print_number_nan(const char *str, float number) { +static void print_number_nan(const char *str, float number) { if (!isnan(number)) { printf("%s: %g, ", str, number); } } -bool four_equal(float four[4]) { +static bool four_equal(float four[4]) { return - four[0] == four[1] && - four[0] == four[2] && - four[0] == four[3]; + eq(four[0], four[1]) && + eq(four[0], four[2]) && + eq(four[0], four[3]); } void print_style(css_node_t *node, int level) { @@ -181,106 +185,106 @@ void print_layout(css_node_t *node, int level) { -int leading[2] = { +static css_position_t leading[2] = { /* CSS_FLEX_DIRECTION_COLUMN = */ CSS_TOP, /* CSS_FLEX_DIRECTION_ROW = */ CSS_LEFT }; -int trailing[2] = { +static css_position_t trailing[2] = { /* CSS_FLEX_DIRECTION_COLUMN = */ CSS_BOTTOM, /* CSS_FLEX_DIRECTION_ROW = */ CSS_RIGHT }; -int pos[2] = { +static css_position_t pos[2] = { /* CSS_FLEX_DIRECTION_COLUMN = */ CSS_TOP, /* CSS_FLEX_DIRECTION_ROW = */ CSS_LEFT }; -int dim[2] = { +static css_dimension_t dim[2] = { /* CSS_FLEX_DIRECTION_COLUMN = */ CSS_HEIGHT, /* CSS_FLEX_DIRECTION_ROW = */ CSS_WIDTH }; -bool isUndefined(float value) { +static bool isUndefined(float value) { return isnan(value); } -float getMargin(css_node_t *node, int location) { +static float getMargin(css_node_t *node, int location) { return node->style.margin[location]; } -float getPadding(css_node_t *node, int location) { +static float getPadding(css_node_t *node, int location) { if (node->style.padding[location] >= 0) { return node->style.padding[location]; } return 0; } -float getBorder(css_node_t *node, int location) { +static float getBorder(css_node_t *node, int location) { if (node->style.border[location] >= 0) { return node->style.border[location]; } return 0; } -float getPaddingAndBorder(css_node_t *node, int location) { +static float getPaddingAndBorder(css_node_t *node, int location) { return getPadding(node, location) + getBorder(node, location); } -float getMarginAxis(css_node_t *node, css_flex_direction_t axis) { +static float getMarginAxis(css_node_t *node, css_flex_direction_t axis) { return getMargin(node, leading[axis]) + getMargin(node, trailing[axis]); } -float getPaddingAndBorderAxis(css_node_t *node, css_flex_direction_t axis) { +static float getPaddingAndBorderAxis(css_node_t *node, css_flex_direction_t axis) { return getPaddingAndBorder(node, leading[axis]) + getPaddingAndBorder(node, trailing[axis]); } -css_position_type_t getPositionType(css_node_t *node) { +static css_position_type_t getPositionType(css_node_t *node) { return node->style.position_type; } -css_justify_t getJustifyContent(css_node_t *node) { +static css_justify_t getJustifyContent(css_node_t *node) { return node->style.justify_content; } -css_align_t getAlignItem(css_node_t *node, css_node_t *child) { +static css_align_t getAlignItem(css_node_t *node, css_node_t *child) { if (child->style.align_self != CSS_ALIGN_AUTO) { return child->style.align_self; } return node->style.align_items; } -css_flex_direction_t getFlexDirection(css_node_t *node) { +static css_flex_direction_t getFlexDirection(css_node_t *node) { return node->style.flex_direction; } -css_flex_t getFlex(css_node_t *node) { +static css_flex_t getFlex(css_node_t *node) { return node->style.flex; } -bool isFlex(css_node_t *node) { +static bool isFlex(css_node_t *node) { return getPositionType(node) == CSS_POSITION_RELATIVE && getFlex(node); } -float getDimWithMargin(css_node_t *node, css_flex_direction_t axis) { +static float getDimWithMargin(css_node_t *node, css_flex_direction_t axis) { return node->layout.dimensions[dim[axis]] + getMargin(node, leading[axis]) + getMargin(node, trailing[axis]); } -bool isDimDefined(css_node_t *node, css_flex_direction_t axis) { +static bool isDimDefined(css_node_t *node, css_flex_direction_t axis) { return !isUndefined(node->style.dimensions[dim[axis]]); } -bool isPosDefined(css_node_t *node, css_position_t pos) { - return !isUndefined(node->style.position[pos]); +static bool isPosDefined(css_node_t *node, css_position_t position) { + return !isUndefined(node->style.position[position]); } -bool isMeasureDefined(css_node_t *node) { +static bool isMeasureDefined(css_node_t *node) { return node->style.measure; } -float getPosition(css_node_t *node, css_position_t pos) { - float result = node->style.position[pos]; +static float getPosition(css_node_t *node, css_position_t position) { + float result = node->style.position[position]; if (!isUndefined(result)) { return result; } @@ -288,7 +292,7 @@ float getPosition(css_node_t *node, css_position_t pos) { } // When the user specifically sets a value for width or height -void setDimensionFromStyle(css_node_t *node, css_flex_direction_t axis) { +static void setDimensionFromStyle(css_node_t *node, css_flex_direction_t axis) { // The parent already computed us a width or height. We just skip it if (!isUndefined(node->layout.dimensions[dim[axis]])) { return; @@ -307,7 +311,7 @@ void setDimensionFromStyle(css_node_t *node, css_flex_direction_t axis) { // If both left and right are defined, then use left. Otherwise return // +left or -right depending on which is defined. -float getRelativePosition(css_node_t *node, css_flex_direction_t axis) { +static float getRelativePosition(css_node_t *node, css_flex_direction_t axis) { float lead = node->style.position[leading[axis]]; if (!isUndefined(lead)) { return lead; diff --git a/src/Layout.h b/src/Layout.h index 45fd9277..bf56d67c 100644 --- a/src/Layout.h +++ b/src/Layout.h @@ -103,7 +103,7 @@ typedef struct css_node { // Lifecycle of nodes and children -css_node_t *new_css_node(); +css_node_t *new_css_node(void); void init_css_node_children(css_node_t *node, int children_count); void free_css_node(css_node_t *node); diff --git a/src/__tests__/Layout-test.c b/src/__tests__/Layout-test.c index 8fd01d2a..a21865eb 100644 --- a/src/__tests__/Layout-test.c +++ b/src/__tests__/Layout-test.c @@ -7,18 +7,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 200; + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 100; + node_0->style.dimensions[CSS_HEIGHT] = 200; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 200; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 100; + node_0->layout.dimensions[CSS_HEIGHT] = 200; } test("should layout a single node with width and height", root_node, root_layout); @@ -27,51 +27,49 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 3); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 3); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 500; - node->style.dimensions[CSS_HEIGHT] = 500; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 250; - node->style.dimensions[CSS_HEIGHT] = 250; - node = &outer_node_1->children[2]; - node->style.dimensions[CSS_WIDTH] = 125; - node->style.dimensions[CSS_HEIGHT] = 125; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 500; + node_1->style.dimensions[CSS_HEIGHT] = 500; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 250; + node_1->style.dimensions[CSS_HEIGHT] = 250; + node_1 = &node_0->children[2]; + node_1->style.dimensions[CSS_WIDTH] = 125; + node_1->style.dimensions[CSS_HEIGHT] = 125; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 3); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 3); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 500; - node->layout.dimensions[CSS_HEIGHT] = 500; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 500; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 250; - node->layout.dimensions[CSS_HEIGHT] = 250; - node = &outer_node_1->children[2]; - node->layout.position[CSS_TOP] = 750; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 125; - node->layout.dimensions[CSS_HEIGHT] = 125; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 500; + node_1->layout.dimensions[CSS_HEIGHT] = 500; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 500; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 250; + node_1->layout.dimensions[CSS_HEIGHT] = 250; + node_1 = &node_0->children[2]; + node_1->layout.position[CSS_TOP] = 750; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 125; + node_1->layout.dimensions[CSS_HEIGHT] = 125; } } @@ -81,68 +79,64 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 500; - node->style.dimensions[CSS_HEIGHT] = 500; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 500; - node->style.dimensions[CSS_HEIGHT] = 500; - init_css_node_children(node, 2); + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 500; + node_1->style.dimensions[CSS_HEIGHT] = 500; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 500; + node_1->style.dimensions[CSS_HEIGHT] = 500; + init_css_node_children(node_1, 2); { - css_node_t *outer_node_2 = node; - css_node_t *node; - node = &outer_node_2->children[0]; - node->style.dimensions[CSS_WIDTH] = 250; - node->style.dimensions[CSS_HEIGHT] = 250; - node = &outer_node_2->children[1]; - node->style.dimensions[CSS_WIDTH] = 250; - node->style.dimensions[CSS_HEIGHT] = 250; + css_node_t *node_2; + node_2 = &node_1->children[0]; + node_2->style.dimensions[CSS_WIDTH] = 250; + node_2->style.dimensions[CSS_HEIGHT] = 250; + node_2 = &node_1->children[1]; + node_2->style.dimensions[CSS_WIDTH] = 250; + node_2->style.dimensions[CSS_HEIGHT] = 250; } } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 500; - node->layout.dimensions[CSS_HEIGHT] = 500; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 500; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 500; - node->layout.dimensions[CSS_HEIGHT] = 500; - init_css_node_children(node, 2); + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 500; + node_1->layout.dimensions[CSS_HEIGHT] = 500; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 500; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 500; + node_1->layout.dimensions[CSS_HEIGHT] = 500; + init_css_node_children(node_1, 2); { - css_node_t *outer_node_2 = node; - css_node_t *node; - node = &outer_node_2->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 250; - node->layout.dimensions[CSS_HEIGHT] = 250; - node = &outer_node_2->children[1]; - node->layout.position[CSS_TOP] = 250; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 250; - node->layout.dimensions[CSS_HEIGHT] = 250; + css_node_t *node_2; + node_2 = &node_1->children[0]; + node_2->layout.position[CSS_TOP] = 0; + node_2->layout.position[CSS_LEFT] = 0; + node_2->layout.dimensions[CSS_WIDTH] = 250; + node_2->layout.dimensions[CSS_HEIGHT] = 250; + node_2 = &node_1->children[1]; + node_2->layout.position[CSS_TOP] = 250; + node_2->layout.position[CSS_LEFT] = 0; + node_2->layout.dimensions[CSS_WIDTH] = 250; + node_2->layout.dimensions[CSS_HEIGHT] = 250; } } } @@ -153,22 +147,22 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 200; - node->style.margin[CSS_LEFT] = 10; - node->style.margin[CSS_TOP] = 10; - node->style.margin[CSS_RIGHT] = 10; - node->style.margin[CSS_BOTTOM] = 10; + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 100; + node_0->style.dimensions[CSS_HEIGHT] = 200; + node_0->style.margin[CSS_LEFT] = 10; + node_0->style.margin[CSS_TOP] = 10; + node_0->style.margin[CSS_RIGHT] = 10; + node_0->style.margin[CSS_BOTTOM] = 10; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = 10; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 200; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 10; + node_0->layout.position[CSS_LEFT] = 10; + node_0->layout.dimensions[CSS_WIDTH] = 100; + node_0->layout.dimensions[CSS_HEIGHT] = 200; } test("should layout node with margin", root_node, root_layout); @@ -177,67 +171,65 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - node->style.margin[CSS_LEFT] = 10; - node->style.margin[CSS_TOP] = 10; - node->style.margin[CSS_RIGHT] = 10; - node->style.margin[CSS_BOTTOM] = 10; - init_css_node_children(node, 3); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + node_0->style.margin[CSS_LEFT] = 10; + node_0->style.margin[CSS_TOP] = 10; + node_0->style.margin[CSS_RIGHT] = 10; + node_0->style.margin[CSS_BOTTOM] = 10; + init_css_node_children(node_0, 3); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; - node->style.margin[CSS_LEFT] = 50; - node->style.margin[CSS_TOP] = 50; - node->style.margin[CSS_RIGHT] = 50; - node->style.margin[CSS_BOTTOM] = 50; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; - node->style.margin[CSS_LEFT] = 25; - node->style.margin[CSS_TOP] = 25; - node->style.margin[CSS_RIGHT] = 25; - node->style.margin[CSS_BOTTOM] = 25; - node = &outer_node_1->children[2]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; - node->style.margin[CSS_LEFT] = 10; - node->style.margin[CSS_TOP] = 10; - node->style.margin[CSS_RIGHT] = 10; - node->style.margin[CSS_BOTTOM] = 10; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1->style.margin[CSS_LEFT] = 50; + node_1->style.margin[CSS_TOP] = 50; + node_1->style.margin[CSS_RIGHT] = 50; + node_1->style.margin[CSS_BOTTOM] = 50; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1->style.margin[CSS_LEFT] = 25; + node_1->style.margin[CSS_TOP] = 25; + node_1->style.margin[CSS_RIGHT] = 25; + node_1->style.margin[CSS_BOTTOM] = 25; + node_1 = &node_0->children[2]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1->style.margin[CSS_LEFT] = 10; + node_1->style.margin[CSS_TOP] = 10; + node_1->style.margin[CSS_RIGHT] = 10; + node_1->style.margin[CSS_BOTTOM] = 10; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = 10; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 3); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 10; + node_0->layout.position[CSS_LEFT] = 10; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 3); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 50; - node->layout.position[CSS_LEFT] = 50; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 225; - node->layout.position[CSS_LEFT] = 25; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[2]; - node->layout.position[CSS_TOP] = 360; - node->layout.position[CSS_LEFT] = 10; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 50; + node_1->layout.position[CSS_LEFT] = 50; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 225; + node_1->layout.position[CSS_LEFT] = 25; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[2]; + node_1->layout.position[CSS_TOP] = 360; + node_1->layout.position[CSS_LEFT] = 10; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -247,44 +239,42 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 200; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 300; - node->style.dimensions[CSS_HEIGHT] = 150; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 200; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 300; + node_1->style.dimensions[CSS_HEIGHT] = 150; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 200; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 100; - node->layout.dimensions[CSS_WIDTH] = 300; - node->layout.dimensions[CSS_HEIGHT] = 150; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 200; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 100; + node_1->layout.dimensions[CSS_WIDTH] = 300; + node_1->layout.dimensions[CSS_HEIGHT] = 150; } } @@ -294,42 +284,40 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 300; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 300; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 200; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 300; - node->style.dimensions[CSS_HEIGHT] = 150; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 200; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 300; + node_1->style.dimensions[CSS_HEIGHT] = 150; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 300; - node->layout.dimensions[CSS_HEIGHT] = 350; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 300; + node_0->layout.dimensions[CSS_HEIGHT] = 350; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 200; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 200; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 300; - node->layout.dimensions[CSS_HEIGHT] = 150; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 200; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 200; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 300; + node_1->layout.dimensions[CSS_HEIGHT] = 150; } } @@ -339,43 +327,41 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 200; - node = &outer_node_1->children[1]; - node->style.flex = CSS_FLEX_ONE; - node->style.dimensions[CSS_WIDTH] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 200; + node_1 = &node_0->children[1]; + node_1->style.flex = CSS_FLEX_ONE; + node_1->style.dimensions[CSS_WIDTH] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 200; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 200; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 800; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 200; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 200; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 800; } } @@ -385,30 +371,27 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex = CSS_FLEX_ONE; - node->style.dimensions[CSS_WIDTH] = 1000; - init_css_node_children(node, 1); + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex = CSS_FLEX_ONE; + node_1->style.dimensions[CSS_WIDTH] = 1000; + init_css_node_children(node_1, 1); { - css_node_t *outer_node_2 = node; - css_node_t *node; - node = &outer_node_2->children[0]; - node->style.flex = CSS_FLEX_ONE; - node->style.dimensions[CSS_WIDTH] = 1000; - init_css_node_children(node, 1); + css_node_t *node_2; + node_2 = &node_1->children[0]; + node_2->style.flex = CSS_FLEX_ONE; + node_2->style.dimensions[CSS_WIDTH] = 1000; + init_css_node_children(node_2, 1); { - css_node_t *outer_node_3 = node; - css_node_t *node; - node = &outer_node_3->children[0]; - node->style.flex = CSS_FLEX_ONE; - node->style.dimensions[CSS_WIDTH] = 1000; + css_node_t *node_3; + node_3 = &node_2->children[0]; + node_3->style.flex = CSS_FLEX_ONE; + node_3->style.dimensions[CSS_WIDTH] = 1000; } } } @@ -416,38 +399,35 @@ int main() css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 1); + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 1000; + node_1->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_1, 1); { - css_node_t *outer_node_2 = node; - css_node_t *node; - node = &outer_node_2->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 1); + css_node_t *node_2; + node_2 = &node_1->children[0]; + node_2->layout.position[CSS_TOP] = 0; + node_2->layout.position[CSS_LEFT] = 0; + node_2->layout.dimensions[CSS_WIDTH] = 1000; + node_2->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_2, 1); { - css_node_t *outer_node_3 = node; - css_node_t *node; - node = &outer_node_3->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; + css_node_t *node_3; + node_3 = &node_2->children[0]; + node_3->layout.position[CSS_TOP] = 0; + node_3->layout.position[CSS_LEFT] = 0; + node_3->layout.dimensions[CSS_WIDTH] = 1000; + node_3->layout.dimensions[CSS_HEIGHT] = 1000; } } } @@ -459,49 +439,47 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - node->style.margin[CSS_LEFT] = 5; - node->style.margin[CSS_TOP] = 10; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + node_0->style.margin[CSS_LEFT] = 5; + node_0->style.margin[CSS_TOP] = 10; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; - node->style.margin[CSS_LEFT] = 15; - node->style.margin[CSS_TOP] = 50; - node->style.margin[CSS_BOTTOM] = 20; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; - node->style.margin[CSS_LEFT] = 30; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1->style.margin[CSS_LEFT] = 15; + node_1->style.margin[CSS_TOP] = 50; + node_1->style.margin[CSS_BOTTOM] = 20; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1->style.margin[CSS_LEFT] = 30; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = 5; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 10; + node_0->layout.position[CSS_LEFT] = 5; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 50; - node->layout.position[CSS_LEFT] = 15; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 170; - node->layout.position[CSS_LEFT] = 30; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 50; + node_1->layout.position[CSS_LEFT] = 15; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 170; + node_1->layout.position[CSS_LEFT] = 30; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -511,44 +489,42 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_START; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 100; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 100; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -558,44 +534,42 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 800; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 900; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 800; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 900; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -605,44 +579,42 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 900; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 900; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -652,44 +624,42 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 200; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 700; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 200; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 700; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -699,44 +669,42 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_CENTER; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_CENTER; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 400; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 500; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 400; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 500; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -746,36 +714,34 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex = CSS_FLEX_ONE; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex = CSS_FLEX_ONE; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 1000; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 1000; } } @@ -785,44 +751,42 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_FLEX_START; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_FLEX_START; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 200; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 200; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 200; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 100; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 200; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 100; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -832,44 +796,42 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_CENTER; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 200; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 200; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 400; - node->layout.dimensions[CSS_WIDTH] = 200; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 100; - node->layout.position[CSS_LEFT] = 450; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 400; + node_1->layout.dimensions[CSS_WIDTH] = 200; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 100; + node_1->layout.position[CSS_LEFT] = 450; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -879,44 +841,42 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_FLEX_END; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_FLEX_END; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 200; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 200; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 800; - node->layout.dimensions[CSS_WIDTH] = 200; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 100; - node->layout.position[CSS_LEFT] = 900; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 800; + node_1->layout.dimensions[CSS_WIDTH] = 200; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 100; + node_1->layout.position[CSS_LEFT] = 900; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -926,45 +886,43 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_FLEX_END; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_FLEX_END; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_WIDTH] = 200; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.align_self = CSS_ALIGN_CENTER; - node->style.dimensions[CSS_WIDTH] = 100; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_WIDTH] = 200; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.align_self = CSS_ALIGN_CENTER; + node_1->style.dimensions[CSS_WIDTH] = 100; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 800; - node->layout.dimensions[CSS_WIDTH] = 200; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 100; - node->layout.position[CSS_LEFT] = 450; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 800; + node_1->layout.dimensions[CSS_WIDTH] = 200; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 100; + node_1->layout.position[CSS_LEFT] = 450; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -974,35 +932,33 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_STRETCH; - node->style.dimensions[CSS_WIDTH] = 1000; - node->style.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_STRETCH; + node_0->style.dimensions[CSS_WIDTH] = 1000; + node_0->style.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_HEIGHT] = 100; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 1000; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1000; + node_0->layout.dimensions[CSS_HEIGHT] = 1000; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1000; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 1000; + node_1->layout.dimensions[CSS_HEIGHT] = 100; } } @@ -1012,31 +968,29 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; + css_node_t *node_1; + node_1 = &node_0->children[0]; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1046,35 +1000,33 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.margin[CSS_LEFT] = 5; - node->style.margin[CSS_TOP] = 5; - node->style.margin[CSS_RIGHT] = 5; - node->style.margin[CSS_BOTTOM] = 5; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.margin[CSS_LEFT] = 5; + node_1->style.margin[CSS_TOP] = 5; + node_1->style.margin[CSS_RIGHT] = 5; + node_1->style.margin[CSS_BOTTOM] = 5; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 10; - node->layout.dimensions[CSS_HEIGHT] = 10; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 10; + node_0->layout.dimensions[CSS_HEIGHT] = 10; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 5; - node->layout.position[CSS_LEFT] = 5; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 5; + node_1->layout.position[CSS_LEFT] = 5; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1084,40 +1036,38 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_HEIGHT] = 100; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_HEIGHT] = 100; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.dimensions[CSS_HEIGHT] = 200; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.dimensions[CSS_HEIGHT] = 200; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 100; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 100; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 100; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 200; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 100; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 200; } } @@ -1127,17 +1077,17 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_CENTER; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_CENTER; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("should layout for center", root_node, root_layout); @@ -1146,34 +1096,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.dimensions[CSS_HEIGHT] = 100; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.dimensions[CSS_HEIGHT] = 100; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.margin[CSS_TOP] = 10; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.margin[CSS_TOP] = 10; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 100; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 100; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 100; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 100; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1183,58 +1131,54 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.align_items = CSS_ALIGN_FLEX_END; - init_css_node_children(node, 2); + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.align_items = CSS_ALIGN_FLEX_END; + init_css_node_children(node_1, 2); { - css_node_t *outer_node_2 = node; - css_node_t *node; - node = &outer_node_2->children[0]; - node->style.margin[CSS_LEFT] = 10; - node->style.margin[CSS_TOP] = 10; - node->style.margin[CSS_RIGHT] = 10; - node->style.margin[CSS_BOTTOM] = 10; - node = &outer_node_2->children[1]; - node->style.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_2; + node_2 = &node_1->children[0]; + node_2->style.margin[CSS_LEFT] = 10; + node_2->style.margin[CSS_TOP] = 10; + node_2->style.margin[CSS_RIGHT] = 10; + node_2->style.margin[CSS_BOTTOM] = 10; + node_2 = &node_1->children[1]; + node_2->style.dimensions[CSS_HEIGHT] = 100; } } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 20; - node->layout.dimensions[CSS_HEIGHT] = 120; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 20; + node_0->layout.dimensions[CSS_HEIGHT] = 120; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 20; - node->layout.dimensions[CSS_HEIGHT] = 120; - init_css_node_children(node, 2); + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 20; + node_1->layout.dimensions[CSS_HEIGHT] = 120; + init_css_node_children(node_1, 2); { - css_node_t *outer_node_2 = node; - css_node_t *node; - node = &outer_node_2->children[0]; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = 10; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; - node = &outer_node_2->children[1]; - node->layout.position[CSS_TOP] = 20; - node->layout.position[CSS_LEFT] = 20; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 100; + css_node_t *node_2; + node_2 = &node_1->children[0]; + node_2->layout.position[CSS_TOP] = 10; + node_2->layout.position[CSS_LEFT] = 10; + node_2->layout.dimensions[CSS_WIDTH] = 0; + node_2->layout.dimensions[CSS_HEIGHT] = 0; + node_2 = &node_1->children[1]; + node_2->layout.position[CSS_TOP] = 20; + node_2->layout.position[CSS_LEFT] = 20; + node_2->layout.dimensions[CSS_WIDTH] = 0; + node_2->layout.dimensions[CSS_HEIGHT] = 100; } } } @@ -1245,32 +1189,30 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex = CSS_FLEX_ONE; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex = CSS_FLEX_ONE; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1280,33 +1222,31 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_STRETCH; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_STRETCH; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.margin[CSS_LEFT] = 10; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.margin[CSS_LEFT] = 10; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 10; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 10; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 10; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 10; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1316,20 +1256,20 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.padding[CSS_LEFT] = 5; - node->style.padding[CSS_TOP] = 5; - node->style.padding[CSS_RIGHT] = 5; - node->style.padding[CSS_BOTTOM] = 5; + css_node_t *node_0 = root_node; + node_0->style.padding[CSS_LEFT] = 5; + node_0->style.padding[CSS_TOP] = 5; + node_0->style.padding[CSS_RIGHT] = 5; + node_0->style.padding[CSS_BOTTOM] = 5; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 10; - node->layout.dimensions[CSS_HEIGHT] = 10; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 10; + node_0->layout.dimensions[CSS_HEIGHT] = 10; } test("should layout node with padding", root_node, root_layout); @@ -1338,35 +1278,33 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.padding[CSS_LEFT] = 5; - node->style.padding[CSS_TOP] = 5; - node->style.padding[CSS_RIGHT] = 5; - node->style.padding[CSS_BOTTOM] = 5; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.padding[CSS_LEFT] = 5; + node_0->style.padding[CSS_TOP] = 5; + node_0->style.padding[CSS_RIGHT] = 5; + node_0->style.padding[CSS_BOTTOM] = 5; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; + css_node_t *node_1; + node_1 = &node_0->children[0]; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 10; - node->layout.dimensions[CSS_HEIGHT] = 10; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 10; + node_0->layout.dimensions[CSS_HEIGHT] = 10; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 5; - node->layout.position[CSS_LEFT] = 5; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 5; + node_1->layout.position[CSS_LEFT] = 5; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1376,39 +1314,37 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.padding[CSS_LEFT] = 5; - node->style.padding[CSS_TOP] = 5; - node->style.padding[CSS_RIGHT] = 5; - node->style.padding[CSS_BOTTOM] = 5; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.padding[CSS_LEFT] = 5; + node_0->style.padding[CSS_TOP] = 5; + node_0->style.padding[CSS_RIGHT] = 5; + node_0->style.padding[CSS_BOTTOM] = 5; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.margin[CSS_LEFT] = 5; - node->style.margin[CSS_TOP] = 5; - node->style.margin[CSS_RIGHT] = 5; - node->style.margin[CSS_BOTTOM] = 5; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.margin[CSS_LEFT] = 5; + node_1->style.margin[CSS_TOP] = 5; + node_1->style.margin[CSS_RIGHT] = 5; + node_1->style.margin[CSS_BOTTOM] = 5; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 20; - node->layout.dimensions[CSS_HEIGHT] = 20; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 20; + node_0->layout.dimensions[CSS_HEIGHT] = 20; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = 10; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 10; + node_1->layout.position[CSS_LEFT] = 10; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1418,36 +1354,34 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.align_self = CSS_ALIGN_STRETCH; - node->style.padding[CSS_LEFT] = 10; - node->style.padding[CSS_TOP] = 10; - node->style.padding[CSS_RIGHT] = 10; - node->style.padding[CSS_BOTTOM] = 10; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.align_self = CSS_ALIGN_STRETCH; + node_1->style.padding[CSS_LEFT] = 10; + node_1->style.padding[CSS_TOP] = 10; + node_1->style.padding[CSS_RIGHT] = 10; + node_1->style.padding[CSS_BOTTOM] = 10; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 20; - node->layout.dimensions[CSS_HEIGHT] = 20; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 20; + node_0->layout.dimensions[CSS_HEIGHT] = 20; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 20; - node->layout.dimensions[CSS_HEIGHT] = 20; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 20; + node_1->layout.dimensions[CSS_HEIGHT] = 20; } } @@ -1457,40 +1391,38 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.padding[CSS_LEFT] = 50; - node->style.padding[CSS_TOP] = 50; - node->style.padding[CSS_RIGHT] = 50; - node->style.padding[CSS_BOTTOM] = 50; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.padding[CSS_LEFT] = 50; + node_0->style.padding[CSS_TOP] = 50; + node_0->style.padding[CSS_RIGHT] = 50; + node_0->style.padding[CSS_BOTTOM] = 50; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.align_self = CSS_ALIGN_STRETCH; - node->style.padding[CSS_LEFT] = 10; - node->style.padding[CSS_TOP] = 10; - node->style.padding[CSS_RIGHT] = 10; - node->style.padding[CSS_BOTTOM] = 10; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.align_self = CSS_ALIGN_STRETCH; + node_1->style.padding[CSS_LEFT] = 10; + node_1->style.padding[CSS_TOP] = 10; + node_1->style.padding[CSS_RIGHT] = 10; + node_1->style.padding[CSS_BOTTOM] = 10; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 120; - node->layout.dimensions[CSS_HEIGHT] = 120; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 120; + node_0->layout.dimensions[CSS_HEIGHT] = 120; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 50; - node->layout.position[CSS_LEFT] = 50; - node->layout.dimensions[CSS_WIDTH] = 20; - node->layout.dimensions[CSS_HEIGHT] = 20; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 50; + node_1->layout.position[CSS_LEFT] = 50; + node_1->layout.dimensions[CSS_WIDTH] = 20; + node_1->layout.dimensions[CSS_HEIGHT] = 20; } } @@ -1500,51 +1432,47 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.align_self = CSS_ALIGN_STRETCH; - init_css_node_children(node, 1); + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.align_self = CSS_ALIGN_STRETCH; + init_css_node_children(node_1, 1); { - css_node_t *outer_node_2 = node; - css_node_t *node; - node = &outer_node_2->children[0]; - node->style.margin[CSS_LEFT] = 16; - node->style.margin[CSS_TOP] = 16; - node->style.margin[CSS_RIGHT] = 16; - node->style.margin[CSS_BOTTOM] = 16; + css_node_t *node_2; + node_2 = &node_1->children[0]; + node_2->style.margin[CSS_LEFT] = 16; + node_2->style.margin[CSS_TOP] = 16; + node_2->style.margin[CSS_RIGHT] = 16; + node_2->style.margin[CSS_BOTTOM] = 16; } } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 32; - node->layout.dimensions[CSS_HEIGHT] = 32; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 32; + node_0->layout.dimensions[CSS_HEIGHT] = 32; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 32; - node->layout.dimensions[CSS_HEIGHT] = 32; - init_css_node_children(node, 1); + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 32; + node_1->layout.dimensions[CSS_HEIGHT] = 32; + init_css_node_children(node_1, 1); { - css_node_t *outer_node_2 = node; - css_node_t *node; - node = &outer_node_2->children[0]; - node->layout.position[CSS_TOP] = 16; - node->layout.position[CSS_LEFT] = 16; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_2; + node_2 = &node_1->children[0]; + node_2->layout.position[CSS_TOP] = 16; + node_2->layout.position[CSS_LEFT] = 16; + node_2->layout.dimensions[CSS_WIDTH] = 0; + node_2->layout.dimensions[CSS_HEIGHT] = 0; } } } @@ -1555,18 +1483,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.position[CSS_LEFT] = 5; - node->style.position[CSS_TOP] = 5; + css_node_t *node_0 = root_node; + node_0->style.position[CSS_LEFT] = 5; + node_0->style.position[CSS_TOP] = 5; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 5; - node->layout.position[CSS_LEFT] = 5; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 5; + node_0->layout.position[CSS_LEFT] = 5; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("should layout node with top and left", root_node, root_layout); @@ -1575,34 +1503,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.dimensions[CSS_HEIGHT] = 10; - node->style.padding[CSS_TOP] = 5; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.dimensions[CSS_HEIGHT] = 10; + node_0->style.padding[CSS_TOP] = 5; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; + css_node_t *node_1; + node_1 = &node_0->children[0]; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 10; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 10; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 7.5; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 7.5; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1612,17 +1538,17 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.position[CSS_BOTTOM] = 5; + css_node_t *node_0 = root_node; + node_0->style.position[CSS_BOTTOM] = 5; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -5; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -5; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("should layout node with bottom", root_node, root_layout); @@ -1631,18 +1557,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.position[CSS_TOP] = 10; - node->style.position[CSS_BOTTOM] = 5; + css_node_t *node_0 = root_node; + node_0->style.position[CSS_TOP] = 10; + node_0->style.position[CSS_BOTTOM] = 5; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 10; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("should layout node with both top and bottom", root_node, root_layout); @@ -1651,49 +1577,47 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.dimensions[CSS_WIDTH] = 500; - init_css_node_children(node, 3); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.dimensions[CSS_WIDTH] = 500; + init_css_node_children(node_0, 3); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex = CSS_FLEX_ONE; - node = &outer_node_1->children[1]; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.dimensions[CSS_WIDTH] = 50; - node = &outer_node_1->children[2]; - node->style.flex = CSS_FLEX_ONE; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex = CSS_FLEX_ONE; + node_1 = &node_0->children[1]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.dimensions[CSS_WIDTH] = 50; + node_1 = &node_0->children[2]; + node_1->style.flex = CSS_FLEX_ONE; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 500; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 3); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 500; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 3); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 250; - node->layout.dimensions[CSS_HEIGHT] = 0; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 250; - node->layout.dimensions[CSS_WIDTH] = 50; - node->layout.dimensions[CSS_HEIGHT] = 0; - node = &outer_node_1->children[2]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 250; - node->layout.dimensions[CSS_WIDTH] = 250; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 250; + node_1->layout.dimensions[CSS_HEIGHT] = 0; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 250; + node_1->layout.dimensions[CSS_WIDTH] = 50; + node_1->layout.dimensions[CSS_HEIGHT] = 0; + node_1 = &node_0->children[2]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 250; + node_1->layout.dimensions[CSS_WIDTH] = 250; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1703,33 +1627,31 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.margin[CSS_RIGHT] = 15; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.margin[CSS_RIGHT] = 15; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1739,34 +1661,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.align_self = CSS_ALIGN_CENTER; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.padding[CSS_RIGHT] = 12; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.align_self = CSS_ALIGN_CENTER; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.padding[CSS_RIGHT] = 12; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 12; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 12; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1776,18 +1696,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_HEIGHT] = 5; - node->style.padding[CSS_BOTTOM] = 20; + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_HEIGHT] = 5; + node_0->style.padding[CSS_BOTTOM] = 20; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 20; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 20; } test("should work with height smaller than paddingBottom", root_node, root_layout); @@ -1796,18 +1716,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 5; - node->style.padding[CSS_LEFT] = 20; + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 5; + node_0->style.padding[CSS_LEFT] = 20; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 20; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 20; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("should work with width smaller than paddingLeft", root_node, root_layout); @@ -1816,56 +1736,52 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - init_css_node_children(node, 1); + css_node_t *node_1; + node_1 = &node_0->children[0]; + init_css_node_children(node_1, 1); { - css_node_t *outer_node_2 = node; - css_node_t *node; - node = &outer_node_2->children[0]; - node->style.dimensions[CSS_WIDTH] = 400; + css_node_t *node_2; + node_2 = &node_1->children[0]; + node_2->style.dimensions[CSS_WIDTH] = 400; } - node = &outer_node_1->children[1]; - node->style.align_self = CSS_ALIGN_STRETCH; - node->style.dimensions[CSS_WIDTH] = 200; + node_1 = &node_0->children[1]; + node_1->style.align_self = CSS_ALIGN_STRETCH; + node_1->style.dimensions[CSS_WIDTH] = 200; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 400; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 400; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 400; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 400; + node_1->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_1, 1); { - css_node_t *outer_node_2 = node; - css_node_t *node; - node = &outer_node_2->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 400; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_2; + node_2 = &node_1->children[0]; + node_2->layout.position[CSS_TOP] = 0; + node_2->layout.position[CSS_LEFT] = 0; + node_2->layout.dimensions[CSS_WIDTH] = 400; + node_2->layout.dimensions[CSS_HEIGHT] = 0; } - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 200; - node->layout.dimensions[CSS_HEIGHT] = 0; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 200; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1875,36 +1791,34 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.padding[CSS_LEFT] = 5; - node->style.padding[CSS_TOP] = 5; - node->style.padding[CSS_RIGHT] = 5; - node->style.padding[CSS_BOTTOM] = 5; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.padding[CSS_LEFT] = 5; + node_0->style.padding[CSS_TOP] = 5; + node_0->style.padding[CSS_RIGHT] = 5; + node_0->style.padding[CSS_BOTTOM] = 5; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.position_type = CSS_POSITION_ABSOLUTE; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 10; - node->layout.dimensions[CSS_HEIGHT] = 10; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 10; + node_0->layout.dimensions[CSS_HEIGHT] = 10; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 5; - node->layout.position[CSS_LEFT] = 5; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 5; + node_1->layout.position[CSS_LEFT] = 5; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1914,41 +1828,39 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.position[CSS_LEFT] = 10; - node->style.position[CSS_TOP] = 10; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.position[CSS_LEFT] = 10; + node_1->style.position[CSS_TOP] = 10; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 100; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 100; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 100; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = 10; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 100; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 10; + node_1->layout.position[CSS_LEFT] = 10; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1958,37 +1870,35 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.padding[CSS_LEFT] = 20; - node->style.padding[CSS_TOP] = 20; - node->style.padding[CSS_RIGHT] = 20; - node->style.padding[CSS_BOTTOM] = 20; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.padding[CSS_LEFT] = 20; + node_0->style.padding[CSS_TOP] = 20; + node_0->style.padding[CSS_RIGHT] = 20; + node_0->style.padding[CSS_BOTTOM] = 20; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.position[CSS_LEFT] = 5; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.position[CSS_LEFT] = 5; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 40; - node->layout.dimensions[CSS_HEIGHT] = 40; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 40; + node_0->layout.dimensions[CSS_HEIGHT] = 40; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 20; - node->layout.position[CSS_LEFT] = 5; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 20; + node_1->layout.position[CSS_LEFT] = 5; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -1998,34 +1908,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.margin[CSS_TOP] = 5; - node->style.position[CSS_TOP] = 5; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.margin[CSS_TOP] = 5; + node_1->style.position[CSS_TOP] = 5; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 10; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2035,34 +1943,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.margin[CSS_LEFT] = 5; - node->style.position[CSS_LEFT] = 5; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.margin[CSS_LEFT] = 5; + node_1->style.position[CSS_LEFT] = 5; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 10; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 10; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2072,40 +1978,38 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.dimensions[CSS_HEIGHT] = 200; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.dimensions[CSS_HEIGHT] = 200; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node = &outer_node_1->children[1]; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1 = &node_0->children[1]; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 200; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 200; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 100; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 100; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 100; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 100; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2115,35 +2019,33 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.dimensions[CSS_WIDTH] = 700; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.dimensions[CSS_WIDTH] = 700; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex = CSS_FLEX_ONE; - node->style.margin[CSS_LEFT] = 5; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex = CSS_FLEX_ONE; + node_1->style.margin[CSS_LEFT] = 5; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 700; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 700; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 5; - node->layout.dimensions[CSS_WIDTH] = 695; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 5; + node_1->layout.dimensions[CSS_WIDTH] = 695; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2153,42 +2055,40 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.dimensions[CSS_WIDTH] = 700; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.dimensions[CSS_WIDTH] = 700; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex = CSS_FLEX_ONE; - node = &outer_node_1->children[1]; - node->style.flex = CSS_FLEX_ONE; - node->style.padding[CSS_RIGHT] = 5; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex = CSS_FLEX_ONE; + node_1 = &node_0->children[1]; + node_1->style.flex = CSS_FLEX_ONE; + node_1->style.padding[CSS_RIGHT] = 5; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 700; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 700; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 347.5; - node->layout.dimensions[CSS_HEIGHT] = 0; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 347.5; - node->layout.dimensions[CSS_WIDTH] = 352.5; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 347.5; + node_1->layout.dimensions[CSS_HEIGHT] = 0; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 347.5; + node_1->layout.dimensions[CSS_WIDTH] = 352.5; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2198,42 +2098,40 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.dimensions[CSS_WIDTH] = 700; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.dimensions[CSS_WIDTH] = 700; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex = CSS_FLEX_ONE; - node = &outer_node_1->children[1]; - node->style.flex = CSS_FLEX_ONE; - node->style.margin[CSS_LEFT] = 5; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex = CSS_FLEX_ONE; + node_1 = &node_0->children[1]; + node_1->style.flex = CSS_FLEX_ONE; + node_1->style.margin[CSS_LEFT] = 5; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 700; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 700; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 347.5; - node->layout.dimensions[CSS_HEIGHT] = 0; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 352.5; - node->layout.dimensions[CSS_WIDTH] = 347.5; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 347.5; + node_1->layout.dimensions[CSS_HEIGHT] = 0; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 352.5; + node_1->layout.dimensions[CSS_WIDTH] = 347.5; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2243,40 +2141,38 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_HEIGHT] = 300; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_HEIGHT] = 300; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.dimensions[CSS_HEIGHT] = 600; - node = &outer_node_1->children[1]; - node->style.flex = CSS_FLEX_ONE; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.dimensions[CSS_HEIGHT] = 600; + node_1 = &node_0->children[1]; + node_1->style.flex = CSS_FLEX_ONE; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 300; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 300; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 600; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 600; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 600; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 600; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2286,35 +2182,33 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.dimensions[CSS_WIDTH] = 600; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.dimensions[CSS_WIDTH] = 600; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex = CSS_FLEX_ONE; - node->style.position_type = CSS_POSITION_ABSOLUTE; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex = CSS_FLEX_ONE; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 600; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 600; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2324,41 +2218,39 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_HEIGHT] = 500; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_HEIGHT] = 500; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex = CSS_FLEX_ONE; - node = &outer_node_1->children[1]; - node->style.flex = CSS_FLEX_ONE; - node->style.position_type = CSS_POSITION_ABSOLUTE; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex = CSS_FLEX_ONE; + node_1 = &node_0->children[1]; + node_1->style.flex = CSS_FLEX_ONE; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 500; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 500; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 500; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 500; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 500; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 500; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2368,20 +2260,20 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.border[CSS_LEFT] = 5; - node->style.border[CSS_TOP] = 5; - node->style.border[CSS_RIGHT] = 5; - node->style.border[CSS_BOTTOM] = 5; + css_node_t *node_0 = root_node; + node_0->style.border[CSS_LEFT] = 5; + node_0->style.border[CSS_TOP] = 5; + node_0->style.border[CSS_RIGHT] = 5; + node_0->style.border[CSS_BOTTOM] = 5; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 10; - node->layout.dimensions[CSS_HEIGHT] = 10; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 10; + node_0->layout.dimensions[CSS_HEIGHT] = 10; } test("should layout node with borderWidth", root_node, root_layout); @@ -2390,34 +2282,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.border[CSS_TOP] = 1; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.border[CSS_TOP] = 1; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.position[CSS_TOP] = -1; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.position[CSS_TOP] = -1; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 1; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 1; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2427,37 +2317,35 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.border[CSS_LEFT] = 1; - node->style.border[CSS_TOP] = 1; - node->style.border[CSS_RIGHT] = 1; - node->style.border[CSS_BOTTOM] = 1; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.border[CSS_LEFT] = 1; + node_0->style.border[CSS_TOP] = 1; + node_0->style.border[CSS_RIGHT] = 1; + node_0->style.border[CSS_BOTTOM] = 1; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.position[CSS_LEFT] = 5; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.position[CSS_LEFT] = 5; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 2; - node->layout.dimensions[CSS_HEIGHT] = 2; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 2; + node_0->layout.dimensions[CSS_HEIGHT] = 2; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 1; - node->layout.position[CSS_LEFT] = 6; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 1; + node_1->layout.position[CSS_LEFT] = 6; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2467,38 +2355,36 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 50; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 50; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.align_self = CSS_ALIGN_STRETCH; - node->style.margin[CSS_LEFT] = 20; - node->style.padding[CSS_LEFT] = 20; - node->style.padding[CSS_TOP] = 20; - node->style.padding[CSS_RIGHT] = 20; - node->style.padding[CSS_BOTTOM] = 20; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.align_self = CSS_ALIGN_STRETCH; + node_1->style.margin[CSS_LEFT] = 20; + node_1->style.padding[CSS_LEFT] = 20; + node_1->style.padding[CSS_TOP] = 20; + node_1->style.padding[CSS_RIGHT] = 20; + node_1->style.padding[CSS_BOTTOM] = 20; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 50; - node->layout.dimensions[CSS_HEIGHT] = 40; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 50; + node_0->layout.dimensions[CSS_HEIGHT] = 40; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 20; - node->layout.dimensions[CSS_WIDTH] = 40; - node->layout.dimensions[CSS_HEIGHT] = 40; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 20; + node_1->layout.dimensions[CSS_WIDTH] = 40; + node_1->layout.dimensions[CSS_HEIGHT] = 40; } } @@ -2508,32 +2394,30 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.border[CSS_RIGHT] = 5; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.border[CSS_RIGHT] = 5; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 5; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 5; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 5; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 5; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2543,34 +2427,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.border[CSS_RIGHT] = 1; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.border[CSS_RIGHT] = 1; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.margin[CSS_RIGHT] = -8; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.margin[CSS_RIGHT] = -8; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 1; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 1; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 0; + node_1->layout.dimensions[CSS_HEIGHT] = 0; } } @@ -2580,18 +2462,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 33; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 33; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("should layout node with just text", root_node, root_layout); @@ -2600,19 +2482,19 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 10; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 10; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 10; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 10; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("should layout node with text and width", root_node, root_layout); @@ -2621,26 +2503,26 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.margin[CSS_LEFT] = 5; - node->style.margin[CSS_TOP] = 5; - node->style.margin[CSS_RIGHT] = 5; - node->style.margin[CSS_BOTTOM] = 5; - node->style.padding[CSS_LEFT] = 5; - node->style.padding[CSS_TOP] = 5; - node->style.padding[CSS_RIGHT] = 5; - node->style.padding[CSS_BOTTOM] = 5; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.margin[CSS_LEFT] = 5; + node_0->style.margin[CSS_TOP] = 5; + node_0->style.margin[CSS_RIGHT] = 5; + node_0->style.margin[CSS_BOTTOM] = 5; + node_0->style.padding[CSS_LEFT] = 5; + node_0->style.padding[CSS_TOP] = 5; + node_0->style.padding[CSS_RIGHT] = 5; + node_0->style.padding[CSS_BOTTOM] = 5; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 5; - node->layout.position[CSS_LEFT] = 5; - node->layout.dimensions[CSS_WIDTH] = 181; - node->layout.dimensions[CSS_HEIGHT] = 28; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 5; + node_0->layout.position[CSS_LEFT] = 5; + node_0->layout.dimensions[CSS_WIDTH] = 181; + node_0->layout.dimensions[CSS_HEIGHT] = 28; } test("should layout node with text, padding and margin", root_node, root_layout); @@ -2649,34 +2531,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.measure = measure; + node_1->style.measure_context = "loooooooooong with space"; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 100; - node->layout.dimensions[CSS_HEIGHT] = 36; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 0; + node_1->layout.position[CSS_LEFT] = 0; + node_1->layout.dimensions[CSS_WIDTH] = 100; + node_1->layout.dimensions[CSS_HEIGHT] = 36; } } @@ -2686,16 +2566,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #0", root_node, root_layout); @@ -2704,28 +2583,28 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.align_items = CSS_ALIGN_FLEX_END; - node->style.dimensions[CSS_WIDTH] = 860; - node->style.margin[CSS_LEFT] = 10; - node->style.margin[CSS_TOP] = 10; - node->style.margin[CSS_RIGHT] = 1; - node->style.margin[CSS_BOTTOM] = 2; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_TOP] = 0; - node->style.position[CSS_TOP] = 0; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.align_items = CSS_ALIGN_FLEX_END; + node_0->style.dimensions[CSS_WIDTH] = 860; + node_0->style.margin[CSS_LEFT] = 10; + node_0->style.margin[CSS_TOP] = 10; + node_0->style.margin[CSS_RIGHT] = 1; + node_0->style.margin[CSS_BOTTOM] = 2; + node_0->style.border[CSS_LEFT] = 2; + node_0->style.border[CSS_TOP] = 0; + node_0->style.position[CSS_TOP] = 0; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = 10; - node->layout.dimensions[CSS_WIDTH] = 860; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 10; + node_0->layout.position[CSS_LEFT] = 10; + node_0->layout.dimensions[CSS_WIDTH] = 860; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("Random #1", root_node, root_layout); @@ -2734,28 +2613,28 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_HEIGHT] = 603; - node->style.margin[CSS_TOP] = -5; - node->style.padding[CSS_RIGHT] = 18; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_TOP] = 2; - node->style.border[CSS_RIGHT] = 2; - node->style.border[CSS_BOTTOM] = 2; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_TOP] = 2; - node->style.position[CSS_LEFT] = 6; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_HEIGHT] = 603; + node_0->style.margin[CSS_TOP] = -5; + node_0->style.padding[CSS_RIGHT] = 18; + node_0->style.border[CSS_LEFT] = 2; + node_0->style.border[CSS_TOP] = 2; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.border[CSS_BOTTOM] = 2; + node_0->style.border[CSS_LEFT] = 2; + node_0->style.border[CSS_TOP] = 2; + node_0->style.position[CSS_LEFT] = 6; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -5; - node->layout.position[CSS_LEFT] = 6; - node->layout.dimensions[CSS_WIDTH] = 55; - node->layout.dimensions[CSS_HEIGHT] = 603; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -5; + node_0->layout.position[CSS_LEFT] = 6; + node_0->layout.dimensions[CSS_WIDTH] = 55; + node_0->layout.dimensions[CSS_HEIGHT] = 603; } test("Random #2", root_node, root_layout); @@ -2764,25 +2643,25 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.align_items = CSS_ALIGN_FLEX_START; - node->style.margin[CSS_TOP] = 7; - node->style.margin[CSS_RIGHT] = 10; - node->style.margin[CSS_BOTTOM] = -1; - node->style.padding[CSS_LEFT] = 1; - node->style.padding[CSS_RIGHT] = 6; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.align_items = CSS_ALIGN_FLEX_START; + node_0->style.margin[CSS_TOP] = 7; + node_0->style.margin[CSS_RIGHT] = 10; + node_0->style.margin[CSS_BOTTOM] = -1; + node_0->style.padding[CSS_LEFT] = 1; + node_0->style.padding[CSS_RIGHT] = 6; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 7; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 178; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 7; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 178; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("Random #3", root_node, root_layout); @@ -2791,27 +2670,27 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.dimensions[CSS_HEIGHT] = 140; - node->style.margin[CSS_LEFT] = -3; - node->style.margin[CSS_BOTTOM] = 11; - node->style.padding[CSS_LEFT] = 14; - node->style.padding[CSS_TOP] = 14; - node->style.padding[CSS_RIGHT] = 14; - node->style.padding[CSS_BOTTOM] = 14; - node->style.padding[CSS_LEFT] = 5; - node->style.position[CSS_LEFT] = -9; - node->style.position[CSS_TOP] = 8; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.dimensions[CSS_HEIGHT] = 140; + node_0->style.margin[CSS_LEFT] = -3; + node_0->style.margin[CSS_BOTTOM] = 11; + node_0->style.padding[CSS_LEFT] = 14; + node_0->style.padding[CSS_TOP] = 14; + node_0->style.padding[CSS_RIGHT] = 14; + node_0->style.padding[CSS_BOTTOM] = 14; + node_0->style.padding[CSS_LEFT] = 5; + node_0->style.position[CSS_LEFT] = -9; + node_0->style.position[CSS_TOP] = 8; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 8; - node->layout.position[CSS_LEFT] = -12; - node->layout.dimensions[CSS_WIDTH] = 19; - node->layout.dimensions[CSS_HEIGHT] = 140; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 8; + node_0->layout.position[CSS_LEFT] = -12; + node_0->layout.dimensions[CSS_WIDTH] = 19; + node_0->layout.dimensions[CSS_HEIGHT] = 140; } test("Random #4", root_node, root_layout); @@ -2820,31 +2699,31 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.dimensions[CSS_WIDTH] = 873; - node->style.margin[CSS_LEFT] = 1; - node->style.margin[CSS_TOP] = 1; - node->style.margin[CSS_RIGHT] = 1; - node->style.margin[CSS_BOTTOM] = 1; - node->style.margin[CSS_LEFT] = 16; - node->style.margin[CSS_TOP] = 18; - node->style.padding[CSS_LEFT] = 10; - node->style.padding[CSS_RIGHT] = 13; - node->style.border[CSS_TOP] = 3; - node->style.border[CSS_BOTTOM] = 1; - node->style.position[CSS_TOP] = -3; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.dimensions[CSS_WIDTH] = 873; + node_0->style.margin[CSS_LEFT] = 1; + node_0->style.margin[CSS_TOP] = 1; + node_0->style.margin[CSS_RIGHT] = 1; + node_0->style.margin[CSS_BOTTOM] = 1; + node_0->style.margin[CSS_LEFT] = 16; + node_0->style.margin[CSS_TOP] = 18; + node_0->style.padding[CSS_LEFT] = 10; + node_0->style.padding[CSS_RIGHT] = 13; + node_0->style.border[CSS_TOP] = 3; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.position[CSS_TOP] = -3; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 15; - node->layout.position[CSS_LEFT] = 16; - node->layout.dimensions[CSS_WIDTH] = 873; - node->layout.dimensions[CSS_HEIGHT] = 22; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 15; + node_0->layout.position[CSS_LEFT] = 16; + node_0->layout.dimensions[CSS_WIDTH] = 873; + node_0->layout.dimensions[CSS_HEIGHT] = 22; } test("Random #5", root_node, root_layout); @@ -2853,32 +2732,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_START; - node->style.dimensions[CSS_WIDTH] = 255; - node->style.margin[CSS_RIGHT] = -6; - node->style.margin[CSS_BOTTOM] = -3; - node->style.padding[CSS_LEFT] = 4; - node->style.padding[CSS_TOP] = 4; - node->style.padding[CSS_RIGHT] = 4; - node->style.padding[CSS_BOTTOM] = 4; - node->style.padding[CSS_TOP] = 8; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_TOP] = 2; - node->style.border[CSS_RIGHT] = 2; - node->style.border[CSS_BOTTOM] = 2; - node->style.border[CSS_LEFT] = 1; - node->style.border[CSS_RIGHT] = 2; - node->style.border[CSS_BOTTOM] = 1; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; + node_0->style.dimensions[CSS_WIDTH] = 255; + node_0->style.margin[CSS_RIGHT] = -6; + node_0->style.margin[CSS_BOTTOM] = -3; + node_0->style.padding[CSS_LEFT] = 4; + node_0->style.padding[CSS_TOP] = 4; + node_0->style.padding[CSS_RIGHT] = 4; + node_0->style.padding[CSS_BOTTOM] = 4; + node_0->style.padding[CSS_TOP] = 8; + node_0->style.border[CSS_LEFT] = 2; + node_0->style.border[CSS_TOP] = 2; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.border[CSS_BOTTOM] = 2; + node_0->style.border[CSS_LEFT] = 1; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.border[CSS_BOTTOM] = 1; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 255; - node->layout.dimensions[CSS_HEIGHT] = 15; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 255; + node_0->layout.dimensions[CSS_HEIGHT] = 15; } test("Random #6", root_node, root_layout); @@ -2887,75 +2766,73 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_HEIGHT] = 116; - node->style.margin[CSS_TOP] = 10; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_HEIGHT] = 116; + node_0->style.margin[CSS_TOP] = 10; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.align_self = CSS_ALIGN_FLEX_START; - node->style.flex = CSS_FLEX_NONE; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.dimensions[CSS_HEIGHT] = 633; - node->style.margin[CSS_LEFT] = 19; - node->style.margin[CSS_TOP] = 19; - node->style.margin[CSS_RIGHT] = 19; - node->style.margin[CSS_BOTTOM] = 19; - node->style.margin[CSS_LEFT] = 3; - node->style.margin[CSS_TOP] = 17; - node->style.margin[CSS_RIGHT] = 8; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_BOTTOM] = 0; - node->style.position[CSS_LEFT] = -10; - node->style.position[CSS_TOP] = 8; - node->style.measure = measure; - node->style.measure_context = "small"; - node = &outer_node_1->children[1]; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.align_self = CSS_ALIGN_FLEX_END; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.margin[CSS_LEFT] = 4; - node->style.margin[CSS_TOP] = 13; - node->style.margin[CSS_RIGHT] = -2; - node->style.margin[CSS_BOTTOM] = 1; - node->style.padding[CSS_LEFT] = 2; - node->style.padding[CSS_TOP] = 2; - node->style.padding[CSS_RIGHT] = 2; - node->style.padding[CSS_BOTTOM] = 2; - node->style.padding[CSS_RIGHT] = 5; - node->style.border[CSS_TOP] = 3; - node->style.border[CSS_BOTTOM] = 3; - node->style.position[CSS_LEFT] = -7; - node->style.position[CSS_TOP] = -10; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.align_items = CSS_ALIGN_CENTER; + node_1->style.align_self = CSS_ALIGN_FLEX_START; + node_1->style.flex = CSS_FLEX_NONE; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.dimensions[CSS_HEIGHT] = 633; + node_1->style.margin[CSS_LEFT] = 19; + node_1->style.margin[CSS_TOP] = 19; + node_1->style.margin[CSS_RIGHT] = 19; + node_1->style.margin[CSS_BOTTOM] = 19; + node_1->style.margin[CSS_LEFT] = 3; + node_1->style.margin[CSS_TOP] = 17; + node_1->style.margin[CSS_RIGHT] = 8; + node_1->style.border[CSS_LEFT] = 2; + node_1->style.border[CSS_BOTTOM] = 0; + node_1->style.position[CSS_LEFT] = -10; + node_1->style.position[CSS_TOP] = 8; + node_1->style.measure = measure; + node_1->style.measure_context = "small"; + node_1 = &node_0->children[1]; + node_1->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_1->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; + node_1->style.align_items = CSS_ALIGN_CENTER; + node_1->style.align_self = CSS_ALIGN_FLEX_END; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.margin[CSS_LEFT] = 4; + node_1->style.margin[CSS_TOP] = 13; + node_1->style.margin[CSS_RIGHT] = -2; + node_1->style.margin[CSS_BOTTOM] = 1; + node_1->style.padding[CSS_LEFT] = 2; + node_1->style.padding[CSS_TOP] = 2; + node_1->style.padding[CSS_RIGHT] = 2; + node_1->style.padding[CSS_BOTTOM] = 2; + node_1->style.padding[CSS_RIGHT] = 5; + node_1->style.border[CSS_TOP] = 3; + node_1->style.border[CSS_BOTTOM] = 3; + node_1->style.position[CSS_LEFT] = -7; + node_1->style.position[CSS_TOP] = -10; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 116; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 10; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 116; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 25; - node->layout.position[CSS_LEFT] = -7; - node->layout.dimensions[CSS_WIDTH] = 35; - node->layout.dimensions[CSS_HEIGHT] = 633; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 3; - node->layout.position[CSS_LEFT] = -3; - node->layout.dimensions[CSS_WIDTH] = 7; - node->layout.dimensions[CSS_HEIGHT] = 10; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 25; + node_1->layout.position[CSS_LEFT] = -7; + node_1->layout.dimensions[CSS_WIDTH] = 35; + node_1->layout.dimensions[CSS_HEIGHT] = 633; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 3; + node_1->layout.position[CSS_LEFT] = -3; + node_1->layout.dimensions[CSS_WIDTH] = 7; + node_1->layout.dimensions[CSS_HEIGHT] = 10; } } @@ -2965,28 +2842,28 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.align_items = CSS_ALIGN_STRETCH; - node->style.dimensions[CSS_WIDTH] = 426; - node->style.dimensions[CSS_HEIGHT] = 497; - node->style.margin[CSS_TOP] = 1; - node->style.margin[CSS_RIGHT] = 14; - node->style.padding[CSS_RIGHT] = 7; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_RIGHT] = 2; - node->style.position[CSS_TOP] = -1; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.align_items = CSS_ALIGN_STRETCH; + node_0->style.dimensions[CSS_WIDTH] = 426; + node_0->style.dimensions[CSS_HEIGHT] = 497; + node_0->style.margin[CSS_TOP] = 1; + node_0->style.margin[CSS_RIGHT] = 14; + node_0->style.padding[CSS_RIGHT] = 7; + node_0->style.border[CSS_LEFT] = 2; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.position[CSS_TOP] = -1; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 426; - node->layout.dimensions[CSS_HEIGHT] = 497; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 426; + node_0->layout.dimensions[CSS_HEIGHT] = 497; } test("Random #8", root_node, root_layout); @@ -2995,16 +2872,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #9", root_node, root_layout); @@ -3013,16 +2889,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #10", root_node, root_layout); @@ -3031,32 +2906,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_CENTER; - node->style.align_items = CSS_ALIGN_FLEX_START; - node->style.dimensions[CSS_WIDTH] = 477; - node->style.dimensions[CSS_HEIGHT] = 300; - node->style.margin[CSS_LEFT] = 9; - node->style.padding[CSS_LEFT] = 0; - node->style.padding[CSS_TOP] = 0; - node->style.padding[CSS_RIGHT] = 0; - node->style.padding[CSS_BOTTOM] = 0; - node->style.padding[CSS_LEFT] = 0; - node->style.padding[CSS_TOP] = 15; - node->style.padding[CSS_RIGHT] = 17; - node->style.padding[CSS_BOTTOM] = 16; - node->style.position[CSS_TOP] = 0; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_CENTER; + node_0->style.align_items = CSS_ALIGN_FLEX_START; + node_0->style.dimensions[CSS_WIDTH] = 477; + node_0->style.dimensions[CSS_HEIGHT] = 300; + node_0->style.margin[CSS_LEFT] = 9; + node_0->style.padding[CSS_LEFT] = 0; + node_0->style.padding[CSS_TOP] = 0; + node_0->style.padding[CSS_RIGHT] = 0; + node_0->style.padding[CSS_BOTTOM] = 0; + node_0->style.padding[CSS_LEFT] = 0; + node_0->style.padding[CSS_TOP] = 15; + node_0->style.padding[CSS_RIGHT] = 17; + node_0->style.padding[CSS_BOTTOM] = 16; + node_0->style.position[CSS_TOP] = 0; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 9; - node->layout.dimensions[CSS_WIDTH] = 477; - node->layout.dimensions[CSS_HEIGHT] = 300; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 9; + node_0->layout.dimensions[CSS_WIDTH] = 477; + node_0->layout.dimensions[CSS_HEIGHT] = 300; } test("Random #11", root_node, root_layout); @@ -3065,28 +2940,28 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_FLEX_START; - node->style.align_items = CSS_ALIGN_FLEX_END; - node->style.dimensions[CSS_HEIGHT] = 601; - node->style.margin[CSS_LEFT] = 17; - node->style.margin[CSS_TOP] = 17; - node->style.margin[CSS_RIGHT] = 17; - node->style.margin[CSS_BOTTOM] = 17; - node->style.border[CSS_LEFT] = 0; - node->style.border[CSS_BOTTOM] = 2; - node->style.position[CSS_LEFT] = 9; - node->style.position[CSS_TOP] = -6; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; + node_0->style.align_items = CSS_ALIGN_FLEX_END; + node_0->style.dimensions[CSS_HEIGHT] = 601; + node_0->style.margin[CSS_LEFT] = 17; + node_0->style.margin[CSS_TOP] = 17; + node_0->style.margin[CSS_RIGHT] = 17; + node_0->style.margin[CSS_BOTTOM] = 17; + node_0->style.border[CSS_LEFT] = 0; + node_0->style.border[CSS_BOTTOM] = 2; + node_0->style.position[CSS_LEFT] = 9; + node_0->style.position[CSS_TOP] = -6; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 11; - node->layout.position[CSS_LEFT] = 26; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 601; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 11; + node_0->layout.position[CSS_LEFT] = 26; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 601; } test("Random #12", root_node, root_layout); @@ -3095,16 +2970,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #13", root_node, root_layout); @@ -3113,18 +2987,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 171; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 171; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("Random #14", root_node, root_layout); @@ -3133,29 +3007,29 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.align_items = CSS_ALIGN_STRETCH; - node->style.dimensions[CSS_WIDTH] = 551; - node->style.margin[CSS_LEFT] = -9; - node->style.margin[CSS_TOP] = -9; - node->style.margin[CSS_RIGHT] = -9; - node->style.margin[CSS_BOTTOM] = -9; - node->style.margin[CSS_TOP] = 12; - node->style.border[CSS_TOP] = 1; - node->style.position[CSS_LEFT] = 8; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.align_items = CSS_ALIGN_STRETCH; + node_0->style.dimensions[CSS_WIDTH] = 551; + node_0->style.margin[CSS_LEFT] = -9; + node_0->style.margin[CSS_TOP] = -9; + node_0->style.margin[CSS_RIGHT] = -9; + node_0->style.margin[CSS_BOTTOM] = -9; + node_0->style.margin[CSS_TOP] = 12; + node_0->style.border[CSS_TOP] = 1; + node_0->style.position[CSS_LEFT] = 8; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 12; - node->layout.position[CSS_LEFT] = -1; - node->layout.dimensions[CSS_WIDTH] = 551; - node->layout.dimensions[CSS_HEIGHT] = 19; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 12; + node_0->layout.position[CSS_LEFT] = -1; + node_0->layout.dimensions[CSS_WIDTH] = 551; + node_0->layout.dimensions[CSS_HEIGHT] = 19; } test("Random #15", root_node, root_layout); @@ -3164,16 +3038,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #16", root_node, root_layout); @@ -3182,16 +3055,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #17", root_node, root_layout); @@ -3200,29 +3072,29 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_CENTER; - node->style.align_items = CSS_ALIGN_FLEX_START; - node->style.dimensions[CSS_WIDTH] = 924; - node->style.margin[CSS_LEFT] = -7; - node->style.margin[CSS_TOP] = -7; - node->style.margin[CSS_RIGHT] = -7; - node->style.margin[CSS_BOTTOM] = -7; - node->style.padding[CSS_TOP] = 8; - node->style.border[CSS_TOP] = 2; - node->style.border[CSS_RIGHT] = 3; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_CENTER; + node_0->style.align_items = CSS_ALIGN_FLEX_START; + node_0->style.dimensions[CSS_WIDTH] = 924; + node_0->style.margin[CSS_LEFT] = -7; + node_0->style.margin[CSS_TOP] = -7; + node_0->style.margin[CSS_RIGHT] = -7; + node_0->style.margin[CSS_BOTTOM] = -7; + node_0->style.padding[CSS_TOP] = 8; + node_0->style.border[CSS_TOP] = 2; + node_0->style.border[CSS_RIGHT] = 3; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -7; - node->layout.position[CSS_LEFT] = -7; - node->layout.dimensions[CSS_WIDTH] = 924; - node->layout.dimensions[CSS_HEIGHT] = 28; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -7; + node_0->layout.position[CSS_LEFT] = -7; + node_0->layout.dimensions[CSS_WIDTH] = 924; + node_0->layout.dimensions[CSS_HEIGHT] = 28; } test("Random #18", root_node, root_layout); @@ -3231,62 +3103,60 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.margin[CSS_LEFT] = 2; - node->style.margin[CSS_TOP] = 2; - node->style.margin[CSS_RIGHT] = 2; - node->style.margin[CSS_BOTTOM] = 2; - node->style.margin[CSS_TOP] = 10; - node->style.margin[CSS_RIGHT] = 8; - node->style.padding[CSS_RIGHT] = 18; - node->style.border[CSS_TOP] = 0; - node->style.border[CSS_BOTTOM] = 3; - node->style.position[CSS_LEFT] = -9; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.margin[CSS_LEFT] = 2; + node_0->style.margin[CSS_TOP] = 2; + node_0->style.margin[CSS_RIGHT] = 2; + node_0->style.margin[CSS_BOTTOM] = 2; + node_0->style.margin[CSS_TOP] = 10; + node_0->style.margin[CSS_RIGHT] = 8; + node_0->style.padding[CSS_RIGHT] = 18; + node_0->style.border[CSS_TOP] = 0; + node_0->style.border[CSS_BOTTOM] = 3; + node_0->style.position[CSS_LEFT] = -9; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.justify_content = CSS_JUSTIFY_FLEX_START; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.margin[CSS_LEFT] = 8; - node->style.margin[CSS_TOP] = 8; - node->style.margin[CSS_RIGHT] = 8; - node->style.margin[CSS_BOTTOM] = 8; - node->style.margin[CSS_TOP] = 2; - node->style.margin[CSS_BOTTOM] = 17; - node->style.padding[CSS_LEFT] = 11; - node->style.padding[CSS_TOP] = 11; - node->style.padding[CSS_RIGHT] = 11; - node->style.padding[CSS_BOTTOM] = 11; - node->style.padding[CSS_BOTTOM] = 2; - node->style.border[CSS_TOP] = 2; - node->style.position[CSS_LEFT] = 0; - node->style.position[CSS_TOP] = 2; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_1->style.justify_content = CSS_JUSTIFY_FLEX_START; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.margin[CSS_LEFT] = 8; + node_1->style.margin[CSS_TOP] = 8; + node_1->style.margin[CSS_RIGHT] = 8; + node_1->style.margin[CSS_BOTTOM] = 8; + node_1->style.margin[CSS_TOP] = 2; + node_1->style.margin[CSS_BOTTOM] = 17; + node_1->style.padding[CSS_LEFT] = 11; + node_1->style.padding[CSS_TOP] = 11; + node_1->style.padding[CSS_RIGHT] = 11; + node_1->style.padding[CSS_BOTTOM] = 11; + node_1->style.padding[CSS_BOTTOM] = 2; + node_1->style.border[CSS_TOP] = 2; + node_1->style.position[CSS_LEFT] = 0; + node_1->style.position[CSS_TOP] = 2; + node_1->style.measure = measure; + node_1->style.measure_context = "small"; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 10; - node->layout.position[CSS_LEFT] = -7; - node->layout.dimensions[CSS_WIDTH] = 18; - node->layout.dimensions[CSS_HEIGHT] = 3; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 10; + node_0->layout.position[CSS_LEFT] = -7; + node_0->layout.dimensions[CSS_WIDTH] = 18; + node_0->layout.dimensions[CSS_HEIGHT] = 3; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 4; - node->layout.position[CSS_LEFT] = 8; - node->layout.dimensions[CSS_WIDTH] = 55; - node->layout.dimensions[CSS_HEIGHT] = 33; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 4; + node_1->layout.position[CSS_LEFT] = 8; + node_1->layout.dimensions[CSS_WIDTH] = 55; + node_1->layout.dimensions[CSS_HEIGHT] = 33; } } @@ -3296,32 +3166,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.margin[CSS_LEFT] = 6; - node->style.margin[CSS_TOP] = -10; - node->style.margin[CSS_RIGHT] = 11; - node->style.padding[CSS_LEFT] = 16; - node->style.padding[CSS_TOP] = 16; - node->style.padding[CSS_RIGHT] = 16; - node->style.padding[CSS_BOTTOM] = 16; - node->style.padding[CSS_TOP] = 13; - node->style.border[CSS_LEFT] = 1; - node->style.border[CSS_TOP] = 1; - node->style.border[CSS_RIGHT] = 1; - node->style.border[CSS_BOTTOM] = 1; - node->style.position[CSS_LEFT] = -10; - node->style.position[CSS_TOP] = 5; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.margin[CSS_LEFT] = 6; + node_0->style.margin[CSS_TOP] = -10; + node_0->style.margin[CSS_RIGHT] = 11; + node_0->style.padding[CSS_LEFT] = 16; + node_0->style.padding[CSS_TOP] = 16; + node_0->style.padding[CSS_RIGHT] = 16; + node_0->style.padding[CSS_BOTTOM] = 16; + node_0->style.padding[CSS_TOP] = 13; + node_0->style.border[CSS_LEFT] = 1; + node_0->style.border[CSS_TOP] = 1; + node_0->style.border[CSS_RIGHT] = 1; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.position[CSS_LEFT] = -10; + node_0->style.position[CSS_TOP] = 5; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -5; - node->layout.position[CSS_LEFT] = -4; - node->layout.dimensions[CSS_WIDTH] = 67; - node->layout.dimensions[CSS_HEIGHT] = 49; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -5; + node_0->layout.position[CSS_LEFT] = -4; + node_0->layout.dimensions[CSS_WIDTH] = 67; + node_0->layout.dimensions[CSS_HEIGHT] = 49; } test("Random #20", root_node, root_layout); @@ -3330,30 +3200,30 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.dimensions[CSS_WIDTH] = 34; - node->style.dimensions[CSS_HEIGHT] = 324; - node->style.margin[CSS_LEFT] = 15; - node->style.margin[CSS_TOP] = 15; - node->style.margin[CSS_RIGHT] = 15; - node->style.margin[CSS_BOTTOM] = 15; - node->style.margin[CSS_TOP] = 14; - node->style.margin[CSS_RIGHT] = 13; - node->style.margin[CSS_BOTTOM] = -10; - node->style.border[CSS_LEFT] = 3; - node->style.border[CSS_BOTTOM] = 3; - node->style.position[CSS_LEFT] = 2; - node->style.position[CSS_TOP] = -7; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.dimensions[CSS_WIDTH] = 34; + node_0->style.dimensions[CSS_HEIGHT] = 324; + node_0->style.margin[CSS_LEFT] = 15; + node_0->style.margin[CSS_TOP] = 15; + node_0->style.margin[CSS_RIGHT] = 15; + node_0->style.margin[CSS_BOTTOM] = 15; + node_0->style.margin[CSS_TOP] = 14; + node_0->style.margin[CSS_RIGHT] = 13; + node_0->style.margin[CSS_BOTTOM] = -10; + node_0->style.border[CSS_LEFT] = 3; + node_0->style.border[CSS_BOTTOM] = 3; + node_0->style.position[CSS_LEFT] = 2; + node_0->style.position[CSS_TOP] = -7; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 7; - node->layout.position[CSS_LEFT] = 17; - node->layout.dimensions[CSS_WIDTH] = 34; - node->layout.dimensions[CSS_HEIGHT] = 324; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 7; + node_0->layout.position[CSS_LEFT] = 17; + node_0->layout.dimensions[CSS_WIDTH] = 34; + node_0->layout.dimensions[CSS_HEIGHT] = 324; } test("Random #21", root_node, root_layout); @@ -3362,25 +3232,25 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.dimensions[CSS_WIDTH] = 943; - node->style.dimensions[CSS_HEIGHT] = 497; - node->style.margin[CSS_LEFT] = 7; - node->style.margin[CSS_TOP] = -8; - node->style.margin[CSS_BOTTOM] = 7; - node->style.border[CSS_LEFT] = 3; - node->style.position[CSS_LEFT] = -5; - node->style.position[CSS_TOP] = -1; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.dimensions[CSS_WIDTH] = 943; + node_0->style.dimensions[CSS_HEIGHT] = 497; + node_0->style.margin[CSS_LEFT] = 7; + node_0->style.margin[CSS_TOP] = -8; + node_0->style.margin[CSS_BOTTOM] = 7; + node_0->style.border[CSS_LEFT] = 3; + node_0->style.position[CSS_LEFT] = -5; + node_0->style.position[CSS_TOP] = -1; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -9; - node->layout.position[CSS_LEFT] = 2; - node->layout.dimensions[CSS_WIDTH] = 943; - node->layout.dimensions[CSS_HEIGHT] = 497; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -9; + node_0->layout.position[CSS_LEFT] = 2; + node_0->layout.dimensions[CSS_WIDTH] = 943; + node_0->layout.dimensions[CSS_HEIGHT] = 497; } test("Random #22", root_node, root_layout); @@ -3389,28 +3259,28 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 373; - node->style.dimensions[CSS_HEIGHT] = 999; - node->style.margin[CSS_LEFT] = -10; - node->style.margin[CSS_TOP] = -10; - node->style.margin[CSS_RIGHT] = -10; - node->style.margin[CSS_BOTTOM] = -10; - node->style.margin[CSS_TOP] = 13; - node->style.margin[CSS_RIGHT] = 11; - node->style.padding[CSS_LEFT] = 4; - node->style.position[CSS_TOP] = 5; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 373; + node_0->style.dimensions[CSS_HEIGHT] = 999; + node_0->style.margin[CSS_LEFT] = -10; + node_0->style.margin[CSS_TOP] = -10; + node_0->style.margin[CSS_RIGHT] = -10; + node_0->style.margin[CSS_BOTTOM] = -10; + node_0->style.margin[CSS_TOP] = 13; + node_0->style.margin[CSS_RIGHT] = 11; + node_0->style.padding[CSS_LEFT] = 4; + node_0->style.position[CSS_TOP] = 5; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 18; - node->layout.position[CSS_LEFT] = -10; - node->layout.dimensions[CSS_WIDTH] = 373; - node->layout.dimensions[CSS_HEIGHT] = 999; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 18; + node_0->layout.position[CSS_LEFT] = -10; + node_0->layout.dimensions[CSS_WIDTH] = 373; + node_0->layout.dimensions[CSS_HEIGHT] = 999; } test("Random #23", root_node, root_layout); @@ -3419,30 +3289,30 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.margin[CSS_LEFT] = -3; - node->style.margin[CSS_TOP] = -3; - node->style.margin[CSS_RIGHT] = -3; - node->style.margin[CSS_BOTTOM] = -3; - node->style.margin[CSS_LEFT] = 17; - node->style.margin[CSS_TOP] = 19; - node->style.padding[CSS_LEFT] = 9; - node->style.padding[CSS_TOP] = 9; - node->style.padding[CSS_RIGHT] = 9; - node->style.padding[CSS_BOTTOM] = 9; - node->style.padding[CSS_TOP] = 15; - node->style.border[CSS_LEFT] = 2; - node->style.position[CSS_LEFT] = 5; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.margin[CSS_LEFT] = -3; + node_0->style.margin[CSS_TOP] = -3; + node_0->style.margin[CSS_RIGHT] = -3; + node_0->style.margin[CSS_BOTTOM] = -3; + node_0->style.margin[CSS_LEFT] = 17; + node_0->style.margin[CSS_TOP] = 19; + node_0->style.padding[CSS_LEFT] = 9; + node_0->style.padding[CSS_TOP] = 9; + node_0->style.padding[CSS_RIGHT] = 9; + node_0->style.padding[CSS_BOTTOM] = 9; + node_0->style.padding[CSS_TOP] = 15; + node_0->style.border[CSS_LEFT] = 2; + node_0->style.position[CSS_LEFT] = 5; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 19; - node->layout.position[CSS_LEFT] = 22; - node->layout.dimensions[CSS_WIDTH] = 20; - node->layout.dimensions[CSS_HEIGHT] = 24; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 19; + node_0->layout.position[CSS_LEFT] = 22; + node_0->layout.dimensions[CSS_WIDTH] = 20; + node_0->layout.dimensions[CSS_HEIGHT] = 24; } test("Random #24", root_node, root_layout); @@ -3451,23 +3321,23 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_FLEX_START; - node->style.padding[CSS_LEFT] = 6; - node->style.padding[CSS_TOP] = 8; - node->style.padding[CSS_RIGHT] = 6; - node->style.border[CSS_RIGHT] = 3; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_FLEX_START; + node_0->style.padding[CSS_LEFT] = 6; + node_0->style.padding[CSS_TOP] = 8; + node_0->style.padding[CSS_RIGHT] = 6; + node_0->style.border[CSS_RIGHT] = 3; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 48; - node->layout.dimensions[CSS_HEIGHT] = 26; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 48; + node_0->layout.dimensions[CSS_HEIGHT] = 26; } test("Random #25", root_node, root_layout); @@ -3476,18 +3346,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 171; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 171; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("Random #26", root_node, root_layout); @@ -3496,35 +3366,35 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.dimensions[CSS_WIDTH] = 786; - node->style.dimensions[CSS_HEIGHT] = 710; - node->style.margin[CSS_LEFT] = -9; - node->style.margin[CSS_TOP] = -9; - node->style.margin[CSS_RIGHT] = -9; - node->style.margin[CSS_BOTTOM] = -9; - node->style.margin[CSS_LEFT] = 15; - node->style.margin[CSS_RIGHT] = 0; - node->style.margin[CSS_BOTTOM] = 16; - node->style.padding[CSS_TOP] = 16; - node->style.border[CSS_RIGHT] = 0; - node->style.border[CSS_BOTTOM] = 0; - node->style.position[CSS_LEFT] = 4; - node->style.position[CSS_TOP] = -3; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.align_items = CSS_ALIGN_CENTER; + node_0->style.dimensions[CSS_WIDTH] = 786; + node_0->style.dimensions[CSS_HEIGHT] = 710; + node_0->style.margin[CSS_LEFT] = -9; + node_0->style.margin[CSS_TOP] = -9; + node_0->style.margin[CSS_RIGHT] = -9; + node_0->style.margin[CSS_BOTTOM] = -9; + node_0->style.margin[CSS_LEFT] = 15; + node_0->style.margin[CSS_RIGHT] = 0; + node_0->style.margin[CSS_BOTTOM] = 16; + node_0->style.padding[CSS_TOP] = 16; + node_0->style.border[CSS_RIGHT] = 0; + node_0->style.border[CSS_BOTTOM] = 0; + node_0->style.position[CSS_LEFT] = 4; + node_0->style.position[CSS_TOP] = -3; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -12; - node->layout.position[CSS_LEFT] = 19; - node->layout.dimensions[CSS_WIDTH] = 786; - node->layout.dimensions[CSS_HEIGHT] = 710; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -12; + node_0->layout.position[CSS_LEFT] = 19; + node_0->layout.dimensions[CSS_WIDTH] = 786; + node_0->layout.dimensions[CSS_HEIGHT] = 710; } test("Random #27", root_node, root_layout); @@ -3533,30 +3403,30 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_START; - node->style.align_items = CSS_ALIGN_STRETCH; - node->style.dimensions[CSS_WIDTH] = 260; - node->style.dimensions[CSS_HEIGHT] = 929; - node->style.margin[CSS_TOP] = -7; - node->style.margin[CSS_RIGHT] = -2; - node->style.margin[CSS_BOTTOM] = 12; - node->style.padding[CSS_LEFT] = 13; - node->style.padding[CSS_RIGHT] = 9; - node->style.padding[CSS_BOTTOM] = 15; - node->style.border[CSS_RIGHT] = 1; - node->style.position[CSS_LEFT] = 3; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; + node_0->style.align_items = CSS_ALIGN_STRETCH; + node_0->style.dimensions[CSS_WIDTH] = 260; + node_0->style.dimensions[CSS_HEIGHT] = 929; + node_0->style.margin[CSS_TOP] = -7; + node_0->style.margin[CSS_RIGHT] = -2; + node_0->style.margin[CSS_BOTTOM] = 12; + node_0->style.padding[CSS_LEFT] = 13; + node_0->style.padding[CSS_RIGHT] = 9; + node_0->style.padding[CSS_BOTTOM] = 15; + node_0->style.border[CSS_RIGHT] = 1; + node_0->style.position[CSS_LEFT] = 3; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -7; - node->layout.position[CSS_LEFT] = 3; - node->layout.dimensions[CSS_WIDTH] = 260; - node->layout.dimensions[CSS_HEIGHT] = 929; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -7; + node_0->layout.position[CSS_LEFT] = 3; + node_0->layout.dimensions[CSS_WIDTH] = 260; + node_0->layout.dimensions[CSS_HEIGHT] = 929; } test("Random #28", root_node, root_layout); @@ -3565,16 +3435,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #29", root_node, root_layout); @@ -3583,36 +3452,36 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.margin[CSS_LEFT] = 4; - node->style.margin[CSS_TOP] = 4; - node->style.margin[CSS_RIGHT] = 4; - node->style.margin[CSS_BOTTOM] = 4; - node->style.margin[CSS_RIGHT] = 5; - node->style.margin[CSS_BOTTOM] = -8; - node->style.padding[CSS_LEFT] = 4; - node->style.padding[CSS_TOP] = 4; - node->style.padding[CSS_RIGHT] = 4; - node->style.padding[CSS_BOTTOM] = 4; - node->style.padding[CSS_TOP] = 9; - node->style.padding[CSS_RIGHT] = 11; - node->style.border[CSS_LEFT] = 0; - node->style.border[CSS_TOP] = 0; - node->style.border[CSS_RIGHT] = 0; - node->style.border[CSS_BOTTOM] = 0; - node->style.border[CSS_RIGHT] = 0; - node->style.position[CSS_TOP] = 9; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.margin[CSS_LEFT] = 4; + node_0->style.margin[CSS_TOP] = 4; + node_0->style.margin[CSS_RIGHT] = 4; + node_0->style.margin[CSS_BOTTOM] = 4; + node_0->style.margin[CSS_RIGHT] = 5; + node_0->style.margin[CSS_BOTTOM] = -8; + node_0->style.padding[CSS_LEFT] = 4; + node_0->style.padding[CSS_TOP] = 4; + node_0->style.padding[CSS_RIGHT] = 4; + node_0->style.padding[CSS_BOTTOM] = 4; + node_0->style.padding[CSS_TOP] = 9; + node_0->style.padding[CSS_RIGHT] = 11; + node_0->style.border[CSS_LEFT] = 0; + node_0->style.border[CSS_TOP] = 0; + node_0->style.border[CSS_RIGHT] = 0; + node_0->style.border[CSS_BOTTOM] = 0; + node_0->style.border[CSS_RIGHT] = 0; + node_0->style.position[CSS_TOP] = 9; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 13; - node->layout.position[CSS_LEFT] = 4; - node->layout.dimensions[CSS_WIDTH] = 15; - node->layout.dimensions[CSS_HEIGHT] = 13; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 13; + node_0->layout.position[CSS_LEFT] = 4; + node_0->layout.dimensions[CSS_WIDTH] = 15; + node_0->layout.dimensions[CSS_HEIGHT] = 13; } test("Random #30", root_node, root_layout); @@ -3621,16 +3490,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #31", root_node, root_layout); @@ -3639,18 +3507,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 171; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 171; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("Random #32", root_node, root_layout); @@ -3659,16 +3527,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #33", root_node, root_layout); @@ -3677,31 +3544,31 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_CENTER; - node->style.dimensions[CSS_WIDTH] = 498; - node->style.dimensions[CSS_HEIGHT] = 478; - node->style.margin[CSS_LEFT] = -3; - node->style.margin[CSS_TOP] = -3; - node->style.margin[CSS_RIGHT] = -3; - node->style.margin[CSS_BOTTOM] = -3; - node->style.margin[CSS_TOP] = 6; - node->style.padding[CSS_RIGHT] = 13; - node->style.padding[CSS_BOTTOM] = 12; - node->style.border[CSS_RIGHT] = 2; - node->style.position[CSS_LEFT] = 8; - node->style.position[CSS_TOP] = -5; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_CENTER; + node_0->style.dimensions[CSS_WIDTH] = 498; + node_0->style.dimensions[CSS_HEIGHT] = 478; + node_0->style.margin[CSS_LEFT] = -3; + node_0->style.margin[CSS_TOP] = -3; + node_0->style.margin[CSS_RIGHT] = -3; + node_0->style.margin[CSS_BOTTOM] = -3; + node_0->style.margin[CSS_TOP] = 6; + node_0->style.padding[CSS_RIGHT] = 13; + node_0->style.padding[CSS_BOTTOM] = 12; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.position[CSS_LEFT] = 8; + node_0->style.position[CSS_TOP] = -5; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 1; - node->layout.position[CSS_LEFT] = 5; - node->layout.dimensions[CSS_WIDTH] = 498; - node->layout.dimensions[CSS_HEIGHT] = 478; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 1; + node_0->layout.position[CSS_LEFT] = 5; + node_0->layout.dimensions[CSS_WIDTH] = 498; + node_0->layout.dimensions[CSS_HEIGHT] = 478; } test("Random #34", root_node, root_layout); @@ -3710,30 +3577,30 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.dimensions[CSS_WIDTH] = 954; - node->style.dimensions[CSS_HEIGHT] = 847; - node->style.margin[CSS_RIGHT] = 11; - node->style.border[CSS_LEFT] = 0; - node->style.border[CSS_TOP] = 0; - node->style.border[CSS_RIGHT] = 0; - node->style.border[CSS_BOTTOM] = 0; - node->style.border[CSS_TOP] = 1; - node->style.border[CSS_RIGHT] = 2; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.align_items = CSS_ALIGN_CENTER; + node_0->style.dimensions[CSS_WIDTH] = 954; + node_0->style.dimensions[CSS_HEIGHT] = 847; + node_0->style.margin[CSS_RIGHT] = 11; + node_0->style.border[CSS_LEFT] = 0; + node_0->style.border[CSS_TOP] = 0; + node_0->style.border[CSS_RIGHT] = 0; + node_0->style.border[CSS_BOTTOM] = 0; + node_0->style.border[CSS_TOP] = 1; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 954; - node->layout.dimensions[CSS_HEIGHT] = 847; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 954; + node_0->layout.dimensions[CSS_HEIGHT] = 847; } test("Random #35", root_node, root_layout); @@ -3742,31 +3609,31 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.dimensions[CSS_HEIGHT] = 184; - node->style.margin[CSS_LEFT] = 9; - node->style.margin[CSS_TOP] = 9; - node->style.margin[CSS_RIGHT] = 9; - node->style.margin[CSS_BOTTOM] = 9; - node->style.padding[CSS_LEFT] = 9; - node->style.padding[CSS_TOP] = 9; - node->style.padding[CSS_RIGHT] = 9; - node->style.padding[CSS_BOTTOM] = 9; - node->style.padding[CSS_LEFT] = 15; - node->style.padding[CSS_TOP] = 6; - node->style.border[CSS_BOTTOM] = 1; - node->style.position[CSS_LEFT] = 3; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.align_items = CSS_ALIGN_CENTER; + node_0->style.dimensions[CSS_HEIGHT] = 184; + node_0->style.margin[CSS_LEFT] = 9; + node_0->style.margin[CSS_TOP] = 9; + node_0->style.margin[CSS_RIGHT] = 9; + node_0->style.margin[CSS_BOTTOM] = 9; + node_0->style.padding[CSS_LEFT] = 9; + node_0->style.padding[CSS_TOP] = 9; + node_0->style.padding[CSS_RIGHT] = 9; + node_0->style.padding[CSS_BOTTOM] = 9; + node_0->style.padding[CSS_LEFT] = 15; + node_0->style.padding[CSS_TOP] = 6; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.position[CSS_LEFT] = 3; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 9; - node->layout.position[CSS_LEFT] = 12; - node->layout.dimensions[CSS_WIDTH] = 24; - node->layout.dimensions[CSS_HEIGHT] = 184; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 9; + node_0->layout.position[CSS_LEFT] = 12; + node_0->layout.dimensions[CSS_WIDTH] = 24; + node_0->layout.dimensions[CSS_HEIGHT] = 184; } test("Random #36", root_node, root_layout); @@ -3775,18 +3642,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 171; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 171; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("Random #37", root_node, root_layout); @@ -3795,56 +3662,54 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node->style.align_items = CSS_ALIGN_STRETCH; - node->style.dimensions[CSS_WIDTH] = 30; - node->style.dimensions[CSS_HEIGHT] = 20; - node->style.margin[CSS_LEFT] = 10; - node->style.margin[CSS_RIGHT] = -4; - node->style.margin[CSS_BOTTOM] = 18; - node->style.padding[CSS_TOP] = 8; - node->style.padding[CSS_RIGHT] = 8; - node->style.padding[CSS_BOTTOM] = 11; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; + node_0->style.align_items = CSS_ALIGN_STRETCH; + node_0->style.dimensions[CSS_WIDTH] = 30; + node_0->style.dimensions[CSS_HEIGHT] = 20; + node_0->style.margin[CSS_LEFT] = 10; + node_0->style.margin[CSS_RIGHT] = -4; + node_0->style.margin[CSS_BOTTOM] = 18; + node_0->style.padding[CSS_TOP] = 8; + node_0->style.padding[CSS_RIGHT] = 8; + node_0->style.padding[CSS_BOTTOM] = 11; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_FLEX_START; - node->style.align_items = CSS_ALIGN_FLEX_START; - node->style.flex = CSS_FLEX_NONE; - node->style.margin[CSS_LEFT] = -4; - node->style.margin[CSS_TOP] = -4; - node->style.margin[CSS_RIGHT] = -4; - node->style.margin[CSS_BOTTOM] = -4; - node->style.margin[CSS_TOP] = 9; - node->style.margin[CSS_RIGHT] = 6; - node->style.margin[CSS_BOTTOM] = 17; - node->style.padding[CSS_LEFT] = 5; - node->style.padding[CSS_BOTTOM] = 8; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_1->style.justify_content = CSS_JUSTIFY_FLEX_START; + node_1->style.align_items = CSS_ALIGN_FLEX_START; + node_1->style.flex = CSS_FLEX_NONE; + node_1->style.margin[CSS_LEFT] = -4; + node_1->style.margin[CSS_TOP] = -4; + node_1->style.margin[CSS_RIGHT] = -4; + node_1->style.margin[CSS_BOTTOM] = -4; + node_1->style.margin[CSS_TOP] = 9; + node_1->style.margin[CSS_RIGHT] = 6; + node_1->style.margin[CSS_BOTTOM] = 17; + node_1->style.padding[CSS_LEFT] = 5; + node_1->style.padding[CSS_BOTTOM] = 8; + node_1->style.measure = measure; + node_1->style.measure_context = "small"; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 10; - node->layout.dimensions[CSS_WIDTH] = 30; - node->layout.dimensions[CSS_HEIGHT] = 20; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 10; + node_0->layout.dimensions[CSS_WIDTH] = 30; + node_0->layout.dimensions[CSS_HEIGHT] = 20; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 17; - node->layout.position[CSS_LEFT] = -4; - node->layout.dimensions[CSS_WIDTH] = 20; - node->layout.dimensions[CSS_HEIGHT] = 26; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 17; + node_1->layout.position[CSS_LEFT] = -4; + node_1->layout.dimensions[CSS_WIDTH] = 20; + node_1->layout.dimensions[CSS_HEIGHT] = 26; } } @@ -3854,16 +3719,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #39", root_node, root_layout); @@ -3872,16 +3736,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #40", root_node, root_layout); @@ -3890,35 +3753,35 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.align_items = CSS_ALIGN_FLEX_START; - node->style.dimensions[CSS_HEIGHT] = 502; - node->style.margin[CSS_LEFT] = 15; - node->style.margin[CSS_TOP] = 15; - node->style.margin[CSS_RIGHT] = 15; - node->style.margin[CSS_BOTTOM] = 15; - node->style.margin[CSS_LEFT] = -2; - node->style.margin[CSS_TOP] = 19; - node->style.margin[CSS_RIGHT] = 1; - node->style.margin[CSS_BOTTOM] = 1; - node->style.padding[CSS_TOP] = 5; - node->style.border[CSS_LEFT] = 1; - node->style.border[CSS_TOP] = 1; - node->style.border[CSS_RIGHT] = 1; - node->style.border[CSS_BOTTOM] = 1; - node->style.position[CSS_LEFT] = 4; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.align_items = CSS_ALIGN_FLEX_START; + node_0->style.dimensions[CSS_HEIGHT] = 502; + node_0->style.margin[CSS_LEFT] = 15; + node_0->style.margin[CSS_TOP] = 15; + node_0->style.margin[CSS_RIGHT] = 15; + node_0->style.margin[CSS_BOTTOM] = 15; + node_0->style.margin[CSS_LEFT] = -2; + node_0->style.margin[CSS_TOP] = 19; + node_0->style.margin[CSS_RIGHT] = 1; + node_0->style.margin[CSS_BOTTOM] = 1; + node_0->style.padding[CSS_TOP] = 5; + node_0->style.border[CSS_LEFT] = 1; + node_0->style.border[CSS_TOP] = 1; + node_0->style.border[CSS_RIGHT] = 1; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.position[CSS_LEFT] = 4; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 19; - node->layout.position[CSS_LEFT] = 2; - node->layout.dimensions[CSS_WIDTH] = 35; - node->layout.dimensions[CSS_HEIGHT] = 502; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 19; + node_0->layout.position[CSS_LEFT] = 2; + node_0->layout.dimensions[CSS_WIDTH] = 35; + node_0->layout.dimensions[CSS_HEIGHT] = 502; } test("Random #41", root_node, root_layout); @@ -3927,16 +3790,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #42", root_node, root_layout); @@ -3945,26 +3807,26 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.margin[CSS_TOP] = 19; - node->style.margin[CSS_RIGHT] = 14; - node->style.margin[CSS_BOTTOM] = -8; - node->style.padding[CSS_TOP] = 1; - node->style.border[CSS_LEFT] = 3; - node->style.border[CSS_TOP] = 0; - node->style.border[CSS_RIGHT] = 3; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.margin[CSS_TOP] = 19; + node_0->style.margin[CSS_RIGHT] = 14; + node_0->style.margin[CSS_BOTTOM] = -8; + node_0->style.padding[CSS_TOP] = 1; + node_0->style.border[CSS_LEFT] = 3; + node_0->style.border[CSS_TOP] = 0; + node_0->style.border[CSS_RIGHT] = 3; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 19; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 177; - node->layout.dimensions[CSS_HEIGHT] = 19; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 19; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 177; + node_0->layout.dimensions[CSS_HEIGHT] = 19; } test("Random #43", root_node, root_layout); @@ -3973,28 +3835,28 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.align_items = CSS_ALIGN_FLEX_END; - node->style.dimensions[CSS_WIDTH] = 146; - node->style.dimensions[CSS_HEIGHT] = 190; - node->style.margin[CSS_LEFT] = 11; - node->style.margin[CSS_TOP] = 11; - node->style.margin[CSS_RIGHT] = 11; - node->style.margin[CSS_BOTTOM] = 11; - node->style.margin[CSS_BOTTOM] = 15; - node->style.padding[CSS_RIGHT] = 6; - node->style.border[CSS_RIGHT] = 2; - node->style.position[CSS_TOP] = 3; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.align_items = CSS_ALIGN_FLEX_END; + node_0->style.dimensions[CSS_WIDTH] = 146; + node_0->style.dimensions[CSS_HEIGHT] = 190; + node_0->style.margin[CSS_LEFT] = 11; + node_0->style.margin[CSS_TOP] = 11; + node_0->style.margin[CSS_RIGHT] = 11; + node_0->style.margin[CSS_BOTTOM] = 11; + node_0->style.margin[CSS_BOTTOM] = 15; + node_0->style.padding[CSS_RIGHT] = 6; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.position[CSS_TOP] = 3; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 14; - node->layout.position[CSS_LEFT] = 11; - node->layout.dimensions[CSS_WIDTH] = 146; - node->layout.dimensions[CSS_HEIGHT] = 190; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 14; + node_0->layout.position[CSS_LEFT] = 11; + node_0->layout.dimensions[CSS_WIDTH] = 146; + node_0->layout.dimensions[CSS_HEIGHT] = 190; } test("Random #44", root_node, root_layout); @@ -4003,61 +3865,59 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.justify_content = CSS_JUSTIFY_CENTER; - node->style.dimensions[CSS_WIDTH] = 882; - node->style.margin[CSS_LEFT] = -7; - node->style.margin[CSS_TOP] = -7; - node->style.margin[CSS_RIGHT] = -7; - node->style.margin[CSS_BOTTOM] = -7; - node->style.margin[CSS_RIGHT] = 19; - node->style.padding[CSS_LEFT] = 0; - node->style.padding[CSS_TOP] = 0; - node->style.padding[CSS_RIGHT] = 0; - node->style.padding[CSS_BOTTOM] = 0; - node->style.padding[CSS_LEFT] = 18; - node->style.padding[CSS_RIGHT] = 2; - node->style.border[CSS_RIGHT] = 3; - node->style.position[CSS_LEFT] = -3; - node->style.position[CSS_TOP] = -3; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.justify_content = CSS_JUSTIFY_CENTER; + node_0->style.dimensions[CSS_WIDTH] = 882; + node_0->style.margin[CSS_LEFT] = -7; + node_0->style.margin[CSS_TOP] = -7; + node_0->style.margin[CSS_RIGHT] = -7; + node_0->style.margin[CSS_BOTTOM] = -7; + node_0->style.margin[CSS_RIGHT] = 19; + node_0->style.padding[CSS_LEFT] = 0; + node_0->style.padding[CSS_TOP] = 0; + node_0->style.padding[CSS_RIGHT] = 0; + node_0->style.padding[CSS_BOTTOM] = 0; + node_0->style.padding[CSS_LEFT] = 18; + node_0->style.padding[CSS_RIGHT] = 2; + node_0->style.border[CSS_RIGHT] = 3; + node_0->style.position[CSS_LEFT] = -3; + node_0->style.position[CSS_TOP] = -3; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.align_self = CSS_ALIGN_CENTER; - node->style.flex = CSS_FLEX_ONE; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.margin[CSS_LEFT] = 4; - node->style.margin[CSS_TOP] = 4; - node->style.margin[CSS_RIGHT] = 4; - node->style.margin[CSS_BOTTOM] = 4; - node->style.margin[CSS_LEFT] = 7; - node->style.margin[CSS_RIGHT] = 12; - node->style.padding[CSS_LEFT] = 8; - node->style.padding[CSS_TOP] = 6; - node->style.border[CSS_TOP] = 0; - node->style.border[CSS_RIGHT] = 1; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.align_self = CSS_ALIGN_CENTER; + node_1->style.flex = CSS_FLEX_ONE; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.margin[CSS_LEFT] = 4; + node_1->style.margin[CSS_TOP] = 4; + node_1->style.margin[CSS_RIGHT] = 4; + node_1->style.margin[CSS_BOTTOM] = 4; + node_1->style.margin[CSS_LEFT] = 7; + node_1->style.margin[CSS_RIGHT] = 12; + node_1->style.padding[CSS_LEFT] = 8; + node_1->style.padding[CSS_TOP] = 6; + node_1->style.border[CSS_TOP] = 0; + node_1->style.border[CSS_RIGHT] = 1; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -10; - node->layout.position[CSS_LEFT] = -10; - node->layout.dimensions[CSS_WIDTH] = 882; - node->layout.dimensions[CSS_HEIGHT] = 0; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -10; + node_0->layout.position[CSS_LEFT] = -10; + node_0->layout.dimensions[CSS_WIDTH] = 882; + node_0->layout.dimensions[CSS_HEIGHT] = 0; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 4; - node->layout.position[CSS_LEFT] = 25; - node->layout.dimensions[CSS_WIDTH] = 9; - node->layout.dimensions[CSS_HEIGHT] = 6; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 4; + node_1->layout.position[CSS_LEFT] = 25; + node_1->layout.dimensions[CSS_WIDTH] = 9; + node_1->layout.dimensions[CSS_HEIGHT] = 6; } } @@ -4067,16 +3927,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #46", root_node, root_layout); @@ -4085,18 +3944,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 171; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 171; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("Random #47", root_node, root_layout); @@ -4105,16 +3964,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #48", root_node, root_layout); @@ -4123,16 +3981,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #49", root_node, root_layout); @@ -4141,16 +3998,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #50", root_node, root_layout); @@ -4159,94 +4015,92 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.dimensions[CSS_WIDTH] = 646; - node->style.dimensions[CSS_HEIGHT] = 615; - node->style.margin[CSS_LEFT] = -8; - node->style.margin[CSS_TOP] = -8; - node->style.margin[CSS_RIGHT] = -8; - node->style.margin[CSS_BOTTOM] = -8; - node->style.margin[CSS_LEFT] = 13; - node->style.margin[CSS_RIGHT] = -6; - node->style.border[CSS_LEFT] = 1; - node->style.border[CSS_TOP] = 1; - node->style.border[CSS_RIGHT] = 1; - node->style.border[CSS_BOTTOM] = 1; - node->style.border[CSS_LEFT] = 3; - node->style.border[CSS_TOP] = 3; - node->style.border[CSS_BOTTOM] = 1; - init_css_node_children(node, 2); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.dimensions[CSS_WIDTH] = 646; + node_0->style.dimensions[CSS_HEIGHT] = 615; + node_0->style.margin[CSS_LEFT] = -8; + node_0->style.margin[CSS_TOP] = -8; + node_0->style.margin[CSS_RIGHT] = -8; + node_0->style.margin[CSS_BOTTOM] = -8; + node_0->style.margin[CSS_LEFT] = 13; + node_0->style.margin[CSS_RIGHT] = -6; + node_0->style.border[CSS_LEFT] = 1; + node_0->style.border[CSS_TOP] = 1; + node_0->style.border[CSS_RIGHT] = 1; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.border[CSS_LEFT] = 3; + node_0->style.border[CSS_TOP] = 3; + node_0->style.border[CSS_BOTTOM] = 1; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node->style.flex = CSS_FLEX_NONE; - node->style.position_type = CSS_POSITION_RELATIVE; - node->style.dimensions[CSS_HEIGHT] = 200; - node->style.margin[CSS_TOP] = 4; - node->style.margin[CSS_RIGHT] = 9; - node->style.margin[CSS_BOTTOM] = 3; - node->style.padding[CSS_BOTTOM] = 19; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_TOP] = 2; - node->style.border[CSS_RIGHT] = 2; - node->style.border[CSS_BOTTOM] = 2; - node->style.border[CSS_TOP] = 1; - node->style.border[CSS_RIGHT] = 2; - node->style.measure = measure; - node->style.measure_context = "small"; - node = &outer_node_1->children[1]; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.position_type = CSS_POSITION_RELATIVE; - node->style.dimensions[CSS_HEIGHT] = 836; - node->style.margin[CSS_LEFT] = -2; - node->style.margin[CSS_TOP] = -2; - node->style.margin[CSS_RIGHT] = -2; - node->style.margin[CSS_BOTTOM] = -2; - node->style.margin[CSS_TOP] = -2; - node->style.margin[CSS_RIGHT] = 16; - node->style.margin[CSS_BOTTOM] = -1; - node->style.padding[CSS_LEFT] = 9; - node->style.padding[CSS_TOP] = 9; - node->style.padding[CSS_RIGHT] = 9; - node->style.padding[CSS_BOTTOM] = 9; - node->style.padding[CSS_RIGHT] = 15; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_TOP] = 2; - node->style.border[CSS_RIGHT] = 2; - node->style.border[CSS_BOTTOM] = 2; - node->style.border[CSS_TOP] = 2; - node->style.position[CSS_TOP] = -8; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_1->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; + node_1->style.flex = CSS_FLEX_NONE; + node_1->style.position_type = CSS_POSITION_RELATIVE; + node_1->style.dimensions[CSS_HEIGHT] = 200; + node_1->style.margin[CSS_TOP] = 4; + node_1->style.margin[CSS_RIGHT] = 9; + node_1->style.margin[CSS_BOTTOM] = 3; + node_1->style.padding[CSS_BOTTOM] = 19; + node_1->style.border[CSS_LEFT] = 2; + node_1->style.border[CSS_TOP] = 2; + node_1->style.border[CSS_RIGHT] = 2; + node_1->style.border[CSS_BOTTOM] = 2; + node_1->style.border[CSS_TOP] = 1; + node_1->style.border[CSS_RIGHT] = 2; + node_1->style.measure = measure; + node_1->style.measure_context = "small"; + node_1 = &node_0->children[1]; + node_1->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_1->style.align_items = CSS_ALIGN_CENTER; + node_1->style.position_type = CSS_POSITION_RELATIVE; + node_1->style.dimensions[CSS_HEIGHT] = 836; + node_1->style.margin[CSS_LEFT] = -2; + node_1->style.margin[CSS_TOP] = -2; + node_1->style.margin[CSS_RIGHT] = -2; + node_1->style.margin[CSS_BOTTOM] = -2; + node_1->style.margin[CSS_TOP] = -2; + node_1->style.margin[CSS_RIGHT] = 16; + node_1->style.margin[CSS_BOTTOM] = -1; + node_1->style.padding[CSS_LEFT] = 9; + node_1->style.padding[CSS_TOP] = 9; + node_1->style.padding[CSS_RIGHT] = 9; + node_1->style.padding[CSS_BOTTOM] = 9; + node_1->style.padding[CSS_RIGHT] = 15; + node_1->style.border[CSS_LEFT] = 2; + node_1->style.border[CSS_TOP] = 2; + node_1->style.border[CSS_RIGHT] = 2; + node_1->style.border[CSS_BOTTOM] = 2; + node_1->style.border[CSS_TOP] = 2; + node_1->style.position[CSS_TOP] = -8; + node_1->style.measure = measure; + node_1->style.measure_context = "small"; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -8; - node->layout.position[CSS_LEFT] = 13; - node->layout.dimensions[CSS_WIDTH] = 646; - node->layout.dimensions[CSS_HEIGHT] = 615; - init_css_node_children(node, 2); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -8; + node_0->layout.position[CSS_LEFT] = 13; + node_0->layout.dimensions[CSS_WIDTH] = 646; + node_0->layout.dimensions[CSS_HEIGHT] = 615; + init_css_node_children(node_0, 2); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 7; - node->layout.position[CSS_LEFT] = 3; - node->layout.dimensions[CSS_WIDTH] = 37; - node->layout.dimensions[CSS_HEIGHT] = 200; - node = &outer_node_1->children[1]; - node->layout.position[CSS_TOP] = 200; - node->layout.position[CSS_LEFT] = 1; - node->layout.dimensions[CSS_WIDTH] = 61; - node->layout.dimensions[CSS_HEIGHT] = 836; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 7; + node_1->layout.position[CSS_LEFT] = 3; + node_1->layout.dimensions[CSS_WIDTH] = 37; + node_1->layout.dimensions[CSS_HEIGHT] = 200; + node_1 = &node_0->children[1]; + node_1->layout.position[CSS_TOP] = 200; + node_1->layout.position[CSS_LEFT] = 1; + node_1->layout.dimensions[CSS_WIDTH] = 61; + node_1->layout.dimensions[CSS_HEIGHT] = 836; } } @@ -4256,16 +4110,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #52", root_node, root_layout); @@ -4274,16 +4127,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #53", root_node, root_layout); @@ -4292,18 +4144,18 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 171; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 171; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("Random #54", root_node, root_layout); @@ -4312,27 +4164,27 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_START; - node->style.margin[CSS_LEFT] = 3; - node->style.margin[CSS_TOP] = 3; - node->style.margin[CSS_RIGHT] = 3; - node->style.margin[CSS_BOTTOM] = 3; - node->style.margin[CSS_LEFT] = -9; - node->style.margin[CSS_RIGHT] = -3; - node->style.padding[CSS_RIGHT] = 0; - node->style.border[CSS_RIGHT] = 3; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; + node_0->style.margin[CSS_LEFT] = 3; + node_0->style.margin[CSS_TOP] = 3; + node_0->style.margin[CSS_RIGHT] = 3; + node_0->style.margin[CSS_BOTTOM] = 3; + node_0->style.margin[CSS_LEFT] = -9; + node_0->style.margin[CSS_RIGHT] = -3; + node_0->style.padding[CSS_RIGHT] = 0; + node_0->style.border[CSS_RIGHT] = 3; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 3; - node->layout.position[CSS_LEFT] = -9; - node->layout.dimensions[CSS_WIDTH] = 36; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 3; + node_0->layout.position[CSS_LEFT] = -9; + node_0->layout.dimensions[CSS_WIDTH] = 36; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("Random #55", root_node, root_layout); @@ -4341,26 +4193,26 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_WIDTH] = 800; - node->style.dimensions[CSS_HEIGHT] = 878; - node->style.margin[CSS_LEFT] = -10; - node->style.margin[CSS_TOP] = -10; - node->style.margin[CSS_RIGHT] = -10; - node->style.margin[CSS_BOTTOM] = -10; - node->style.margin[CSS_RIGHT] = -4; - node->style.padding[CSS_TOP] = 18; - node->style.padding[CSS_BOTTOM] = 0; - node->style.border[CSS_BOTTOM] = 0; + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_WIDTH] = 800; + node_0->style.dimensions[CSS_HEIGHT] = 878; + node_0->style.margin[CSS_LEFT] = -10; + node_0->style.margin[CSS_TOP] = -10; + node_0->style.margin[CSS_RIGHT] = -10; + node_0->style.margin[CSS_BOTTOM] = -10; + node_0->style.margin[CSS_RIGHT] = -4; + node_0->style.padding[CSS_TOP] = 18; + node_0->style.padding[CSS_BOTTOM] = 0; + node_0->style.border[CSS_BOTTOM] = 0; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -10; - node->layout.position[CSS_LEFT] = -10; - node->layout.dimensions[CSS_WIDTH] = 800; - node->layout.dimensions[CSS_HEIGHT] = 878; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -10; + node_0->layout.position[CSS_LEFT] = -10; + node_0->layout.dimensions[CSS_WIDTH] = 800; + node_0->layout.dimensions[CSS_HEIGHT] = 878; } test("Random #56", root_node, root_layout); @@ -4369,16 +4221,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #57", root_node, root_layout); @@ -4387,35 +4238,35 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_CENTER; - node->style.align_items = CSS_ALIGN_FLEX_START; - node->style.dimensions[CSS_WIDTH] = 693; - node->style.margin[CSS_LEFT] = 6; - node->style.margin[CSS_TOP] = 6; - node->style.margin[CSS_RIGHT] = 6; - node->style.margin[CSS_BOTTOM] = 6; - node->style.margin[CSS_LEFT] = 13; - node->style.margin[CSS_RIGHT] = 17; - node->style.margin[CSS_BOTTOM] = -9; - node->style.padding[CSS_LEFT] = 4; - node->style.padding[CSS_TOP] = 4; - node->style.padding[CSS_RIGHT] = 4; - node->style.padding[CSS_BOTTOM] = 4; - node->style.padding[CSS_RIGHT] = 14; - node->style.border[CSS_RIGHT] = 3; - node->style.border[CSS_BOTTOM] = 0; - node->style.position[CSS_LEFT] = 4; - node->style.position[CSS_TOP] = -1; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_CENTER; + node_0->style.align_items = CSS_ALIGN_FLEX_START; + node_0->style.dimensions[CSS_WIDTH] = 693; + node_0->style.margin[CSS_LEFT] = 6; + node_0->style.margin[CSS_TOP] = 6; + node_0->style.margin[CSS_RIGHT] = 6; + node_0->style.margin[CSS_BOTTOM] = 6; + node_0->style.margin[CSS_LEFT] = 13; + node_0->style.margin[CSS_RIGHT] = 17; + node_0->style.margin[CSS_BOTTOM] = -9; + node_0->style.padding[CSS_LEFT] = 4; + node_0->style.padding[CSS_TOP] = 4; + node_0->style.padding[CSS_RIGHT] = 4; + node_0->style.padding[CSS_BOTTOM] = 4; + node_0->style.padding[CSS_RIGHT] = 14; + node_0->style.border[CSS_RIGHT] = 3; + node_0->style.border[CSS_BOTTOM] = 0; + node_0->style.position[CSS_LEFT] = 4; + node_0->style.position[CSS_TOP] = -1; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 5; - node->layout.position[CSS_LEFT] = 17; - node->layout.dimensions[CSS_WIDTH] = 693; - node->layout.dimensions[CSS_HEIGHT] = 8; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 5; + node_0->layout.position[CSS_LEFT] = 17; + node_0->layout.dimensions[CSS_WIDTH] = 693; + node_0->layout.dimensions[CSS_HEIGHT] = 8; } test("Random #58", root_node, root_layout); @@ -4424,30 +4275,30 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.margin[CSS_LEFT] = 8; - node->style.margin[CSS_TOP] = -5; - node->style.margin[CSS_RIGHT] = 13; - node->style.margin[CSS_BOTTOM] = 18; - node->style.padding[CSS_LEFT] = 3; - node->style.padding[CSS_TOP] = 3; - node->style.padding[CSS_RIGHT] = 3; - node->style.padding[CSS_BOTTOM] = 3; - node->style.padding[CSS_LEFT] = 11; - node->style.padding[CSS_BOTTOM] = 7; - node->style.border[CSS_BOTTOM] = 1; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.margin[CSS_LEFT] = 8; + node_0->style.margin[CSS_TOP] = -5; + node_0->style.margin[CSS_RIGHT] = 13; + node_0->style.margin[CSS_BOTTOM] = 18; + node_0->style.padding[CSS_LEFT] = 3; + node_0->style.padding[CSS_TOP] = 3; + node_0->style.padding[CSS_RIGHT] = 3; + node_0->style.padding[CSS_BOTTOM] = 3; + node_0->style.padding[CSS_LEFT] = 11; + node_0->style.padding[CSS_BOTTOM] = 7; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -5; - node->layout.position[CSS_LEFT] = 8; - node->layout.dimensions[CSS_WIDTH] = 185; - node->layout.dimensions[CSS_HEIGHT] = 29; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -5; + node_0->layout.position[CSS_LEFT] = 8; + node_0->layout.dimensions[CSS_WIDTH] = 185; + node_0->layout.dimensions[CSS_HEIGHT] = 29; } test("Random #59", root_node, root_layout); @@ -4456,57 +4307,55 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.margin[CSS_LEFT] = -7; - node->style.margin[CSS_TOP] = -7; - node->style.margin[CSS_RIGHT] = -7; - node->style.margin[CSS_BOTTOM] = -7; - node->style.margin[CSS_LEFT] = 11; - node->style.margin[CSS_TOP] = -2; - node->style.margin[CSS_RIGHT] = -3; - node->style.margin[CSS_BOTTOM] = 11; - node->style.padding[CSS_RIGHT] = 2; - node->style.border[CSS_LEFT] = 3; - node->style.border[CSS_TOP] = 3; - node->style.border[CSS_RIGHT] = 3; - node->style.border[CSS_BOTTOM] = 3; - node->style.position[CSS_LEFT] = 1; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.margin[CSS_LEFT] = -7; + node_0->style.margin[CSS_TOP] = -7; + node_0->style.margin[CSS_RIGHT] = -7; + node_0->style.margin[CSS_BOTTOM] = -7; + node_0->style.margin[CSS_LEFT] = 11; + node_0->style.margin[CSS_TOP] = -2; + node_0->style.margin[CSS_RIGHT] = -3; + node_0->style.margin[CSS_BOTTOM] = 11; + node_0->style.padding[CSS_RIGHT] = 2; + node_0->style.border[CSS_LEFT] = 3; + node_0->style.border[CSS_TOP] = 3; + node_0->style.border[CSS_RIGHT] = 3; + node_0->style.border[CSS_BOTTOM] = 3; + node_0->style.position[CSS_LEFT] = 1; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex = CSS_FLEX_NONE; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.margin[CSS_LEFT] = 1; - node->style.margin[CSS_TOP] = 15; - node->style.margin[CSS_RIGHT] = 5; - node->style.margin[CSS_BOTTOM] = 12; - node->style.border[CSS_RIGHT] = 3; - node->style.border[CSS_BOTTOM] = 3; - node->style.position[CSS_LEFT] = 0; - node->style.position[CSS_TOP] = -5; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex = CSS_FLEX_NONE; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.margin[CSS_LEFT] = 1; + node_1->style.margin[CSS_TOP] = 15; + node_1->style.margin[CSS_RIGHT] = 5; + node_1->style.margin[CSS_BOTTOM] = 12; + node_1->style.border[CSS_RIGHT] = 3; + node_1->style.border[CSS_BOTTOM] = 3; + node_1->style.position[CSS_LEFT] = 0; + node_1->style.position[CSS_TOP] = -5; + node_1->style.measure = measure; + node_1->style.measure_context = "small"; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -2; - node->layout.position[CSS_LEFT] = 12; - node->layout.dimensions[CSS_WIDTH] = 8; - node->layout.dimensions[CSS_HEIGHT] = 6; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -2; + node_0->layout.position[CSS_LEFT] = 12; + node_0->layout.dimensions[CSS_WIDTH] = 8; + node_0->layout.dimensions[CSS_HEIGHT] = 6; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 13; - node->layout.position[CSS_LEFT] = 4; - node->layout.dimensions[CSS_WIDTH] = 36; - node->layout.dimensions[CSS_HEIGHT] = 21; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 13; + node_1->layout.position[CSS_LEFT] = 4; + node_1->layout.dimensions[CSS_WIDTH] = 36; + node_1->layout.dimensions[CSS_HEIGHT] = 21; } } @@ -4516,28 +4365,28 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.align_items = CSS_ALIGN_STRETCH; - node->style.dimensions[CSS_HEIGHT] = 165; - node->style.margin[CSS_RIGHT] = 5; - node->style.padding[CSS_LEFT] = 17; - node->style.padding[CSS_TOP] = 9; - node->style.padding[CSS_BOTTOM] = 6; - node->style.border[CSS_LEFT] = 3; - node->style.position[CSS_TOP] = 8; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.align_items = CSS_ALIGN_STRETCH; + node_0->style.dimensions[CSS_HEIGHT] = 165; + node_0->style.margin[CSS_RIGHT] = 5; + node_0->style.padding[CSS_LEFT] = 17; + node_0->style.padding[CSS_TOP] = 9; + node_0->style.padding[CSS_BOTTOM] = 6; + node_0->style.border[CSS_LEFT] = 3; + node_0->style.position[CSS_TOP] = 8; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 8; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 53; - node->layout.dimensions[CSS_HEIGHT] = 165; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 8; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 53; + node_0->layout.dimensions[CSS_HEIGHT] = 165; } test("Random #61", root_node, root_layout); @@ -4546,26 +4395,26 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node->style.dimensions[CSS_HEIGHT] = 173; - node->style.margin[CSS_LEFT] = 19; - node->style.margin[CSS_TOP] = 19; - node->style.margin[CSS_RIGHT] = 19; - node->style.margin[CSS_BOTTOM] = 19; - node->style.margin[CSS_TOP] = -5; - node->style.padding[CSS_TOP] = 19; - node->style.padding[CSS_RIGHT] = 10; - node->style.padding[CSS_BOTTOM] = 7; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; + node_0->style.dimensions[CSS_HEIGHT] = 173; + node_0->style.margin[CSS_LEFT] = 19; + node_0->style.margin[CSS_TOP] = 19; + node_0->style.margin[CSS_RIGHT] = 19; + node_0->style.margin[CSS_BOTTOM] = 19; + node_0->style.margin[CSS_TOP] = -5; + node_0->style.padding[CSS_TOP] = 19; + node_0->style.padding[CSS_RIGHT] = 10; + node_0->style.padding[CSS_BOTTOM] = 7; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -5; - node->layout.position[CSS_LEFT] = 19; - node->layout.dimensions[CSS_WIDTH] = 10; - node->layout.dimensions[CSS_HEIGHT] = 173; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -5; + node_0->layout.position[CSS_LEFT] = 19; + node_0->layout.dimensions[CSS_WIDTH] = 10; + node_0->layout.dimensions[CSS_HEIGHT] = 173; } test("Random #62", root_node, root_layout); @@ -4574,31 +4423,31 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_FLEX_END; - node->style.dimensions[CSS_WIDTH] = 686; - node->style.dimensions[CSS_HEIGHT] = 156; - node->style.margin[CSS_LEFT] = -4; - node->style.margin[CSS_RIGHT] = 16; - node->style.margin[CSS_BOTTOM] = 9; - node->style.padding[CSS_LEFT] = 19; - node->style.padding[CSS_TOP] = 19; - node->style.padding[CSS_RIGHT] = 19; - node->style.padding[CSS_BOTTOM] = 19; - node->style.padding[CSS_LEFT] = 9; - node->style.position[CSS_LEFT] = -4; - node->style.position[CSS_TOP] = 3; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_FLEX_END; + node_0->style.dimensions[CSS_WIDTH] = 686; + node_0->style.dimensions[CSS_HEIGHT] = 156; + node_0->style.margin[CSS_LEFT] = -4; + node_0->style.margin[CSS_RIGHT] = 16; + node_0->style.margin[CSS_BOTTOM] = 9; + node_0->style.padding[CSS_LEFT] = 19; + node_0->style.padding[CSS_TOP] = 19; + node_0->style.padding[CSS_RIGHT] = 19; + node_0->style.padding[CSS_BOTTOM] = 19; + node_0->style.padding[CSS_LEFT] = 9; + node_0->style.position[CSS_LEFT] = -4; + node_0->style.position[CSS_TOP] = 3; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 3; - node->layout.position[CSS_LEFT] = -8; - node->layout.dimensions[CSS_WIDTH] = 686; - node->layout.dimensions[CSS_HEIGHT] = 156; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 3; + node_0->layout.position[CSS_LEFT] = -8; + node_0->layout.dimensions[CSS_WIDTH] = 686; + node_0->layout.dimensions[CSS_HEIGHT] = 156; } test("Random #63", root_node, root_layout); @@ -4607,16 +4456,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #64", root_node, root_layout); @@ -4625,30 +4473,30 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.justify_content = CSS_JUSTIFY_CENTER; - node->style.dimensions[CSS_WIDTH] = 655; - node->style.dimensions[CSS_HEIGHT] = 360; - node->style.margin[CSS_LEFT] = -8; - node->style.margin[CSS_TOP] = -8; - node->style.margin[CSS_RIGHT] = -8; - node->style.margin[CSS_BOTTOM] = -8; - node->style.margin[CSS_TOP] = 5; - node->style.padding[CSS_TOP] = 19; - node->style.padding[CSS_BOTTOM] = 10; - node->style.border[CSS_LEFT] = 0; - node->style.border[CSS_BOTTOM] = 2; - node->style.position[CSS_LEFT] = 6; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.justify_content = CSS_JUSTIFY_CENTER; + node_0->style.dimensions[CSS_WIDTH] = 655; + node_0->style.dimensions[CSS_HEIGHT] = 360; + node_0->style.margin[CSS_LEFT] = -8; + node_0->style.margin[CSS_TOP] = -8; + node_0->style.margin[CSS_RIGHT] = -8; + node_0->style.margin[CSS_BOTTOM] = -8; + node_0->style.margin[CSS_TOP] = 5; + node_0->style.padding[CSS_TOP] = 19; + node_0->style.padding[CSS_BOTTOM] = 10; + node_0->style.border[CSS_LEFT] = 0; + node_0->style.border[CSS_BOTTOM] = 2; + node_0->style.position[CSS_LEFT] = 6; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 5; - node->layout.position[CSS_LEFT] = -2; - node->layout.dimensions[CSS_WIDTH] = 655; - node->layout.dimensions[CSS_HEIGHT] = 360; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 5; + node_0->layout.position[CSS_LEFT] = -2; + node_0->layout.dimensions[CSS_WIDTH] = 655; + node_0->layout.dimensions[CSS_HEIGHT] = 360; } test("Random #65", root_node, root_layout); @@ -4657,16 +4505,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #66", root_node, root_layout); @@ -4675,25 +4522,25 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node->style.dimensions[CSS_HEIGHT] = 662; - node->style.margin[CSS_RIGHT] = 12; - node->style.margin[CSS_BOTTOM] = -9; - node->style.padding[CSS_TOP] = 15; - node->style.padding[CSS_RIGHT] = 8; - node->style.position[CSS_LEFT] = 2; - node->style.position[CSS_TOP] = -8; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; + node_0->style.dimensions[CSS_HEIGHT] = 662; + node_0->style.margin[CSS_RIGHT] = 12; + node_0->style.margin[CSS_BOTTOM] = -9; + node_0->style.padding[CSS_TOP] = 15; + node_0->style.padding[CSS_RIGHT] = 8; + node_0->style.position[CSS_LEFT] = 2; + node_0->style.position[CSS_TOP] = -8; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -8; - node->layout.position[CSS_LEFT] = 2; - node->layout.dimensions[CSS_WIDTH] = 8; - node->layout.dimensions[CSS_HEIGHT] = 662; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -8; + node_0->layout.position[CSS_LEFT] = 2; + node_0->layout.dimensions[CSS_WIDTH] = 8; + node_0->layout.dimensions[CSS_HEIGHT] = 662; } test("Random #67", root_node, root_layout); @@ -4702,28 +4549,28 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_STRETCH; - node->style.margin[CSS_LEFT] = 0; - node->style.margin[CSS_TOP] = 0; - node->style.margin[CSS_RIGHT] = 0; - node->style.margin[CSS_BOTTOM] = 0; - node->style.margin[CSS_LEFT] = 7; - node->style.padding[CSS_TOP] = 2; - node->style.border[CSS_RIGHT] = 1; - node->style.position[CSS_LEFT] = -10; - node->style.position[CSS_TOP] = -8; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_STRETCH; + node_0->style.margin[CSS_LEFT] = 0; + node_0->style.margin[CSS_TOP] = 0; + node_0->style.margin[CSS_RIGHT] = 0; + node_0->style.margin[CSS_BOTTOM] = 0; + node_0->style.margin[CSS_LEFT] = 7; + node_0->style.padding[CSS_TOP] = 2; + node_0->style.border[CSS_RIGHT] = 1; + node_0->style.position[CSS_LEFT] = -10; + node_0->style.position[CSS_TOP] = -8; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -8; - node->layout.position[CSS_LEFT] = -3; - node->layout.dimensions[CSS_WIDTH] = 172; - node->layout.dimensions[CSS_HEIGHT] = 20; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -8; + node_0->layout.position[CSS_LEFT] = -3; + node_0->layout.dimensions[CSS_WIDTH] = 172; + node_0->layout.dimensions[CSS_HEIGHT] = 20; } test("Random #68", root_node, root_layout); @@ -4732,16 +4579,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #69", root_node, root_layout); @@ -4750,16 +4596,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #70", root_node, root_layout); @@ -4768,57 +4613,55 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.dimensions[CSS_WIDTH] = 615; - node->style.margin[CSS_LEFT] = 1; - node->style.margin[CSS_TOP] = 1; - node->style.margin[CSS_RIGHT] = 1; - node->style.margin[CSS_BOTTOM] = 1; - node->style.margin[CSS_TOP] = 17; - node->style.position[CSS_TOP] = 9; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.dimensions[CSS_WIDTH] = 615; + node_0->style.margin[CSS_LEFT] = 1; + node_0->style.margin[CSS_TOP] = 1; + node_0->style.margin[CSS_RIGHT] = 1; + node_0->style.margin[CSS_BOTTOM] = 1; + node_0->style.margin[CSS_TOP] = 17; + node_0->style.position[CSS_TOP] = 9; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.align_self = CSS_ALIGN_CENTER; - node->style.flex = CSS_FLEX_NONE; - node->style.dimensions[CSS_WIDTH] = 457; - node->style.dimensions[CSS_HEIGHT] = 476; - node->style.margin[CSS_LEFT] = 4; - node->style.margin[CSS_TOP] = 4; - node->style.margin[CSS_RIGHT] = 4; - node->style.margin[CSS_BOTTOM] = 4; - node->style.margin[CSS_RIGHT] = 1; - node->style.padding[CSS_LEFT] = 9; - node->style.padding[CSS_TOP] = 9; - node->style.padding[CSS_RIGHT] = 9; - node->style.padding[CSS_BOTTOM] = 9; - node->style.padding[CSS_TOP] = 6; - node->style.position[CSS_LEFT] = 0; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_1->style.align_self = CSS_ALIGN_CENTER; + node_1->style.flex = CSS_FLEX_NONE; + node_1->style.dimensions[CSS_WIDTH] = 457; + node_1->style.dimensions[CSS_HEIGHT] = 476; + node_1->style.margin[CSS_LEFT] = 4; + node_1->style.margin[CSS_TOP] = 4; + node_1->style.margin[CSS_RIGHT] = 4; + node_1->style.margin[CSS_BOTTOM] = 4; + node_1->style.margin[CSS_RIGHT] = 1; + node_1->style.padding[CSS_LEFT] = 9; + node_1->style.padding[CSS_TOP] = 9; + node_1->style.padding[CSS_RIGHT] = 9; + node_1->style.padding[CSS_BOTTOM] = 9; + node_1->style.padding[CSS_TOP] = 6; + node_1->style.position[CSS_LEFT] = 0; + node_1->style.measure = measure; + node_1->style.measure_context = "small"; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 26; - node->layout.position[CSS_LEFT] = 1; - node->layout.dimensions[CSS_WIDTH] = 615; - node->layout.dimensions[CSS_HEIGHT] = 484; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 26; + node_0->layout.position[CSS_LEFT] = 1; + node_0->layout.dimensions[CSS_WIDTH] = 615; + node_0->layout.dimensions[CSS_HEIGHT] = 484; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 4; - node->layout.position[CSS_LEFT] = 4; - node->layout.dimensions[CSS_WIDTH] = 457; - node->layout.dimensions[CSS_HEIGHT] = 476; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 4; + node_1->layout.position[CSS_LEFT] = 4; + node_1->layout.dimensions[CSS_WIDTH] = 457; + node_1->layout.dimensions[CSS_HEIGHT] = 476; } } @@ -4828,27 +4671,27 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.dimensions[CSS_WIDTH] = 468; - node->style.dimensions[CSS_HEIGHT] = 523; - node->style.margin[CSS_TOP] = -2; - node->style.padding[CSS_LEFT] = 11; - node->style.padding[CSS_TOP] = 11; - node->style.padding[CSS_RIGHT] = 11; - node->style.padding[CSS_BOTTOM] = 11; - node->style.padding[CSS_LEFT] = 11; - node->style.position[CSS_TOP] = 8; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.dimensions[CSS_WIDTH] = 468; + node_0->style.dimensions[CSS_HEIGHT] = 523; + node_0->style.margin[CSS_TOP] = -2; + node_0->style.padding[CSS_LEFT] = 11; + node_0->style.padding[CSS_TOP] = 11; + node_0->style.padding[CSS_RIGHT] = 11; + node_0->style.padding[CSS_BOTTOM] = 11; + node_0->style.padding[CSS_LEFT] = 11; + node_0->style.position[CSS_TOP] = 8; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 6; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 468; - node->layout.dimensions[CSS_HEIGHT] = 523; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 6; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 468; + node_0->layout.dimensions[CSS_HEIGHT] = 523; } test("Random #72", root_node, root_layout); @@ -4857,16 +4700,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #73", root_node, root_layout); @@ -4875,16 +4717,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #74", root_node, root_layout); @@ -4893,29 +4734,29 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.dimensions[CSS_WIDTH] = 933; - node->style.margin[CSS_LEFT] = 5; - node->style.margin[CSS_TOP] = 5; - node->style.margin[CSS_RIGHT] = 5; - node->style.margin[CSS_BOTTOM] = 5; - node->style.margin[CSS_TOP] = 1; - node->style.margin[CSS_BOTTOM] = 3; - node->style.border[CSS_BOTTOM] = 1; - node->style.position[CSS_TOP] = 7; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.dimensions[CSS_WIDTH] = 933; + node_0->style.margin[CSS_LEFT] = 5; + node_0->style.margin[CSS_TOP] = 5; + node_0->style.margin[CSS_RIGHT] = 5; + node_0->style.margin[CSS_BOTTOM] = 5; + node_0->style.margin[CSS_TOP] = 1; + node_0->style.margin[CSS_BOTTOM] = 3; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.position[CSS_TOP] = 7; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 8; - node->layout.position[CSS_LEFT] = 5; - node->layout.dimensions[CSS_WIDTH] = 933; - node->layout.dimensions[CSS_HEIGHT] = 19; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 8; + node_0->layout.position[CSS_LEFT] = 5; + node_0->layout.dimensions[CSS_WIDTH] = 933; + node_0->layout.dimensions[CSS_HEIGHT] = 19; } test("Random #75", root_node, root_layout); @@ -4924,29 +4765,29 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_FLEX_START; - node->style.dimensions[CSS_HEIGHT] = 486; - node->style.margin[CSS_LEFT] = 1; - node->style.margin[CSS_TOP] = 1; - node->style.margin[CSS_RIGHT] = 1; - node->style.margin[CSS_BOTTOM] = 1; - node->style.margin[CSS_LEFT] = 17; - node->style.margin[CSS_TOP] = 7; - node->style.padding[CSS_LEFT] = 12; - node->style.padding[CSS_TOP] = 12; - node->style.padding[CSS_RIGHT] = 12; - node->style.padding[CSS_BOTTOM] = 12; - node->style.border[CSS_BOTTOM] = 1; + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_FLEX_START; + node_0->style.dimensions[CSS_HEIGHT] = 486; + node_0->style.margin[CSS_LEFT] = 1; + node_0->style.margin[CSS_TOP] = 1; + node_0->style.margin[CSS_RIGHT] = 1; + node_0->style.margin[CSS_BOTTOM] = 1; + node_0->style.margin[CSS_LEFT] = 17; + node_0->style.margin[CSS_TOP] = 7; + node_0->style.padding[CSS_LEFT] = 12; + node_0->style.padding[CSS_TOP] = 12; + node_0->style.padding[CSS_RIGHT] = 12; + node_0->style.padding[CSS_BOTTOM] = 12; + node_0->style.border[CSS_BOTTOM] = 1; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 7; - node->layout.position[CSS_LEFT] = 17; - node->layout.dimensions[CSS_WIDTH] = 24; - node->layout.dimensions[CSS_HEIGHT] = 486; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 7; + node_0->layout.position[CSS_LEFT] = 17; + node_0->layout.dimensions[CSS_WIDTH] = 24; + node_0->layout.dimensions[CSS_HEIGHT] = 486; } test("Random #76", root_node, root_layout); @@ -4955,34 +4796,34 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node->style.dimensions[CSS_WIDTH] = 828; - node->style.margin[CSS_LEFT] = -4; - node->style.margin[CSS_TOP] = -4; - node->style.margin[CSS_RIGHT] = -4; - node->style.margin[CSS_BOTTOM] = -4; - node->style.margin[CSS_RIGHT] = -8; - node->style.padding[CSS_LEFT] = 2; - node->style.padding[CSS_TOP] = 2; - node->style.padding[CSS_RIGHT] = 2; - node->style.padding[CSS_BOTTOM] = 2; - node->style.padding[CSS_RIGHT] = 15; - node->style.padding[CSS_BOTTOM] = 5; - node->style.border[CSS_LEFT] = 0; - node->style.border[CSS_TOP] = 0; - node->style.border[CSS_RIGHT] = 0; - node->style.border[CSS_BOTTOM] = 0; - node->style.border[CSS_BOTTOM] = 3; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; + node_0->style.dimensions[CSS_WIDTH] = 828; + node_0->style.margin[CSS_LEFT] = -4; + node_0->style.margin[CSS_TOP] = -4; + node_0->style.margin[CSS_RIGHT] = -4; + node_0->style.margin[CSS_BOTTOM] = -4; + node_0->style.margin[CSS_RIGHT] = -8; + node_0->style.padding[CSS_LEFT] = 2; + node_0->style.padding[CSS_TOP] = 2; + node_0->style.padding[CSS_RIGHT] = 2; + node_0->style.padding[CSS_BOTTOM] = 2; + node_0->style.padding[CSS_RIGHT] = 15; + node_0->style.padding[CSS_BOTTOM] = 5; + node_0->style.border[CSS_LEFT] = 0; + node_0->style.border[CSS_TOP] = 0; + node_0->style.border[CSS_RIGHT] = 0; + node_0->style.border[CSS_BOTTOM] = 0; + node_0->style.border[CSS_BOTTOM] = 3; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -4; - node->layout.position[CSS_LEFT] = -4; - node->layout.dimensions[CSS_WIDTH] = 828; - node->layout.dimensions[CSS_HEIGHT] = 10; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -4; + node_0->layout.position[CSS_LEFT] = -4; + node_0->layout.dimensions[CSS_WIDTH] = 828; + node_0->layout.dimensions[CSS_HEIGHT] = 10; } test("Random #77", root_node, root_layout); @@ -4991,33 +4832,33 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.dimensions[CSS_WIDTH] = 539; - node->style.dimensions[CSS_HEIGHT] = 473; - node->style.margin[CSS_LEFT] = -2; - node->style.margin[CSS_TOP] = -2; - node->style.margin[CSS_RIGHT] = -2; - node->style.margin[CSS_BOTTOM] = -2; - node->style.margin[CSS_BOTTOM] = -6; - node->style.padding[CSS_LEFT] = 3; - node->style.padding[CSS_TOP] = 3; - node->style.padding[CSS_RIGHT] = 3; - node->style.padding[CSS_BOTTOM] = 3; - node->style.padding[CSS_BOTTOM] = 9; - node->style.border[CSS_LEFT] = 1; - node->style.border[CSS_RIGHT] = 2; - node->style.position[CSS_LEFT] = 1; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; + node_0->style.align_items = CSS_ALIGN_CENTER; + node_0->style.dimensions[CSS_WIDTH] = 539; + node_0->style.dimensions[CSS_HEIGHT] = 473; + node_0->style.margin[CSS_LEFT] = -2; + node_0->style.margin[CSS_TOP] = -2; + node_0->style.margin[CSS_RIGHT] = -2; + node_0->style.margin[CSS_BOTTOM] = -2; + node_0->style.margin[CSS_BOTTOM] = -6; + node_0->style.padding[CSS_LEFT] = 3; + node_0->style.padding[CSS_TOP] = 3; + node_0->style.padding[CSS_RIGHT] = 3; + node_0->style.padding[CSS_BOTTOM] = 3; + node_0->style.padding[CSS_BOTTOM] = 9; + node_0->style.border[CSS_LEFT] = 1; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.position[CSS_LEFT] = 1; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -2; - node->layout.position[CSS_LEFT] = -1; - node->layout.dimensions[CSS_WIDTH] = 539; - node->layout.dimensions[CSS_HEIGHT] = 473; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -2; + node_0->layout.position[CSS_LEFT] = -1; + node_0->layout.dimensions[CSS_WIDTH] = 539; + node_0->layout.dimensions[CSS_HEIGHT] = 473; } test("Random #78", root_node, root_layout); @@ -5026,16 +4867,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #79", root_node, root_layout); @@ -5044,34 +4884,34 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_START; - node->style.dimensions[CSS_WIDTH] = 746; - node->style.dimensions[CSS_HEIGHT] = 357; - node->style.margin[CSS_LEFT] = -8; - node->style.margin[CSS_TOP] = -8; - node->style.margin[CSS_RIGHT] = -8; - node->style.margin[CSS_BOTTOM] = -8; - node->style.padding[CSS_LEFT] = 3; - node->style.padding[CSS_TOP] = 3; - node->style.padding[CSS_RIGHT] = 3; - node->style.padding[CSS_BOTTOM] = 3; - node->style.padding[CSS_LEFT] = 1; - node->style.padding[CSS_BOTTOM] = 14; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_TOP] = 2; - node->style.border[CSS_RIGHT] = 2; - node->style.border[CSS_BOTTOM] = 2; - node->style.border[CSS_RIGHT] = 1; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; + node_0->style.dimensions[CSS_WIDTH] = 746; + node_0->style.dimensions[CSS_HEIGHT] = 357; + node_0->style.margin[CSS_LEFT] = -8; + node_0->style.margin[CSS_TOP] = -8; + node_0->style.margin[CSS_RIGHT] = -8; + node_0->style.margin[CSS_BOTTOM] = -8; + node_0->style.padding[CSS_LEFT] = 3; + node_0->style.padding[CSS_TOP] = 3; + node_0->style.padding[CSS_RIGHT] = 3; + node_0->style.padding[CSS_BOTTOM] = 3; + node_0->style.padding[CSS_LEFT] = 1; + node_0->style.padding[CSS_BOTTOM] = 14; + node_0->style.border[CSS_LEFT] = 2; + node_0->style.border[CSS_TOP] = 2; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.border[CSS_BOTTOM] = 2; + node_0->style.border[CSS_RIGHT] = 1; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -8; - node->layout.position[CSS_LEFT] = -8; - node->layout.dimensions[CSS_WIDTH] = 746; - node->layout.dimensions[CSS_HEIGHT] = 357; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -8; + node_0->layout.position[CSS_LEFT] = -8; + node_0->layout.dimensions[CSS_WIDTH] = 746; + node_0->layout.dimensions[CSS_HEIGHT] = 357; } test("Random #80", root_node, root_layout); @@ -5080,16 +4920,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #81", root_node, root_layout); @@ -5098,26 +4937,26 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.align_items = CSS_ALIGN_FLEX_END; - node->style.dimensions[CSS_HEIGHT] = 459; - node->style.margin[CSS_TOP] = 5; - node->style.margin[CSS_RIGHT] = -1; - node->style.border[CSS_RIGHT] = 3; - node->style.border[CSS_BOTTOM] = 1; - node->style.position[CSS_LEFT] = -2; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.align_items = CSS_ALIGN_FLEX_END; + node_0->style.dimensions[CSS_HEIGHT] = 459; + node_0->style.margin[CSS_TOP] = 5; + node_0->style.margin[CSS_RIGHT] = -1; + node_0->style.border[CSS_RIGHT] = 3; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.position[CSS_LEFT] = -2; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 5; - node->layout.position[CSS_LEFT] = -2; - node->layout.dimensions[CSS_WIDTH] = 174; - node->layout.dimensions[CSS_HEIGHT] = 459; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 5; + node_0->layout.position[CSS_LEFT] = -2; + node_0->layout.dimensions[CSS_WIDTH] = 174; + node_0->layout.dimensions[CSS_HEIGHT] = 459; } test("Random #82", root_node, root_layout); @@ -5126,30 +4965,30 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.align_items = CSS_ALIGN_STRETCH; - node->style.dimensions[CSS_HEIGHT] = 175; - node->style.margin[CSS_LEFT] = 15; - node->style.margin[CSS_TOP] = 15; - node->style.margin[CSS_RIGHT] = 15; - node->style.margin[CSS_BOTTOM] = 15; - node->style.margin[CSS_LEFT] = -5; - node->style.margin[CSS_RIGHT] = 2; - node->style.padding[CSS_TOP] = 5; - node->style.padding[CSS_RIGHT] = 12; - node->style.position[CSS_TOP] = 9; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.align_items = CSS_ALIGN_STRETCH; + node_0->style.dimensions[CSS_HEIGHT] = 175; + node_0->style.margin[CSS_LEFT] = 15; + node_0->style.margin[CSS_TOP] = 15; + node_0->style.margin[CSS_RIGHT] = 15; + node_0->style.margin[CSS_BOTTOM] = 15; + node_0->style.margin[CSS_LEFT] = -5; + node_0->style.margin[CSS_RIGHT] = 2; + node_0->style.padding[CSS_TOP] = 5; + node_0->style.padding[CSS_RIGHT] = 12; + node_0->style.position[CSS_TOP] = 9; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 24; - node->layout.position[CSS_LEFT] = -5; - node->layout.dimensions[CSS_WIDTH] = 183; - node->layout.dimensions[CSS_HEIGHT] = 175; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 24; + node_0->layout.position[CSS_LEFT] = -5; + node_0->layout.dimensions[CSS_WIDTH] = 183; + node_0->layout.dimensions[CSS_HEIGHT] = 175; } test("Random #83", root_node, root_layout); @@ -5158,27 +4997,27 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_STRETCH; - node->style.dimensions[CSS_HEIGHT] = 0; - node->style.padding[CSS_LEFT] = 11; - node->style.padding[CSS_TOP] = 11; - node->style.padding[CSS_RIGHT] = 11; - node->style.padding[CSS_BOTTOM] = 11; - node->style.padding[CSS_LEFT] = 8; - node->style.padding[CSS_TOP] = 17; - node->style.border[CSS_LEFT] = 3; - node->style.border[CSS_TOP] = 3; - node->style.border[CSS_RIGHT] = 1; + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_STRETCH; + node_0->style.dimensions[CSS_HEIGHT] = 0; + node_0->style.padding[CSS_LEFT] = 11; + node_0->style.padding[CSS_TOP] = 11; + node_0->style.padding[CSS_RIGHT] = 11; + node_0->style.padding[CSS_BOTTOM] = 11; + node_0->style.padding[CSS_LEFT] = 8; + node_0->style.padding[CSS_TOP] = 17; + node_0->style.border[CSS_LEFT] = 3; + node_0->style.border[CSS_TOP] = 3; + node_0->style.border[CSS_RIGHT] = 1; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 23; - node->layout.dimensions[CSS_HEIGHT] = 31; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 23; + node_0->layout.dimensions[CSS_HEIGHT] = 31; } test("Random #84", root_node, root_layout); @@ -5187,24 +5026,24 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node->style.align_items = CSS_ALIGN_STRETCH; - node->style.dimensions[CSS_HEIGHT] = 466; - node->style.margin[CSS_LEFT] = 12; - node->style.margin[CSS_TOP] = -4; - node->style.margin[CSS_BOTTOM] = 0; - node->style.border[CSS_BOTTOM] = 1; - node->style.position[CSS_LEFT] = 1; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; + node_0->style.align_items = CSS_ALIGN_STRETCH; + node_0->style.dimensions[CSS_HEIGHT] = 466; + node_0->style.margin[CSS_LEFT] = 12; + node_0->style.margin[CSS_TOP] = -4; + node_0->style.margin[CSS_BOTTOM] = 0; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.position[CSS_LEFT] = 1; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -4; - node->layout.position[CSS_LEFT] = 13; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 466; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -4; + node_0->layout.position[CSS_LEFT] = 13; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 466; } test("Random #85", root_node, root_layout); @@ -5213,24 +5052,24 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.margin[CSS_LEFT] = 18; - node->style.margin[CSS_TOP] = -4; - node->style.padding[CSS_RIGHT] = 19; - node->style.position[CSS_LEFT] = -6; - node->style.position[CSS_TOP] = -5; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_CENTER; + node_0->style.margin[CSS_LEFT] = 18; + node_0->style.margin[CSS_TOP] = -4; + node_0->style.padding[CSS_RIGHT] = 19; + node_0->style.position[CSS_LEFT] = -6; + node_0->style.position[CSS_TOP] = -5; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -9; - node->layout.position[CSS_LEFT] = 12; - node->layout.dimensions[CSS_WIDTH] = 52; - node->layout.dimensions[CSS_HEIGHT] = 18; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -9; + node_0->layout.position[CSS_LEFT] = 12; + node_0->layout.dimensions[CSS_WIDTH] = 52; + node_0->layout.dimensions[CSS_HEIGHT] = 18; } test("Random #86", root_node, root_layout); @@ -5239,60 +5078,58 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.align_items = CSS_ALIGN_FLEX_START; - node->style.margin[CSS_TOP] = 18; - node->style.margin[CSS_RIGHT] = 5; - node->style.padding[CSS_LEFT] = 5; - node->style.padding[CSS_TOP] = 5; - node->style.padding[CSS_RIGHT] = 5; - node->style.padding[CSS_BOTTOM] = 5; - node->style.padding[CSS_TOP] = 5; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_TOP] = 2; - node->style.border[CSS_RIGHT] = 2; - node->style.border[CSS_BOTTOM] = 2; - node->style.position[CSS_TOP] = 4; - init_css_node_children(node, 1); + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.align_items = CSS_ALIGN_FLEX_START; + node_0->style.margin[CSS_TOP] = 18; + node_0->style.margin[CSS_RIGHT] = 5; + node_0->style.padding[CSS_LEFT] = 5; + node_0->style.padding[CSS_TOP] = 5; + node_0->style.padding[CSS_RIGHT] = 5; + node_0->style.padding[CSS_BOTTOM] = 5; + node_0->style.padding[CSS_TOP] = 5; + node_0->style.border[CSS_LEFT] = 2; + node_0->style.border[CSS_TOP] = 2; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.border[CSS_BOTTOM] = 2; + node_0->style.position[CSS_TOP] = 4; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->style.align_self = CSS_ALIGN_CENTER; - node->style.flex = CSS_FLEX_ONE; - node->style.position_type = CSS_POSITION_ABSOLUTE; - node->style.margin[CSS_LEFT] = 9; - node->style.margin[CSS_TOP] = 19; - node->style.padding[CSS_LEFT] = 17; - node->style.padding[CSS_TOP] = 17; - node->style.padding[CSS_RIGHT] = 17; - node->style.padding[CSS_BOTTOM] = 17; - node->style.padding[CSS_LEFT] = 15; - node->style.border[CSS_RIGHT] = 2; - node->style.position[CSS_LEFT] = 7; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->style.align_self = CSS_ALIGN_CENTER; + node_1->style.flex = CSS_FLEX_ONE; + node_1->style.position_type = CSS_POSITION_ABSOLUTE; + node_1->style.margin[CSS_LEFT] = 9; + node_1->style.margin[CSS_TOP] = 19; + node_1->style.padding[CSS_LEFT] = 17; + node_1->style.padding[CSS_TOP] = 17; + node_1->style.padding[CSS_RIGHT] = 17; + node_1->style.padding[CSS_BOTTOM] = 17; + node_1->style.padding[CSS_LEFT] = 15; + node_1->style.border[CSS_RIGHT] = 2; + node_1->style.position[CSS_LEFT] = 7; + node_1->style.measure = measure; + node_1->style.measure_context = "loooooooooong with space"; } } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 22; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 14; - node->layout.dimensions[CSS_HEIGHT] = 14; - init_css_node_children(node, 1); + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 22; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 14; + node_0->layout.dimensions[CSS_HEIGHT] = 14; + init_css_node_children(node_0, 1); { - css_node_t *outer_node_1 = node; - css_node_t *node; - node = &outer_node_1->children[0]; - node->layout.position[CSS_TOP] = 26; - node->layout.position[CSS_LEFT] = 18; - node->layout.dimensions[CSS_WIDTH] = 134; - node->layout.dimensions[CSS_HEIGHT] = 70; + css_node_t *node_1; + node_1 = &node_0->children[0]; + node_1->layout.position[CSS_TOP] = 26; + node_1->layout.position[CSS_LEFT] = 18; + node_1->layout.dimensions[CSS_WIDTH] = 134; + node_1->layout.dimensions[CSS_HEIGHT] = 70; } } @@ -5302,30 +5139,30 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.dimensions[CSS_HEIGHT] = 924; - node->style.margin[CSS_LEFT] = 2; - node->style.margin[CSS_TOP] = 5; - node->style.margin[CSS_RIGHT] = -2; - node->style.margin[CSS_BOTTOM] = -9; - node->style.padding[CSS_LEFT] = 19; - node->style.padding[CSS_TOP] = 19; - node->style.padding[CSS_RIGHT] = 19; - node->style.padding[CSS_BOTTOM] = 19; - node->style.padding[CSS_TOP] = 10; - node->style.padding[CSS_BOTTOM] = 5; - node->style.position[CSS_TOP] = 4; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.dimensions[CSS_HEIGHT] = 924; + node_0->style.margin[CSS_LEFT] = 2; + node_0->style.margin[CSS_TOP] = 5; + node_0->style.margin[CSS_RIGHT] = -2; + node_0->style.margin[CSS_BOTTOM] = -9; + node_0->style.padding[CSS_LEFT] = 19; + node_0->style.padding[CSS_TOP] = 19; + node_0->style.padding[CSS_RIGHT] = 19; + node_0->style.padding[CSS_BOTTOM] = 19; + node_0->style.padding[CSS_TOP] = 10; + node_0->style.padding[CSS_BOTTOM] = 5; + node_0->style.position[CSS_TOP] = 4; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 9; - node->layout.position[CSS_LEFT] = 2; - node->layout.dimensions[CSS_WIDTH] = 209; - node->layout.dimensions[CSS_HEIGHT] = 924; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 9; + node_0->layout.position[CSS_LEFT] = 2; + node_0->layout.dimensions[CSS_WIDTH] = 209; + node_0->layout.dimensions[CSS_HEIGHT] = 924; } test("Random #88", root_node, root_layout); @@ -5334,32 +5171,32 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_CENTER; - node->style.margin[CSS_LEFT] = -9; - node->style.margin[CSS_TOP] = -9; - node->style.margin[CSS_RIGHT] = -9; - node->style.margin[CSS_BOTTOM] = -9; - node->style.margin[CSS_BOTTOM] = -3; - node->style.padding[CSS_LEFT] = 4; - node->style.padding[CSS_TOP] = 4; - node->style.padding[CSS_RIGHT] = 4; - node->style.padding[CSS_BOTTOM] = 4; - node->style.padding[CSS_LEFT] = 12; - node->style.border[CSS_LEFT] = 1; - node->style.border[CSS_TOP] = 1; - node->style.border[CSS_RIGHT] = 1; - node->style.border[CSS_BOTTOM] = 1; - node->style.position[CSS_LEFT] = -10; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_CENTER; + node_0->style.margin[CSS_LEFT] = -9; + node_0->style.margin[CSS_TOP] = -9; + node_0->style.margin[CSS_RIGHT] = -9; + node_0->style.margin[CSS_BOTTOM] = -9; + node_0->style.margin[CSS_BOTTOM] = -3; + node_0->style.padding[CSS_LEFT] = 4; + node_0->style.padding[CSS_TOP] = 4; + node_0->style.padding[CSS_RIGHT] = 4; + node_0->style.padding[CSS_BOTTOM] = 4; + node_0->style.padding[CSS_LEFT] = 12; + node_0->style.border[CSS_LEFT] = 1; + node_0->style.border[CSS_TOP] = 1; + node_0->style.border[CSS_RIGHT] = 1; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.position[CSS_LEFT] = -10; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -9; - node->layout.position[CSS_LEFT] = -19; - node->layout.dimensions[CSS_WIDTH] = 18; - node->layout.dimensions[CSS_HEIGHT] = 10; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -9; + node_0->layout.position[CSS_LEFT] = -19; + node_0->layout.dimensions[CSS_WIDTH] = 18; + node_0->layout.dimensions[CSS_HEIGHT] = 10; } test("Random #89", root_node, root_layout); @@ -5368,29 +5205,29 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_END; - node->style.align_items = CSS_ALIGN_FLEX_END; - node->style.dimensions[CSS_HEIGHT] = 819; - node->style.margin[CSS_LEFT] = 1; - node->style.margin[CSS_TOP] = 1; - node->style.margin[CSS_RIGHT] = 1; - node->style.margin[CSS_BOTTOM] = 1; - node->style.margin[CSS_TOP] = -3; - node->style.margin[CSS_BOTTOM] = 5; - node->style.padding[CSS_LEFT] = 18; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_RIGHT] = 3; - node->style.position[CSS_LEFT] = 5; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_END; + node_0->style.align_items = CSS_ALIGN_FLEX_END; + node_0->style.dimensions[CSS_HEIGHT] = 819; + node_0->style.margin[CSS_LEFT] = 1; + node_0->style.margin[CSS_TOP] = 1; + node_0->style.margin[CSS_RIGHT] = 1; + node_0->style.margin[CSS_BOTTOM] = 1; + node_0->style.margin[CSS_TOP] = -3; + node_0->style.margin[CSS_BOTTOM] = 5; + node_0->style.padding[CSS_LEFT] = 18; + node_0->style.border[CSS_LEFT] = 2; + node_0->style.border[CSS_RIGHT] = 3; + node_0->style.position[CSS_LEFT] = 5; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -3; - node->layout.position[CSS_LEFT] = 6; - node->layout.dimensions[CSS_WIDTH] = 23; - node->layout.dimensions[CSS_HEIGHT] = 819; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -3; + node_0->layout.position[CSS_LEFT] = 6; + node_0->layout.dimensions[CSS_WIDTH] = 23; + node_0->layout.dimensions[CSS_HEIGHT] = 819; } test("Random #90", root_node, root_layout); @@ -5399,34 +5236,34 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.dimensions[CSS_WIDTH] = 532; - node->style.margin[CSS_LEFT] = 8; - node->style.margin[CSS_TOP] = 8; - node->style.margin[CSS_RIGHT] = 8; - node->style.margin[CSS_BOTTOM] = 8; - node->style.margin[CSS_LEFT] = 16; - node->style.margin[CSS_BOTTOM] = 9; - node->style.padding[CSS_LEFT] = 7; - node->style.padding[CSS_TOP] = 7; - node->style.padding[CSS_RIGHT] = 7; - node->style.padding[CSS_BOTTOM] = 7; - node->style.padding[CSS_LEFT] = 8; - node->style.padding[CSS_TOP] = 5; - node->style.position[CSS_LEFT] = 4; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.dimensions[CSS_WIDTH] = 532; + node_0->style.margin[CSS_LEFT] = 8; + node_0->style.margin[CSS_TOP] = 8; + node_0->style.margin[CSS_RIGHT] = 8; + node_0->style.margin[CSS_BOTTOM] = 8; + node_0->style.margin[CSS_LEFT] = 16; + node_0->style.margin[CSS_BOTTOM] = 9; + node_0->style.padding[CSS_LEFT] = 7; + node_0->style.padding[CSS_TOP] = 7; + node_0->style.padding[CSS_RIGHT] = 7; + node_0->style.padding[CSS_BOTTOM] = 7; + node_0->style.padding[CSS_LEFT] = 8; + node_0->style.padding[CSS_TOP] = 5; + node_0->style.position[CSS_LEFT] = 4; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 8; - node->layout.position[CSS_LEFT] = 20; - node->layout.dimensions[CSS_WIDTH] = 532; - node->layout.dimensions[CSS_HEIGHT] = 30; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 8; + node_0->layout.position[CSS_LEFT] = 20; + node_0->layout.dimensions[CSS_WIDTH] = 532; + node_0->layout.dimensions[CSS_HEIGHT] = 30; } test("Random #91", root_node, root_layout); @@ -5435,25 +5272,25 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.margin[CSS_LEFT] = 13; - node->style.padding[CSS_LEFT] = 0; - node->style.padding[CSS_TOP] = 0; - node->style.padding[CSS_RIGHT] = 0; - node->style.padding[CSS_BOTTOM] = 0; - node->style.border[CSS_RIGHT] = 1; - node->style.border[CSS_BOTTOM] = 1; - node->style.position[CSS_LEFT] = 8; - node->style.position[CSS_TOP] = -9; + css_node_t *node_0 = root_node; + node_0->style.margin[CSS_LEFT] = 13; + node_0->style.padding[CSS_LEFT] = 0; + node_0->style.padding[CSS_TOP] = 0; + node_0->style.padding[CSS_RIGHT] = 0; + node_0->style.padding[CSS_BOTTOM] = 0; + node_0->style.border[CSS_RIGHT] = 1; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.position[CSS_LEFT] = 8; + node_0->style.position[CSS_TOP] = -9; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -9; - node->layout.position[CSS_LEFT] = 21; - node->layout.dimensions[CSS_WIDTH] = 1; - node->layout.dimensions[CSS_HEIGHT] = 1; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -9; + node_0->layout.position[CSS_LEFT] = 21; + node_0->layout.dimensions[CSS_WIDTH] = 1; + node_0->layout.dimensions[CSS_HEIGHT] = 1; } test("Random #92", root_node, root_layout); @@ -5462,36 +5299,36 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.align_items = CSS_ALIGN_FLEX_END; - node->style.dimensions[CSS_HEIGHT] = 632; - node->style.margin[CSS_LEFT] = 11; - node->style.margin[CSS_TOP] = 11; - node->style.margin[CSS_RIGHT] = 11; - node->style.margin[CSS_BOTTOM] = 11; - node->style.margin[CSS_TOP] = -3; - node->style.margin[CSS_RIGHT] = 5; - node->style.margin[CSS_BOTTOM] = -6; - node->style.padding[CSS_LEFT] = 1; - node->style.border[CSS_LEFT] = 0; - node->style.border[CSS_TOP] = 0; - node->style.border[CSS_RIGHT] = 0; - node->style.border[CSS_BOTTOM] = 0; - node->style.position[CSS_LEFT] = 4; - node->style.position[CSS_TOP] = 8; - node->style.measure = measure; - node->style.measure_context = "small"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.align_items = CSS_ALIGN_FLEX_END; + node_0->style.dimensions[CSS_HEIGHT] = 632; + node_0->style.margin[CSS_LEFT] = 11; + node_0->style.margin[CSS_TOP] = 11; + node_0->style.margin[CSS_RIGHT] = 11; + node_0->style.margin[CSS_BOTTOM] = 11; + node_0->style.margin[CSS_TOP] = -3; + node_0->style.margin[CSS_RIGHT] = 5; + node_0->style.margin[CSS_BOTTOM] = -6; + node_0->style.padding[CSS_LEFT] = 1; + node_0->style.border[CSS_LEFT] = 0; + node_0->style.border[CSS_TOP] = 0; + node_0->style.border[CSS_RIGHT] = 0; + node_0->style.border[CSS_BOTTOM] = 0; + node_0->style.position[CSS_LEFT] = 4; + node_0->style.position[CSS_TOP] = 8; + node_0->style.measure = measure; + node_0->style.measure_context = "small"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 5; - node->layout.position[CSS_LEFT] = 15; - node->layout.dimensions[CSS_WIDTH] = 34; - node->layout.dimensions[CSS_HEIGHT] = 632; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 5; + node_0->layout.position[CSS_LEFT] = 15; + node_0->layout.dimensions[CSS_WIDTH] = 34; + node_0->layout.dimensions[CSS_HEIGHT] = 632; } test("Random #93", root_node, root_layout); @@ -5500,35 +5337,35 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.dimensions[CSS_WIDTH] = 625; - node->style.margin[CSS_LEFT] = 1; - node->style.margin[CSS_TOP] = 1; - node->style.margin[CSS_RIGHT] = 1; - node->style.margin[CSS_BOTTOM] = 1; - node->style.margin[CSS_LEFT] = -9; - node->style.margin[CSS_TOP] = 11; - node->style.margin[CSS_RIGHT] = 15; - node->style.margin[CSS_BOTTOM] = 10; - node->style.padding[CSS_LEFT] = 19; - node->style.border[CSS_LEFT] = 3; - node->style.border[CSS_TOP] = 3; - node->style.border[CSS_RIGHT] = 3; - node->style.border[CSS_BOTTOM] = 3; - node->style.border[CSS_TOP] = 2; - node->style.position[CSS_LEFT] = -10; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.align_items = CSS_ALIGN_CENTER; + node_0->style.dimensions[CSS_WIDTH] = 625; + node_0->style.margin[CSS_LEFT] = 1; + node_0->style.margin[CSS_TOP] = 1; + node_0->style.margin[CSS_RIGHT] = 1; + node_0->style.margin[CSS_BOTTOM] = 1; + node_0->style.margin[CSS_LEFT] = -9; + node_0->style.margin[CSS_TOP] = 11; + node_0->style.margin[CSS_RIGHT] = 15; + node_0->style.margin[CSS_BOTTOM] = 10; + node_0->style.padding[CSS_LEFT] = 19; + node_0->style.border[CSS_LEFT] = 3; + node_0->style.border[CSS_TOP] = 3; + node_0->style.border[CSS_RIGHT] = 3; + node_0->style.border[CSS_BOTTOM] = 3; + node_0->style.border[CSS_TOP] = 2; + node_0->style.position[CSS_LEFT] = -10; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 11; - node->layout.position[CSS_LEFT] = -19; - node->layout.dimensions[CSS_WIDTH] = 625; - node->layout.dimensions[CSS_HEIGHT] = 23; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 11; + node_0->layout.position[CSS_LEFT] = -19; + node_0->layout.dimensions[CSS_WIDTH] = 625; + node_0->layout.dimensions[CSS_HEIGHT] = 23; } test("Random #94", root_node, root_layout); @@ -5537,16 +5374,15 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 0; - node->layout.dimensions[CSS_WIDTH] = 0; - node->layout.dimensions[CSS_HEIGHT] = 0; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 0; + node_0->layout.dimensions[CSS_WIDTH] = 0; + node_0->layout.dimensions[CSS_HEIGHT] = 0; } test("Random #95", root_node, root_layout); @@ -5555,35 +5391,35 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; - node->style.dimensions[CSS_WIDTH] = 88; - node->style.dimensions[CSS_HEIGHT] = 657; - node->style.margin[CSS_LEFT] = 3; - node->style.margin[CSS_RIGHT] = -2; - node->style.padding[CSS_LEFT] = 4; - node->style.padding[CSS_TOP] = 4; - node->style.padding[CSS_RIGHT] = 4; - node->style.padding[CSS_BOTTOM] = 4; - node->style.padding[CSS_LEFT] = 5; - node->style.padding[CSS_TOP] = 0; - node->style.padding[CSS_BOTTOM] = 19; - node->style.border[CSS_LEFT] = 1; - node->style.border[CSS_TOP] = 1; - node->style.border[CSS_RIGHT] = 1; - node->style.border[CSS_BOTTOM] = 1; - node->style.border[CSS_LEFT] = 3; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_COLUMN; + node_0->style.dimensions[CSS_WIDTH] = 88; + node_0->style.dimensions[CSS_HEIGHT] = 657; + node_0->style.margin[CSS_LEFT] = 3; + node_0->style.margin[CSS_RIGHT] = -2; + node_0->style.padding[CSS_LEFT] = 4; + node_0->style.padding[CSS_TOP] = 4; + node_0->style.padding[CSS_RIGHT] = 4; + node_0->style.padding[CSS_BOTTOM] = 4; + node_0->style.padding[CSS_LEFT] = 5; + node_0->style.padding[CSS_TOP] = 0; + node_0->style.padding[CSS_BOTTOM] = 19; + node_0->style.border[CSS_LEFT] = 1; + node_0->style.border[CSS_TOP] = 1; + node_0->style.border[CSS_RIGHT] = 1; + node_0->style.border[CSS_BOTTOM] = 1; + node_0->style.border[CSS_LEFT] = 3; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 0; - node->layout.position[CSS_LEFT] = 3; - node->layout.dimensions[CSS_WIDTH] = 88; - node->layout.dimensions[CSS_HEIGHT] = 657; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 0; + node_0->layout.position[CSS_LEFT] = 3; + node_0->layout.dimensions[CSS_WIDTH] = 88; + node_0->layout.dimensions[CSS_HEIGHT] = 657; } test("Random #96", root_node, root_layout); @@ -5592,38 +5428,38 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; - node->style.margin[CSS_LEFT] = -9; - node->style.margin[CSS_TOP] = -9; - node->style.margin[CSS_RIGHT] = -9; - node->style.margin[CSS_BOTTOM] = -9; - node->style.margin[CSS_LEFT] = 18; - node->style.margin[CSS_TOP] = 15; - node->style.margin[CSS_BOTTOM] = 0; - node->style.padding[CSS_LEFT] = 6; - node->style.padding[CSS_TOP] = 6; - node->style.padding[CSS_RIGHT] = 6; - node->style.padding[CSS_BOTTOM] = 6; - node->style.padding[CSS_TOP] = 17; - node->style.padding[CSS_BOTTOM] = 3; - node->style.border[CSS_LEFT] = 0; - node->style.border[CSS_TOP] = 0; - node->style.border[CSS_RIGHT] = 0; - node->style.border[CSS_BOTTOM] = 0; - node->style.border[CSS_RIGHT] = 2; - node->style.border[CSS_BOTTOM] = 3; - node->style.position[CSS_TOP] = -4; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_AROUND; + node_0->style.margin[CSS_LEFT] = -9; + node_0->style.margin[CSS_TOP] = -9; + node_0->style.margin[CSS_RIGHT] = -9; + node_0->style.margin[CSS_BOTTOM] = -9; + node_0->style.margin[CSS_LEFT] = 18; + node_0->style.margin[CSS_TOP] = 15; + node_0->style.margin[CSS_BOTTOM] = 0; + node_0->style.padding[CSS_LEFT] = 6; + node_0->style.padding[CSS_TOP] = 6; + node_0->style.padding[CSS_RIGHT] = 6; + node_0->style.padding[CSS_BOTTOM] = 6; + node_0->style.padding[CSS_TOP] = 17; + node_0->style.padding[CSS_BOTTOM] = 3; + node_0->style.border[CSS_LEFT] = 0; + node_0->style.border[CSS_TOP] = 0; + node_0->style.border[CSS_RIGHT] = 0; + node_0->style.border[CSS_BOTTOM] = 0; + node_0->style.border[CSS_RIGHT] = 2; + node_0->style.border[CSS_BOTTOM] = 3; + node_0->style.position[CSS_TOP] = -4; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 11; - node->layout.position[CSS_LEFT] = 18; - node->layout.dimensions[CSS_WIDTH] = 14; - node->layout.dimensions[CSS_HEIGHT] = 23; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 11; + node_0->layout.position[CSS_LEFT] = 18; + node_0->layout.dimensions[CSS_WIDTH] = 14; + node_0->layout.dimensions[CSS_HEIGHT] = 23; } test("Random #97", root_node, root_layout); @@ -5632,24 +5468,24 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.justify_content = CSS_JUSTIFY_FLEX_START; - node->style.align_items = CSS_ALIGN_FLEX_END; - node->style.dimensions[CSS_WIDTH] = 83; - node->style.margin[CSS_LEFT] = -8; - node->style.margin[CSS_RIGHT] = -1; - node->style.position[CSS_TOP] = -3; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.justify_content = CSS_JUSTIFY_FLEX_START; + node_0->style.align_items = CSS_ALIGN_FLEX_END; + node_0->style.dimensions[CSS_WIDTH] = 83; + node_0->style.margin[CSS_LEFT] = -8; + node_0->style.margin[CSS_RIGHT] = -1; + node_0->style.position[CSS_TOP] = -3; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = -3; - node->layout.position[CSS_LEFT] = -8; - node->layout.dimensions[CSS_WIDTH] = 83; - node->layout.dimensions[CSS_HEIGHT] = 36; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = -3; + node_0->layout.position[CSS_LEFT] = -8; + node_0->layout.dimensions[CSS_WIDTH] = 83; + node_0->layout.dimensions[CSS_HEIGHT] = 36; } test("Random #98", root_node, root_layout); @@ -5658,34 +5494,34 @@ int main() { css_node_t *root_node = new_css_node(); { - css_node_t *node = root_node; - node->style.flex_direction = CSS_FLEX_DIRECTION_ROW; - node->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; - node->style.align_items = CSS_ALIGN_CENTER; - node->style.dimensions[CSS_WIDTH] = 240; - node->style.margin[CSS_LEFT] = 6; - node->style.margin[CSS_TOP] = 6; - node->style.margin[CSS_RIGHT] = 6; - node->style.margin[CSS_BOTTOM] = 6; - node->style.margin[CSS_LEFT] = 13; - node->style.margin[CSS_TOP] = 6; - node->style.margin[CSS_RIGHT] = -5; - node->style.margin[CSS_BOTTOM] = 8; - node->style.padding[CSS_TOP] = 0; - node->style.border[CSS_LEFT] = 2; - node->style.border[CSS_BOTTOM] = 2; - node->style.position[CSS_TOP] = 9; - node->style.measure = measure; - node->style.measure_context = "loooooooooong with space"; + css_node_t *node_0 = root_node; + node_0->style.flex_direction = CSS_FLEX_DIRECTION_ROW; + node_0->style.justify_content = CSS_JUSTIFY_SPACE_BETWEEN; + node_0->style.align_items = CSS_ALIGN_CENTER; + node_0->style.dimensions[CSS_WIDTH] = 240; + node_0->style.margin[CSS_LEFT] = 6; + node_0->style.margin[CSS_TOP] = 6; + node_0->style.margin[CSS_RIGHT] = 6; + node_0->style.margin[CSS_BOTTOM] = 6; + node_0->style.margin[CSS_LEFT] = 13; + node_0->style.margin[CSS_TOP] = 6; + node_0->style.margin[CSS_RIGHT] = -5; + node_0->style.margin[CSS_BOTTOM] = 8; + node_0->style.padding[CSS_TOP] = 0; + node_0->style.border[CSS_LEFT] = 2; + node_0->style.border[CSS_BOTTOM] = 2; + node_0->style.position[CSS_TOP] = 9; + node_0->style.measure = measure; + node_0->style.measure_context = "loooooooooong with space"; } css_node_t *root_layout = new_css_node(); { - css_node_t *node = root_layout; - node->layout.position[CSS_TOP] = 15; - node->layout.position[CSS_LEFT] = 13; - node->layout.dimensions[CSS_WIDTH] = 240; - node->layout.dimensions[CSS_HEIGHT] = 20; + css_node_t *node_0 = root_layout; + node_0->layout.position[CSS_TOP] = 15; + node_0->layout.position[CSS_LEFT] = 13; + node_0->layout.dimensions[CSS_WIDTH] = 240; + node_0->layout.dimensions[CSS_HEIGHT] = 20; } test("Random #99", root_node, root_layout); diff --git a/src/transpile.html b/src/transpile.html index e895d631..1159aa95 100644 --- a/src/transpile.html +++ b/src/transpile.html @@ -67,6 +67,13 @@ function printLayout(test) { res.push(indent(level) + str); } + function isEmpty(obj) { + for (var key in obj) { + return false; + } + return true; + } + function indent(level) { var result = ''; for (var i = 0; i < level; ++i) { @@ -75,41 +82,6 @@ function printLayout(test) { return result; } - function addEnum(node, js_key, c_key, dict) { - if (js_key in node.style) { - add('node->style' + '.' + c_key + ' = ' + dict[node.style[js_key]] + ';'); - } - } - - function addFloat(positive, node, js_key, c_key) { - if (js_key in node.style) { - if (positive === 'positive' && node.style[js_key] < 0) { - // do nothing - } else { - add('node->style' + '.' + c_key + ' = ' + node.style[js_key] + ';'); - } - } - } - - function addSpacing(positive, node, spacing, suffix) { - addFloat(positive, node, spacing + suffix, spacing + '[CSS_LEFT]'); - addFloat(positive, node, spacing + suffix, spacing + '[CSS_TOP]'); - addFloat(positive, node, spacing + suffix, spacing + '[CSS_RIGHT]'); - addFloat(positive, node, spacing + suffix, spacing + '[CSS_BOTTOM]'); - - addFloat(positive, node, spacing + 'Left' + suffix, spacing + '[CSS_LEFT]'); - addFloat(positive, node, spacing + 'Top' + suffix, spacing + '[CSS_TOP]'); - addFloat(positive, node, spacing + 'Right' + suffix, spacing + '[CSS_RIGHT]'); - addFloat(positive, node, spacing + 'Bottom' + suffix, spacing + '[CSS_BOTTOM]'); - } - - function addMeasure(node) { - if ('measure' in node.style) { - add('node->style.measure = measure;'); - add('node->style.measure_context = "' + node.style.measure.toString() + '";'); - } - } - add('{'); level++; @@ -117,8 +89,50 @@ function printLayout(test) { add('css_node_t *root_node = new_css_node();'); add('{'); level++; - add('css_node_t *node = root_node;'); + if (!isEmpty(test.node.style) || test.node.children && test.node.children.length) { + add('css_node_t *node_0 = root_node;'); + } function rec_style(node) { + + function addStyle(str) { + add('node_' + (level - 3) + '->style.' + str); + } + + function addEnum(node, js_key, c_key, dict) { + if (js_key in node.style) { + addStyle(c_key + ' = ' + dict[node.style[js_key]] + ';'); + } + } + + function addFloat(positive, node, js_key, c_key) { + if (js_key in node.style) { + if (positive === 'positive' && node.style[js_key] < 0) { + // do nothing + } else { + addStyle(c_key + ' = ' + node.style[js_key] + ';'); + } + } + } + + function addSpacing(positive, node, spacing, suffix) { + addFloat(positive, node, spacing + suffix, spacing + '[CSS_LEFT]'); + addFloat(positive, node, spacing + suffix, spacing + '[CSS_TOP]'); + addFloat(positive, node, spacing + suffix, spacing + '[CSS_RIGHT]'); + addFloat(positive, node, spacing + suffix, spacing + '[CSS_BOTTOM]'); + + addFloat(positive, node, spacing + 'Left' + suffix, spacing + '[CSS_LEFT]'); + addFloat(positive, node, spacing + 'Top' + suffix, spacing + '[CSS_TOP]'); + addFloat(positive, node, spacing + 'Right' + suffix, spacing + '[CSS_RIGHT]'); + addFloat(positive, node, spacing + 'Bottom' + suffix, spacing + '[CSS_BOTTOM]'); + } + + function addMeasure(node) { + if ('measure' in node.style) { + addStyle('measure = measure;'); + addStyle('measure_context = "' + node.style.measure.toString() + '";'); + } + } + addEnum(node, 'flexDirection', 'flex_direction', { 'row': 'CSS_FLEX_DIRECTION_ROW', 'column': 'CSS_FLEX_DIRECTION_COLUMN' @@ -162,14 +176,13 @@ function printLayout(test) { addMeasure(node); if (node.children) { - add('init_css_node_children(node, ' + node.children.length + ');'); + add('init_css_node_children(node_' + (level - 3) +', ' + node.children.length + ');'); add('{'); level++; - add('css_node_t *outer_node_' + (level - 3) + ' = node;'); - add('css_node_t *node;'); + add('css_node_t *node_' + (level - 3) + ';'); for (var i = 0; i < node.children.length; ++i) { - add('node = &outer_node_' + (level - 3) + '->children[' + i + '];'); + add('node_' + (level - 3) + ' = &node_' + (level - 4) + '->children[' + i + '];'); rec_style(node.children[i]); } @@ -186,23 +199,26 @@ function printLayout(test) { add('css_node_t *root_layout = new_css_node();'); add('{'); level++; - add('css_node_t *node = root_layout;'); + add('css_node_t *node_0 = root_layout;'); function rec_layout(node) { - add('node->layout.position[CSS_TOP] = ' + node.top + ';'); - add('node->layout.position[CSS_LEFT] = ' + node.left + ';'); - add('node->layout.dimensions[CSS_WIDTH] = ' + node.width + ';'); - add('node->layout.dimensions[CSS_HEIGHT] = ' + node.height + ';'); + function addLayout(str) { + add('node_' + (level - 3) + '->layout.' + str); + } + + addLayout('position[CSS_TOP] = ' + node.top + ';'); + addLayout('position[CSS_LEFT] = ' + node.left + ';'); + addLayout('dimensions[CSS_WIDTH] = ' + node.width + ';'); + addLayout('dimensions[CSS_HEIGHT] = ' + node.height + ';'); if (node.children) { - add('init_css_node_children(node, ' + node.children.length + ');'); + add('init_css_node_children(node_' + (level - 3) +', ' + node.children.length + ');'); add('{'); level++; - add('css_node_t *outer_node_' + (level - 3) + ' = node;'); - add('css_node_t *node;'); + add('css_node_t *node_' + (level - 3) + ';'); for (var i = 0; i < node.children.length; ++i) { - add('node = &outer_node_' + (level - 3) + '->children[' + i + '];'); + add('node_' + (level - 3) + ' = &node_' + (level - 4) + '->children[' + i + '];'); rec_layout(node.children[i]); }