- pack_border (value, props, state,
- "border-top-width", "border-left-width",
- "border-bottom-width", "border-right-width");
+ do
+ {
+ if (values[1] == NULL && _gtk_css_parser_try (parser, "infinite", TRUE))
+ {
+ values[1] = _gtk_css_number_value_new (HUGE_VAL, GTK_CSS_NUMBER);
+ }
+ else if ((values[1] == NULL || values[3] == NULL) &&
+ _gtk_css_parser_has_number (parser))
+ {
+ GtkCssValue *value;
+
+ value = _gtk_css_number_value_parse (parser,
+ GTK_CSS_POSITIVE_ONLY
+ | (values[1] == NULL ? GTK_CSS_PARSE_NUMBER : 0)
+ | (values[3] == NULL ? GTK_CSS_PARSE_TIME : 0));
+ if (_gtk_css_number_value_get_unit (value) == GTK_CSS_NUMBER)
+ values[1] = value;
+ else if (values[2] == NULL)
+ values[2] = value;
+ else
+ values[3] = value;
+ }
+ else if (values[4] == NULL &&
+ _gtk_css_ease_value_can_parse (parser))
+ {
+ values[4] = _gtk_css_ease_value_parse (parser);
+
+ if (values[4] == NULL)
+ return FALSE;
+ }
+ else if (values[5] == NULL &&
+ (values[5] = _gtk_css_direction_value_try_parse (parser)))
+ {
+ /* nothing to do */
+ }
+ else if (values[6] == NULL &&
+ (values[6] = _gtk_css_fill_mode_value_try_parse (parser)))
+ {
+ /* nothing to do */
+ }
+ else if (values[0] == NULL &&
+ (values[0] = _gtk_css_ident_value_try_parse (parser)))
+ {
+ /* nothing to do */
+ /* keep in mind though that this needs to come last as fill modes, directions
+ * etc are valid idents */
+ }
+ 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));
+
+ return TRUE;