[gtk/wip/baedert/for-master: 75/146] cssnode: GtkCssAnimatedStyle->style is always a static style



commit 440e5f7abb73e059821628a9963f84fbd1f30356
Author: Timm Bäder <mail baedert org>
Date:   Sat Aug 24 10:09:41 2019 +0200

    cssnode: GtkCssAnimatedStyle->style is always a static style

 gtk/gtkcssnode.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcssnode.c b/gtk/gtkcssnode.c
index 039791e873..0cce324e05 100644
--- a/gtk/gtkcssnode.c
+++ b/gtk/gtkcssnode.c
@@ -25,6 +25,7 @@
 #include "gtkmarshalers.h"
 #include "gtksettingsprivate.h"
 #include "gtktypebuiltins.h"
+#include "gtkprivate.h"
 
 /*
  * CSS nodes are the backbone of the GtkStyleContext implementation and
@@ -386,13 +387,12 @@ static gboolean
 gtk_css_style_needs_recreation (GtkCssStyle  *style,
                                 GtkCssChange  change)
 {
+  gtk_internal_return_val_if_fail (GTK_IS_CSS_STATIC_STYLE (style), TRUE);
+
   /* Try to avoid invalidating if we can */
   if (change & GTK_CSS_RADICAL_CHANGE)
     return TRUE;
 
-  if (GTK_IS_CSS_ANIMATED_STYLE (style))
-    style = GTK_CSS_ANIMATED_STYLE (style)->style;
-
   if (gtk_css_static_style_get_change (GTK_CSS_STATIC_STYLE (style)) & change)
     return TRUE;
   else


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