diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c index 81f1cfda02..464875b7cd 100644 --- a/gtk/gtkstyleproperty.c +++ b/gtk/gtkstyleproperty.c @@ -557,6 +557,12 @@ theming_engine_value_parse (GtkCssParser *parser, GtkThemingEngine *engine; char *str; + if (_gtk_css_parser_try (parser, "none", TRUE)) + { + g_value_set_object (value, gtk_theming_engine_load (NULL)); + return TRUE; + } + str = _gtk_css_parser_try_ident (parser, TRUE); if (str == NULL) { @@ -565,6 +571,7 @@ theming_engine_value_parse (GtkCssParser *parser, } engine = gtk_theming_engine_load (str); + if (engine == NULL) { _gtk_css_parser_error (parser, "Themeing engine '%s' not found", str); @@ -976,7 +983,11 @@ pattern_value_parse (GtkCssParser *parser, GFile *base, GValue *value) { - if (_gtk_css_parser_begins_with (parser, '-')) + if (_gtk_css_parser_try (parser, "none", TRUE)) + { + /* nothing to do here */ + } + else if (_gtk_css_parser_begins_with (parser, '-')) { int res; res = _gtk_win32_theme_part_parse (parser, base, value); @@ -1115,6 +1126,9 @@ shadow_value_parse (GtkCssParser *parser, shadow = _gtk_shadow_new (); + if (_gtk_css_parser_try (parser, "none", TRUE)) + return TRUE; + do { have_inset = have_lengths = have_color = FALSE; @@ -1290,6 +1304,9 @@ border_image_value_parse (GtkCssParser *parser, gboolean retval = FALSE; GtkBorderImage *image = NULL; + if (_gtk_css_parser_try (parser, "none", TRUE)) + return TRUE; + g_value_init (&temp, CAIRO_GOBJECT_TYPE_PATTERN); if (!pattern_value_parse (parser, base, &temp))