[gtk+] stylecontext: Don't copy CSS values on context_save()



commit 4cc4e18d567159c784eb8c668bbbd7d725aeb816
Author: Benjamin Otte <otte redhat com>
Date:   Sun Oct 19 21:04:48 2014 +0200

    stylecontext: Don't copy CSS values on context_save()
    
    Keeping them is a bad idea now where the widget paths are actually
    changed by a save(). And almost all of the time, state or style classes
    will be changed anyway.
    
    Looking them up again is just a hash table lookup anyway.

 gtk/gtkstylecontext.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c
index daa733b..83a67c3 100644
--- a/gtk/gtkstylecontext.c
+++ b/gtk/gtkstylecontext.c
@@ -346,7 +346,6 @@ style_info_copy (GtkStyleInfo *info)
 
   copy = style_info_new ();
   copy->decl = gtk_css_node_declaration_ref (info->decl);
-  style_info_set_values (copy, info->values);
 
   return copy;
 }
@@ -1436,11 +1435,6 @@ gtk_style_context_save (GtkStyleContext *context)
   priv->saved_nodes = g_slist_prepend (priv->saved_nodes, priv->info);
 
   priv->info = style_info_copy (priv->info);
-  /* Need to unset animations here because we can not know what style
-   * class potential transitions came from once we save().
-   */
-  if (priv->info->values && !_gtk_css_computed_values_is_static (priv->info->values))
-    style_info_set_values (priv->info, NULL);
 }
 
 /**


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