summaryrefslogtreecommitdiff
path: root/gtk/gtkcssshorthandpropertyimpl.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2012-04-04 16:15:41 +0200
committerBenjamin Otte <otte@redhat.com>2012-04-17 08:59:18 +0200
commit56f79fecce885e05b7fe1677a70b98c64ea4a85c (patch)
tree7b2e19ed13500e3c7075873a0326b3b29e510bf8 /gtk/gtkcssshorthandpropertyimpl.c
parentcfc64627304916e1a1848230dbb426e7dc22251f (diff)
downloadgtk+-56f79fecce885e05b7fe1677a70b98c64ea4a85c.tar.gz
cssvalue: Add a border value
.. and parse border-image-slice with it.
Diffstat (limited to 'gtk/gtkcssshorthandpropertyimpl.c')
-rw-r--r--gtk/gtkcssshorthandpropertyimpl.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/gtk/gtkcssshorthandpropertyimpl.c b/gtk/gtkcssshorthandpropertyimpl.c
index f93859cba2..3a26a28afd 100644
--- a/gtk/gtkcssshorthandpropertyimpl.c
+++ b/gtk/gtkcssshorthandpropertyimpl.c
@@ -25,6 +25,7 @@
#include <math.h>
#include "gtkcssarrayvalueprivate.h"
+#include "gtkcssbordervalueprivate.h"
#include "gtkcsscornervalueprivate.h"
#include "gtkcssenumvalueprivate.h"
#include "gtkcssimageprivate.h"
@@ -304,16 +305,19 @@ parse_border_image (GtkCssShorthandProperty *shorthand,
}
else if (values[1] == NULL)
{
- GValue value = G_VALUE_INIT;
-
- g_value_init (&value, GTK_TYPE_BORDER);
- if (!_gtk_css_style_parse_value (&value, parser, base))
+ values[1] = _gtk_css_border_value_parse (parser,
+ GTK_CSS_PARSE_PERCENT
+ | GTK_CSS_PARSE_NUMBER
+ | GTK_CSS_POSITIVE_ONLY,
+ FALSE,
+ TRUE);
+ if (values[1] == NULL)
return FALSE;
- values[1] = _gtk_css_value_new_from_gvalue (&value);
- g_value_unset (&value);
if (_gtk_css_parser_try (parser, "/", TRUE))
{
+ GValue value = G_VALUE_INIT;
+
g_value_init (&value, GTK_TYPE_BORDER);
if (!_gtk_css_style_parse_value (&value, parser, base))
return FALSE;