cssvalue: Add a border value

.. and parse border-image-slice with it.
This commit is contained in:
Benjamin Otte
2012-04-04 16:15:41 +02:00
parent cfc6462730
commit 56f79fecce
9 changed files with 372 additions and 33 deletions

View File

@ -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;