[gtk+/wip/cssnode3: 48/81] cssnode: Treat transient nodes as invisible nodes



commit 9c35920537d6ab03527597955b870d0fa322af66
Author: Benjamin Otte <otte redhat com>
Date:   Fri Feb 13 12:44:04 2015 +0100

    cssnode: Treat transient nodes as invisible nodes
    
    Making transient nodes invisible allows us to remove special cases
    without any bad side effects and they continue working just like they
    did before.

 gtk/gtkcssnode.c          |   11 -----------
 gtk/gtkcsstransientnode.c |    1 +
 2 files changed, 1 insertions(+), 11 deletions(-)
---
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index 5040ff2..e59bce8 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -20,7 +20,6 @@
 #include "gtkcssnodeprivate.h"
 
 #include "gtkcssanimatedstyleprivate.h"
-#include "gtkcsstransientnodeprivate.h"
 #include "gtkdebug.h"
 #include "gtksettingsprivate.h"
 
@@ -37,9 +36,6 @@ gtk_css_node_set_invalid (GtkCssNode *node,
   if (node->invalid == invalid)
     return;
 
-  if (GTK_IS_CSS_TRANSIENT_NODE (node))
-    return;
-
   node->invalid = invalid;
 
   if (node->parent)
@@ -56,7 +52,6 @@ gtk_css_node_set_invalid (GtkCssNode *node,
     }
 }
 
-
 static void
 gtk_css_node_dispose (GObject *object)
 {
@@ -364,9 +359,6 @@ gtk_css_node_parent_will_be_set (GtkCssNode *node)
 static void
 gtk_css_node_unlink_from_siblings (GtkCssNode *node)
 {
-  if (GTK_IS_CSS_TRANSIENT_NODE (node))
-    return;
-
   if (node->previous_sibling)
     node->previous_sibling->next_sibling = node->next_sibling;
   else
@@ -385,9 +377,6 @@ static void
 gtk_css_node_link_to_siblings (GtkCssNode *node,
                                GtkCssNode *new_previous)
 {
-  if (GTK_IS_CSS_TRANSIENT_NODE (node))
-    return;
-
   if (new_previous)
     {
       node->previous_sibling = new_previous;
diff --git a/gtk/gtkcsstransientnode.c b/gtk/gtkcsstransientnode.c
index 723c97a..e3d68b4 100644
--- a/gtk/gtkcsstransientnode.c
+++ b/gtk/gtkcsstransientnode.c
@@ -64,6 +64,7 @@ gtk_css_transient_node_class_init (GtkCssTransientNodeClass *klass)
 static void
 gtk_css_transient_node_init (GtkCssTransientNode *cssnode)
 {
+  gtk_css_node_set_visible (GTK_CSS_NODE (cssnode), FALSE);
 }
 
 GtkCssNode *


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