rendernodeparser: Print properties alphabetically

Because now we have a rule.

Also update some tests to the new order.
This commit is contained in:
Benjamin Otte 2019-05-14 03:11:33 +02:00
parent 6c473d5ff7
commit c8fc40e793
3 changed files with 973 additions and 972 deletions

View File

@ -1536,9 +1536,9 @@ render_node_print (Printer *p,
{
start_node (p, "cross-fade");
append_node_param (p, "end", gsk_cross_fade_node_get_end_child (node));
append_float_param (p, "progress", gsk_cross_fade_node_get_progress (node));
append_node_param (p, "start", gsk_cross_fade_node_get_start_child (node));
append_node_param (p, "end", gsk_cross_fade_node_get_end_child (node));
end_node (p);
}
@ -1553,8 +1553,8 @@ render_node_print (Printer *p,
start_node (p, "linear-gradient");
append_rect_param (p, "bounds", &node->bounds);
append_point_param (p, "start", gsk_linear_gradient_node_peek_start (node));
append_point_param (p, "end", gsk_linear_gradient_node_peek_end (node));
append_point_param (p, "start", gsk_linear_gradient_node_peek_start (node));
_indent (p);
g_string_append (p->str, "stops:");
@ -1584,8 +1584,8 @@ render_node_print (Printer *p,
{
start_node (p, "opacity");
append_float_param (p, "opacity", gsk_opacity_node_get_opacity (node));
append_node_param (p, "child", gsk_opacity_node_get_child (node));
append_float_param (p, "opacity", gsk_opacity_node_get_opacity (node));
end_node (p);
}
@ -1595,12 +1595,12 @@ render_node_print (Printer *p,
{
start_node (p, "outset-shadow");
append_rounded_rect_param (p, "outline", gsk_outset_shadow_node_peek_outline (node));
append_float_param (p, "blur", gsk_outset_shadow_node_get_blur_radius (node));
append_rgba_param (p, "color", gsk_outset_shadow_node_peek_color (node));
append_float_param (p, "dx", gsk_outset_shadow_node_get_dx (node));
append_float_param (p, "dy", gsk_outset_shadow_node_get_dy (node));
append_rounded_rect_param (p, "outline", gsk_outset_shadow_node_peek_outline (node));
append_float_param (p, "spread", gsk_outset_shadow_node_get_spread (node));
append_float_param (p, "blur", gsk_outset_shadow_node_get_blur_radius (node));
end_node (p);
}
@ -1610,8 +1610,8 @@ render_node_print (Printer *p,
{
start_node (p, "clip");
append_rect_param (p, "clip", gsk_clip_node_peek_clip (node));
append_node_param (p, "child", gsk_clip_node_get_child (node));
append_rect_param (p, "clip", gsk_clip_node_peek_clip (node));
end_node (p);
}
@ -1621,8 +1621,8 @@ render_node_print (Printer *p,
{
start_node (p, "rounded-clip");
append_rounded_rect_param (p, "clip", gsk_rounded_clip_node_peek_clip (node));
append_node_param (p, "child", gsk_rounded_clip_node_get_child (node));
append_rounded_rect_param (p, "clip", gsk_rounded_clip_node_peek_clip (node));
end_node (p);
@ -1633,8 +1633,8 @@ render_node_print (Printer *p,
{
start_node (p, "transform");
append_transform_param (p, "transform", gsk_transform_node_get_transform (node));
append_node_param (p, "child", gsk_transform_node_get_child (node));
append_transform_param (p, "transform", gsk_transform_node_get_transform (node));
end_node (p);
}
@ -1644,9 +1644,9 @@ render_node_print (Printer *p,
{
start_node (p, "color-matrix");
append_node_param (p, "child", gsk_color_matrix_node_get_child (node));
append_matrix_param (p, "matrix", gsk_color_matrix_node_peek_color_matrix (node));
append_vec4_param (p, "offset", gsk_color_matrix_node_peek_color_offset (node));
append_node_param (p, "child", gsk_color_matrix_node_get_child (node));
end_node (p);
}
@ -1656,6 +1656,17 @@ render_node_print (Printer *p,
{
start_node (p, "border");
_indent (p);
g_string_append (p->str, "colors: ");
append_rgba (p->str, &gsk_border_node_peek_colors (node)[0]);
g_string_append_c (p->str, ' ');
append_rgba (p->str, &gsk_border_node_peek_colors (node)[1]);
g_string_append_c (p->str, ' ');
append_rgba (p->str, &gsk_border_node_peek_colors (node)[2]);
g_string_append_c (p->str, ' ');
append_rgba (p->str, &gsk_border_node_peek_colors (node)[3]);
g_string_append (p->str, ";\n");
append_rounded_rect_param (p, "outline", gsk_border_node_peek_outline (node));
_indent (p);
@ -1669,17 +1680,6 @@ render_node_print (Printer *p,
string_append_double (p->str, gsk_border_node_peek_widths (node)[3]);
g_string_append (p->str, ";\n");
_indent (p);
g_string_append (p->str, "colors: ");
append_rgba (p->str, &gsk_border_node_peek_colors (node)[0]);
g_string_append_c (p->str, ' ');
append_rgba (p->str, &gsk_border_node_peek_colors (node)[1]);
g_string_append_c (p->str, ' ');
append_rgba (p->str, &gsk_border_node_peek_colors (node)[2]);
g_string_append_c (p->str, ' ');
append_rgba (p->str, &gsk_border_node_peek_colors (node)[3]);
g_string_append (p->str, ";\n");
end_node (p);
}
break;
@ -1692,6 +1692,8 @@ render_node_print (Printer *p,
start_node (p, "shadow");
_indent (p);
append_node_param (p, "child", gsk_shadow_node_get_child (node));
g_string_append (p->str, "shadows: ");
for (i = 0; i < n_shadows; i ++)
{
@ -1716,8 +1718,6 @@ render_node_print (Printer *p,
g_string_append_c (p->str, ';');
g_string_append_c (p->str, '\n');
append_node_param (p, "child", gsk_shadow_node_get_child (node));
end_node (p);
}
break;
@ -1726,12 +1726,12 @@ render_node_print (Printer *p,
{
start_node (p, "inset-shadow");
append_rounded_rect_param (p, "outline", gsk_inset_shadow_node_peek_outline (node));
append_float_param (p, "blur", gsk_inset_shadow_node_get_blur_radius (node));
append_rgba_param (p, "color", gsk_inset_shadow_node_peek_color (node));
append_float_param (p, "dx", gsk_inset_shadow_node_get_dx (node));
append_float_param (p, "dy", gsk_inset_shadow_node_get_dy (node));
append_rounded_rect_param (p, "outline", gsk_inset_shadow_node_peek_outline (node));
append_float_param (p, "spread", gsk_inset_shadow_node_get_spread (node));
append_float_param (p, "blur", gsk_inset_shadow_node_get_blur_radius (node));
end_node (p);
}
@ -1771,6 +1771,8 @@ render_node_print (Printer *p,
guint i;
start_node (p, "text");
append_rgba_param (p, "color", gsk_text_node_peek_color (node));
_indent (p);
desc = pango_font_describe ((PangoFont *)gsk_text_node_peek_font (node));;
font_name = pango_font_description_to_string (desc);
@ -1778,10 +1780,6 @@ render_node_print (Printer *p,
g_free (font_name);
pango_font_description_free (desc);
append_float_param (p, "x", gsk_text_node_get_x (node));
append_float_param (p, "y", gsk_text_node_get_y (node));
append_rgba_param (p, "color", gsk_text_node_peek_color (node));
_indent (p);
g_string_append (p->str, "glyphs: ");
glyph = gsk_text_node_peek_glyphs (node);
@ -1789,7 +1787,6 @@ render_node_print (Printer *p,
glyph->glyph, glyph->geometry.width,
glyph->geometry.x_offset, glyph->geometry.y_offset,
glyph->attr.is_cluster_start);
for (i = 1; i < n_glyphs; i ++)
{
glyph = gsk_text_node_peek_glyphs (node) + i;
@ -1798,10 +1795,13 @@ render_node_print (Printer *p,
glyph->geometry.x_offset, glyph->geometry.y_offset,
glyph->attr.is_cluster_start);
}
g_string_append_c (p->str, ';');
g_string_append_c (p->str, '\n');
append_float_param (p, "x", gsk_text_node_get_x (node));
append_float_param (p, "y", gsk_text_node_get_y (node));
end_node (p);
}
break;
@ -1811,10 +1811,10 @@ render_node_print (Printer *p,
start_node (p, "debug");
_indent (p);
append_node_param (p, "child", gsk_debug_node_get_child (node));
/* TODO: We potentially need to escape certain characters in the message */
g_string_append_printf (p->str, "message: \"%s\";\n", gsk_debug_node_get_message (node));
append_node_param (p, "child", gsk_debug_node_get_child (node));
end_node (p);
}
break;
@ -1833,10 +1833,10 @@ render_node_print (Printer *p,
case GSK_REPEAT_NODE:
{
start_node (p, "repeat");
append_rect_param (p, "bounds", &node->bounds);
append_rect_param (p, "child-bounds", gsk_repeat_node_peek_child_bounds (node));
append_rect_param (p, "bounds", &node->bounds);
append_node_param (p, "child", gsk_repeat_node_get_child (node));
append_rect_param (p, "child-bounds", gsk_repeat_node_peek_child_bounds (node));
end_node (p);
}
@ -1849,6 +1849,8 @@ render_node_print (Printer *p,
start_node (p, "blend");
append_node_param (p, "bottom", gsk_blend_node_get_bottom_child (node));
_indent (p);
for (i = 0; i < G_N_ELEMENTS (blend_modes); i++)
{
@ -1859,7 +1861,6 @@ render_node_print (Printer *p,
}
}
append_node_param (p, "top", gsk_blend_node_get_top_child (node));
append_node_param (p, "bottom", gsk_blend_node_get_bottom_child (node));
end_node (p);
}

View File

@ -1,5 +1,4 @@
transform {
transform: translate(0, 0);
child: container {
color {
bounds: 0 0 404 204;
@ -8,382 +7,383 @@ transform {
container {
container {
transform {
transform: translate(1, 1);
child: container {
rounded-clip {
clip: -1 -1 50 26 / 13;
child: color {
bounds: -1 -1 50 26;
color: rgb(225,222,219);
}
clip: -1 -1 50 26 / 13;
}
border {
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
outline: -1 -1 50 26 / 13;
widths: 1 1 1 1;
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
}
container {
container {
outset-shadow {
outline: -1 -1 26 26 / 13;
blur: 0;
color: rgba(0,0,0,0.1);
dx: 0;
dy: 1;
outline: -1 -1 26 26 / 13;
spread: 0;
blur: 0;
}
outset-shadow {
outline: -1 -1 26 26 / 13;
blur: 2;
color: rgba(0,0,0,0.07);
dx: 0;
dy: 1;
outline: -1 -1 26 26 / 13;
spread: 0;
blur: 2;
}
rounded-clip {
clip: -1 -1 26 26 / 13;
child: linear-gradient {
bounds: 0 0 24 24;
start: 12 0;
end: 12 24;
start: 12 0;
stops: 0.2 rgb(255,255,255),0.9 rgb(246,245,244);
}
clip: -1 -1 26 26 / 13;
}
inset-shadow {
outline: 0 0 24 24 / 12;
blur: 0;
color: rgb(255,255,255);
dx: 0;
dy: 1;
outline: 0 0 24 24 / 12;
spread: 0;
blur: 0;
}
}
border {
colors: rgb(191,184,177) rgb(191,184,177) rgb(191,184,177) rgb(191,184,177);
outline: -1 -1 26 26 / 13;
widths: 1 1 1 1;
colors: rgb(191,184,177) rgb(191,184,177) rgb(191,184,177) rgb(191,184,177);
}
}
}
transform: translate(1, 1);
}
transform {
transform: translate(56, 0);
child: text {
color: rgb(46,52,54);
font: "Cantarell 11";
glyphs: 37 11264 0 0 1, 324 4096 0 0 1, 417 7168 0 0 1, 244 8192 0 0 1, 272 8192 0 0 1, 349 4096 0 0 1, 287 8192 0 0 1, 280 8192 0 0 1;
x: 145;
y: 18;
color: rgb(46,52,54);
glyphs: 37 11264 0 0 1, 324 4096 0 0 1, 417 7168 0 0 1, 244 8192 0 0 1, 272 8192 0 0 1, 349 4096 0 0 1, 287 8192 0 0 1, 280 8192 0 0 1;
}
transform: translate(56, 0);
}
}
transform {
transform: translate(0, 38);
child: container {
transform {
transform: translate(1, 1);
child: container {
rounded-clip {
clip: -1 -1 50 26 / 13;
child: color {
bounds: -1 -1 50 26;
color: rgb(53,132,228);
}
clip: -1 -1 50 26 / 13;
}
border {
colors: rgb(24,95,180) rgb(24,95,180) rgb(24,95,180) rgb(24,95,180);
outline: -1 -1 50 26 / 13;
widths: 1 1 1 1;
colors: rgb(24,95,180) rgb(24,95,180) rgb(24,95,180) rgb(24,95,180);
}
transform {
transform: translate(24, 0);
child: container {
container {
outset-shadow {
outline: -1 -1 26 26 / 13;
blur: 0;
color: rgba(0,0,0,0.1);
dx: 0;
dy: 1;
outline: -1 -1 26 26 / 13;
spread: 0;
blur: 0;
}
outset-shadow {
outline: -1 -1 26 26 / 13;
blur: 2;
color: rgba(0,0,0,0.07);
dx: 0;
dy: 1;
outline: -1 -1 26 26 / 13;
spread: 0;
blur: 2;
}
rounded-clip {
clip: -1 -1 26 26 / 13;
child: cross-fade {
end: linear-gradient {
bounds: 0 0 24 24;
end: 12 24;
start: 12 0;
stops: 0.1 rgb(255,255,255),0.9 rgb(255,255,255);
}
progress: 0.756154;
start: cross-fade {
end: linear-gradient {
bounds: 0 0 24 24;
end: 12 24;
start: 12 0;
stops: 0.2 rgb(255,255,255),0.9 rgb(246,245,244);
}
progress: 0.788575;
start: color {
bounds: 0 0 24 24;
color: rgb(246,245,244);
}
end: linear-gradient {
bounds: 0 0 24 24;
start: 12 0;
end: 12 24;
stops: 0.2 rgb(255,255,255),0.9 rgb(246,245,244);
}
}
end: linear-gradient {
bounds: 0 0 24 24;
start: 12 0;
end: 12 24;
stops: 0.1 rgb(255,255,255),0.9 rgb(255,255,255);
}
}
clip: -1 -1 26 26 / 13;
}
inset-shadow {
outline: 0 0 24 24 / 12;
blur: 0;
color: rgb(255,255,255);
dx: 0;
dy: 1;
outline: 0 0 24 24 / 12;
spread: 0;
blur: 0;
}
}
border {
colors: rgb(24,95,180) rgb(24,95,180) rgb(24,95,180) rgb(24,95,180);
outline: -1 -1 26 26 / 13;
widths: 1 1 1 1;
colors: rgb(24,95,180) rgb(24,95,180) rgb(24,95,180) rgb(24,95,180);
}
}
transform: translate(24, 0);
}
}
transform: translate(1, 1);
}
transform {
transform: translate(56, 0);
child: text {
color: rgb(46,52,54);
font: "Cantarell 11";
glyphs: 45 9216 0 0 1, 360 8192 0 0 1, 244 8192 0 0 1, 272 8192 0 0 1, 349 4096 0 0 1, 287 8192 0 0 1, 280 8192 0 0 1;
x: 147;
y: 18;
color: rgb(46,52,54);
glyphs: 45 9216 0 0 1, 360 8192 0 0 1, 244 8192 0 0 1, 272 8192 0 0 1, 349 4096 0 0 1, 287 8192 0 0 1, 280 8192 0 0 1;
}
transform: translate(56, 0);
}
}
transform: translate(0, 38);
}
transform {
transform: translate(0, 76);
child: container {
transform {
transform: translate(1, 1);
child: container {
rounded-clip {
clip: -1 -1 50 26 / 13;
child: color {
bounds: -1 -1 50 26;
color: rgb(250,249,248);
}
clip: -1 -1 50 26 / 13;
}
border {
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
outline: -1 -1 50 26 / 13;
widths: 1 1 1 1;
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
}
container {
rounded-clip {
clip: -1 -1 26 26 / 13;
child: color {
bounds: 0 0 24 24;
color: rgb(250,249,248);
}
clip: -1 -1 26 26 / 13;
}
border {
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
outline: -1 -1 26 26 / 13;
widths: 1 1 1 1;
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
}
}
}
transform: translate(1, 1);
}
transform {
transform: translate(56, 0);
child: text {
color: rgb(46,52,54);
font: "Cantarell 11";
glyphs: 37 11264 0 0 1, 324 4096 0 0 1, 417 7168 0 0 1, 244 8192 0 0 1, 272 8192 0 0 1, 349 4096 0 0 1, 287 8192 0 0 1, 280 8192 0 0 1;
x: 145;
y: 18;
color: rgb(46,52,54);
glyphs: 37 11264 0 0 1, 324 4096 0 0 1, 417 7168 0 0 1, 244 8192 0 0 1, 272 8192 0 0 1, 349 4096 0 0 1, 287 8192 0 0 1, 280 8192 0 0 1;
}
transform: translate(56, 0);
}
}
transform: translate(0, 76);
}
transform {
transform: translate(0, 114);
child: container {
transform {
transform: translate(1, 1);
child: container {
rounded-clip {
clip: -1 -1 50 26 / 13;
child: color {
bounds: -1 -1 50 26;
color: rgb(250,249,248);
}
clip: -1 -1 50 26 / 13;
}
border {
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
outline: -1 -1 50 26 / 13;
widths: 1 1 1 1;
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
}
transform {
transform: translate(24, 0);
child: container {
rounded-clip {
clip: -1 -1 26 26 / 13;
child: color {
bounds: 0 0 24 24;
color: rgb(250,249,248);
}
clip: -1 -1 26 26 / 13;
}
border {
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
outline: -1 -1 26 26 / 13;
widths: 1 1 1 1;
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
}
}
transform: translate(24, 0);
}
}
transform: translate(1, 1);
}
transform {
transform: translate(56, 0);
child: text {
color: rgb(46,52,54);
font: "Cantarell 11";
glyphs: 45 9216 0 0 1, 360 8192 0 0 1, 244 8192 0 0 1, 272 8192 0 0 1, 349 4096 0 0 1, 287 8192 0 0 1, 280 8192 0 0 1;
x: 147;
y: 18;
color: rgb(46,52,54);
glyphs: 45 9216 0 0 1, 360 8192 0 0 1, 244 8192 0 0 1, 272 8192 0 0 1, 349 4096 0 0 1, 287 8192 0 0 1, 280 8192 0 0 1;
}
transform: translate(56, 0);
}
}
transform: translate(0, 114);
}
transform {
transform: translate(0, 152);
child: container {
transform {
transform: translate(1, 1);
child: container {
rounded-clip {
clip: -1 -1 50 26 / 13;
child: color {
bounds: -1 -1 50 26;
color: rgb(225,222,219);
}
clip: -1 -1 50 26 / 13;
}
border {
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
outline: -1 -1 50 26 / 13;
widths: 1 1 1 1;
colors: rgb(205,199,194) rgb(205,199,194) rgb(205,199,194) rgb(205,199,194);
}
container {
container {
outset-shadow {
outline: -1 -1 26 26 / 13;
blur: 0;
color: rgba(0,0,0,0.1);
dx: 0;
dy: 1;
outline: -1 -1 26 26 / 13;
spread: 0;
blur: 0;
}
outset-shadow {
outline: -1 -1 26 26 / 13;
blur: 2;
color: rgba(0,0,0,0.07);
dx: 0;
dy: 1;
outline: -1 -1 26 26 / 13;
spread: 0;
blur: 2;
}
rounded-clip {
clip: -1 -1 26 26 / 13;
child: linear-gradient {
bounds: 0 0 24 24;
start: 12 0;
end: 12 24;
start: 12 0;
stops: 0.2 rgb(255,255,255),0.9 rgb(246,245,244);
}
clip: -1 -1 26 26 / 13;
}
inset-shadow {
outline: 0 0 24 24 / 12;
blur: 0;
color: rgb(255,255,255);
dx: 0;
dy: 1;
outline: 0 0 24 24 / 12;
spread: 0;
blur: 0;
}
}
border {
colors: rgb(191,184,177) rgb(191,184,177) rgb(191,184,177) rgb(191,184,177);
outline: -1 -1 26 26 / 13;
widths: 1 1 1 1;
colors: rgb(191,184,177) rgb(191,184,177) rgb(191,184,177) rgb(191,184,177);
}
}
}
transform: translate(1, 1);
}
transform {
transform: translate(78, 0);
child: text {
color: rgb(46,52,54);
font: "Cantarell 11";
glyphs: 37 11264 0 0 1, 324 4096 0 0 1, 417 7168 0 0 1, 244 8192 0 0 1, 272 8192 0 0 1, 349 4096 0 0 1, 287 8192 0 0 1, 280 8192 0 0 1;
x: 123;
y: 18;
color: rgb(46,52,54);
glyphs: 37 11264 0 0 1, 324 4096 0 0 1, 417 7168 0 0 1, 244 8192 0 0 1, 272 8192 0 0 1, 349 4096 0 0 1, 287 8192 0 0 1, 280 8192 0 0 1;
}
transform: translate(78, 0);
}
transform {
transform: translate(388, 0);
child: transform {
transform: translate(1, 6);
child: container {
container {
outset-shadow {
outline: -1 -1 16 16 / 3;
blur: 0;
color: rgba(0,0,0,0.1);
dx: 0;
dy: 1;
outline: -1 -1 16 16 / 3;
spread: 0;
blur: 0;
}
outset-shadow {
outline: -1 -1 16 16 / 3;
blur: 2;
color: rgba(0,0,0,0.07);
dx: 0;
dy: 1;
outline: -1 -1 16 16 / 3;
spread: 0;
blur: 2;
}
linear-gradient {
bounds: 0 0 14 14;
start: 7 0;
end: 7 14;
start: 7 0;
stops: 0.2 rgb(255,255,255),0.9 rgb(246,245,244);
}
inset-shadow {
outline: 0 0 14 14 / 2;
blur: 0;
color: rgb(255,255,255);
dx: 0;
dy: 1;
outline: 0 0 14 14 / 2;
spread: 0;
blur: 0;
}
}
border {
colors: rgb(191,184,177) rgb(191,184,177) rgb(191,184,177) rgb(191,184,177);
outline: -1 -1 16 16 / 3;
widths: 1 1 1 1;
colors: rgb(191,184,177) rgb(191,184,177) rgb(191,184,177) rgb(191,184,177);
}
}
transform: translate(1, 6);
}
transform: translate(388, 0);
}
}
transform: translate(0, 152);
}
}
}
transform: translate(0, 0);
}

File diff suppressed because one or more lines are too long