cssimageradial: Only emit one error for wrong position

Test included.
This commit is contained in:
Benjamin Otte 2016-02-05 18:30:28 +01:00
parent f2e08d3a9c
commit 982da040b2
5 changed files with 8 additions and 4 deletions

View File

@ -273,10 +273,7 @@ gtk_css_image_radial_parse (GtkCssImage *image,
{
radial->position = _gtk_css_position_value_parse (parser);
if (!radial->position)
{
_gtk_css_parser_error (parser, "Expected a position after 'at'");
return FALSE;
}
return FALSE;
found_one = has_position = TRUE;
}
else if (!has_size)

View File

@ -407,6 +407,9 @@ test_data = \
pseudo-classes-unknown.ref.css \
radial.css \
radial.ref.css \
radial-background-position-error.css \
radial-background-position-error.errors \
radial-background-position-error.ref.css \
selector.css \
selector.ref.css \
shadow.css \

View File

@ -0,0 +1,3 @@
a {
background: radial-gradient(at your mom);
}

View File

@ -0,0 +1 @@
radial-background-position-error.css:2: error: GTK_CSS_PROVIDER_ERROR_SYNTAX