[gtk+] css: Don't special-case fill-mode in 'animation'



commit 871d782e74578d0db1e2da26e22a24f899600d00
Author: Benjamin Otte <otte redhat com>
Date:   Mon Jul 7 13:09:30 2014 +0200

    css: Don't special-case fill-mode in 'animation'
    
    I have no idea why it was special cased when parsing the 'animation'
    shorthand, but it caused crashes.
    
    So remove the special case.

 gtk/gtkcssshorthandpropertyimpl.c |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c
index 2d2faf8..06c20dd 100644
--- a/gtk/gtkcssshorthandpropertyimpl.c
+++ b/gtk/gtkcssshorthandpropertyimpl.c
@@ -766,21 +766,19 @@ parse_animation (GtkCssShorthandProperty  *shorthand,
                  GtkCssParser             *parser)
 {
   GtkCssValue *step_values[7];
-  GPtrArray *arrays[6];
+  GPtrArray *arrays[7];
   guint i;
 
-  for (i = 0; i < 6; i++)
+  for (i = 0; i < 7; i++)
     {
       arrays[i] = g_ptr_array_new ();
       step_values[i] = NULL;
     }
   
-  step_values[6] = NULL;
-
   do {
     if (!parse_one_animation (shorthand, step_values, parser))
       {
-        for (i = 0; i < 6; i++)
+        for (i = 0; i < 7; i++)
           {
             g_ptr_array_set_free_func (arrays[i], (GDestroyNotify) _gtk_css_value_unref);
             g_ptr_array_unref (arrays[i]);
@@ -788,7 +786,7 @@ parse_animation (GtkCssShorthandProperty  *shorthand,
         return FALSE;
       }
 
-      for (i = 0; i < 6; i++)
+      for (i = 0; i < 7; i++)
         {
           if (step_values[i] == NULL)
             {
@@ -802,14 +800,12 @@ parse_animation (GtkCssShorthandProperty  *shorthand,
         }
   } while (_gtk_css_parser_try (parser, ",", TRUE));
 
-  for (i = 0; i < 6; i++)
+  for (i = 0; i < 7; i++)
     {
       values[i] = _gtk_css_array_value_new_from_array ((GtkCssValue **) arrays[i]->pdata, arrays[i]->len);
       g_ptr_array_unref (arrays[i]);
     }
 
-  values[6] = step_values[6];
-
   return TRUE;
 }
 


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