[gtk+/wip/watson/progress-tracker: 7/13] animatedstyle: fail to	create new style if timestamp goes backwards
- From: Matthew Watson <watson src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gtk+/wip/watson/progress-tracker: 7/13] animatedstyle: fail to	create new style if timestamp goes backwards
 
- Date: Sat, 26 Mar 2016 23:46:55 +0000 (UTC)
 
commit e28234f05cd16d2ea29470b26c46c0e5ad859b05
Author: Matt Watson <mattdangerw gmail com>
Date:   Tue Mar 22 00:54:11 2016 -0700
    animatedstyle: fail to create new style if timestamp goes backwards
    
    With slowdown factor, we will only we be able to handle timestamps
    that monotonically increase.
 gtk/gtkcssanimatedstyle.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkcssanimatedstyle.c b/gtk/gtkcssanimatedstyle.c
index 8005bcd..b72b65f 100644
--- a/gtk/gtkcssanimatedstyle.c
+++ b/gtk/gtkcssanimatedstyle.c
@@ -463,6 +463,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)
     {
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]