animatedstyle: fail to create new style if timestamp goes backwards
authorMatt Watson <mattdangerw@gmail.com>
Tue, 22 Mar 2016 07:54:11 +0000 (00:54 -0700)
committerMatt Watson <mattdangerw@gmail.com>
Fri, 8 Apr 2016 23:09:30 +0000 (16:09 -0700)
With slowdown factor, we will only we be able to handle timestamps
that monotonically increase.

gtk/gtkcssanimatedstyle.c

index f0246e91cff4ee6be3ad2971c27f6d48d3df1cda..04337e54c29b1555ff250db7cd562138e4d8b119 100644 (file)
@@ -467,6 +467,8 @@ gtk_css_animated_style_new_advance (GtkCssAnimatedStyle *source,
   if (timestamp == 0)
     return g_object_ref (source->style);
 
+  gtk_internal_return_val_if_fail (timestamp > source->current_time, NULL);
+
   animations = NULL;
   for (l = source->animations; l; l = l->next)
     {