+ while (!value_is_done_parsing (parser));
+
+ return TRUE;
+}
+
+static gboolean
+parse_border_side (GtkCssShorthandProperty *shorthand,
+ GtkCssValue **values,
+ GtkCssParser *parser)
+{
+ do
+ {
+ if (values[0] == NULL &&
+ _gtk_css_parser_has_number (parser))
+ {
+ values[0] = _gtk_css_number_value_parse (parser,
+ GTK_CSS_POSITIVE_ONLY
+ | GTK_CSS_NUMBER_AS_PIXELS
+ | GTK_CSS_PARSE_LENGTH);
+ if (values[0] == NULL)
+ return FALSE;
+ }
+ else if (values[1] == NULL &&
+ (values[1] = _gtk_css_border_style_value_try_parse (parser)))
+ {
+ /* Nothing to do */
+ }
+ else if (values[2] == NULL)
+ {
+ values[2] = _gtk_css_color_value_parse (parser);
+ if (values[2] == NULL)
+ return FALSE;
+ }
+ }
+ while (!value_is_done_parsing (parser));
+
+ return TRUE;
+}
+
+static gboolean
+parse_border (GtkCssShorthandProperty *shorthand,
+ GtkCssValue **values,
+ GtkCssParser *parser)
+{
+ do
+ {
+ if (values[0] == NULL &&
+ _gtk_css_parser_has_number (parser))
+ {
+ values[0] = _gtk_css_number_value_parse (parser,
+ GTK_CSS_POSITIVE_ONLY
+ | GTK_CSS_NUMBER_AS_PIXELS
+ | GTK_CSS_PARSE_LENGTH);
+ if (values[0] == NULL)
+ return FALSE;
+ values[1] = _gtk_css_value_ref (values[0]);
+ values[2] = _gtk_css_value_ref (values[0]);
+ values[3] = _gtk_css_value_ref (values[0]);
+ }
+ else if (values[4] == NULL &&
+ (values[4] = _gtk_css_border_style_value_try_parse (parser)))
+ {
+ values[5] = _gtk_css_value_ref (values[4]);
+ values[6] = _gtk_css_value_ref (values[4]);
+ values[7] = _gtk_css_value_ref (values[4]);
+ }
+ else if (!G_IS_VALUE (&values[8]))
+ {
+ values[8] = _gtk_css_color_value_parse (parser);
+ if (values[8] == NULL)
+ return FALSE;
+
+ values[9] = _gtk_css_value_ref (values[8]);
+ values[10] = _gtk_css_value_ref (values[8]);
+ values[11] = _gtk_css_value_ref (values[8]);
+ }
+ else
+ {
+ /* We parsed everything and there's still stuff left?
+ * Pretend we didn't notice and let the normal code produce
+ * a 'junk at end of value' error */
+ break;
+ }
+ }
+ while (!value_is_done_parsing (parser));
+
+ /* Note that border-image values are not set: according to the spec
+ they just need to be reset when using the border shorthand */
+
+ return TRUE;
+}
+
+static gboolean
+parse_font (GtkCssShorthandProperty *shorthand,
+ GtkCssValue **values,
+ GtkCssParser *parser)
+{
+ PangoFontDescription *desc;
+ guint mask;
+ char *str;
+
+ str = _gtk_css_parser_read_value (parser);
+ if (str == NULL)
+ return FALSE;
+
+ desc = pango_font_description_from_string (str);
+ g_free (str);
+
+ mask = pango_font_description_get_set_fields (desc);
+
+ if (mask & PANGO_FONT_MASK_FAMILY)