[gtk/ngl-rect-borders] nodeparser: Print debug message before child




commit 054088fb6212df7c4780542a5049c9ff9caf6b78
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Mar 9 00:43:47 2021 -0500

    nodeparser: Print debug message before child
    
    This puts the message up top, where it can be seen,
    and not at the other end of an endless tree of children.
    
    Update tests to match.

 gsk/gskrendernodeparser.c           | 2 +-
 testsuite/gsk/nodeparser/debug.node | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gskrendernodeparser.c b/gsk/gskrendernodeparser.c
index 8d72f94aa1..dce4a33f36 100644
--- a/gsk/gskrendernodeparser.c
+++ b/gsk/gskrendernodeparser.c
@@ -2767,13 +2767,13 @@ render_node_print (Printer       *p,
 
         start_node (p, "debug");
 
-        append_node_param (p, "child", gsk_debug_node_get_child (node));
         /* TODO: We potentially need to escape certain characters in the message */
         if (message)
           {
             _indent (p);
             g_string_append_printf (p->str, "message: \"%s\";\n", message);
           }
+        append_node_param (p, "child", gsk_debug_node_get_child (node));
 
         end_node (p);
       }
diff --git a/testsuite/gsk/nodeparser/debug.node b/testsuite/gsk/nodeparser/debug.node
index cd68defd52..978d3e83a0 100644
--- a/testsuite/gsk/nodeparser/debug.node
+++ b/testsuite/gsk/nodeparser/debug.node
@@ -1,5 +1,5 @@
 debug {
+  message: "I'm a debug node.";
   child: container {
   }
-  message: "I'm a debug node.";
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]