diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2012-05-11 14:30:07 -0400 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2012-05-15 13:24:40 -0400 |
commit | cfc5854068b0ab480da8fb5a89d45f0a1c29e8df (patch) | |
tree | aaa299843d50824a45d0e4ee874d4f296eaeaa96 /gtk/gtkcssshorthandpropertyimpl.c | |
parent | 8aec81333db571e5f2171c41c0e01b4a4cada2bd (diff) | |
download | gtk+-cfc5854068b0ab480da8fb5a89d45f0a1c29e8df.tar.gz |
shorthand: use array values for shorthand properties parsing
Right now, just parse the first value in the array.
Diffstat (limited to 'gtk/gtkcssshorthandpropertyimpl.c')
-rw-r--r-- | gtk/gtkcssshorthandpropertyimpl.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c index fdcb2de654..bb0d76888b 100644 --- a/gtk/gtkcssshorthandpropertyimpl.c +++ b/gtk/gtkcssshorthandpropertyimpl.c @@ -459,6 +459,8 @@ parse_background (GtkCssShorthandProperty *shorthand, GtkCssValue **values, GtkCssParser *parser) { + GtkCssValue *value; + do { /* the image part */ @@ -477,27 +479,34 @@ parse_background (GtkCssShorthandProperty *shorthand, return FALSE; } - values[0] = _gtk_css_image_value_new (image); + values[0] = _gtk_css_array_value_new (_gtk_css_image_value_new (image)); } else if (values[1] == NULL && - (values[1] = _gtk_css_background_repeat_value_try_parse (parser))) + (value = _gtk_css_background_repeat_value_try_parse (parser))) { - /* nothing to do here */ + values[1] = _gtk_css_array_value_new (value); + value = NULL; } else if ((values[2] == NULL || values[3] == NULL) && - (values[3] = _gtk_css_area_value_try_parse (parser))) + (value = _gtk_css_area_value_try_parse (parser))) { + values[3] = _gtk_css_array_value_new (value); + if (values[2] == NULL) { values[2] = values[3]; values[3] = NULL; } + value = NULL; } else if (values[4] == NULL) { - values[4] = _gtk_css_symbolic_value_new (parser); - if (values[4] == NULL) + value = _gtk_css_symbolic_value_new (parser); + if (value == NULL) return FALSE; + + values[4] = _gtk_css_array_value_new (value); + value = NULL; } else { |