-
-GtkCssValue *
-_gtk_css_rgba_value_compute_from_symbolic (GtkCssValue *rgba,
- GtkCssValue *fallback,
- GtkStyleContext *context,
- gboolean for_color_property)
-{
- GtkSymbolicColor *symbolic;
- GtkCssValue *resolved;
-
- g_return_val_if_fail (rgba != NULL, NULL);
-
- symbolic = _gtk_css_value_get_symbolic_color (rgba);
-
- if (symbolic == _gtk_symbolic_color_get_current_color ())
- {
- /* The computed value of the ‘currentColor’ keyword is the computed
- * value of the ‘color’ property. If the ‘currentColor’ keyword is
- * set on the ‘color’ property itself, it is treated as ‘color: inherit’.
- */
- if (for_color_property)
- {
- GtkStyleContext *parent = gtk_style_context_get_parent (context);
-
- if (parent)
- return _gtk_css_value_ref (_gtk_style_context_peek_property (parent, "color"));
- else
- return _gtk_css_rgba_value_compute_from_symbolic (fallback, NULL, context, TRUE);
- }
- else
- {
- return _gtk_css_value_ref (_gtk_style_context_peek_property (context, "color"));
- }
- }
-
- resolved = _gtk_style_context_resolve_color_value (context, symbolic);
-
- if (resolved == NULL)
- return _gtk_css_rgba_value_compute_from_symbolic (fallback, NULL, context, for_color_property);
-
- g_assert (resolved->class == >K_CSS_VALUE_RGBA);
- return resolved;
-}
-