Commit Graph

13 Commits

Author SHA1 Message Date
Benjamin Otte
cbee390148 cssvalue: At cycle detection to color resolving
The following CSS would infloop:

@define-color self @self

as it would infinitely lookup the color named "self" and try to resolve
it. This patch adds detection of such cycles to the resolve function by
keeping a list of currently resolving colors in the cycle_list variable.
2013-03-28 23:18:59 +01:00
Benjamin Otte
c25d8e3aea cssvalue: Handle named colors not resolving
If a named color references a nonexistant named color, we didn't catch
that error and ended up crashing on a NULL-dereference.
This crashed Boxes, because its CSS referenced values from the theme
that didn't exist in any theme.
2013-03-28 23:18:59 +01:00
Benjamin Otte
a763738f15 cssvalue: Remove NULL check
The value cannot ever be NULL here.
2013-01-15 15:33:53 +01:00
Benjamin Otte
301e22121a cssvalue: Move value initialization
Makes it easier to track places where tha value is not initialized.
2013-01-15 15:31:59 +01:00
Benjamin Otte
b60478bb49 cssvalue: Fix return_if_fail() calls... 2013-01-15 15:29:23 +01:00
Benjamin Otte
993e3f715f cssvalue: Remove useless call 2013-01-15 15:24:04 +01:00
Benjamin Otte
41486895d5 deprecations: Move files into deprecated/ dir 2012-11-25 04:16:43 +01:00
Benjamin Otte
9aac4dffc5 hsla: Add _gtk_hsla_shade()
We use it in multiple places, so better split it out.
2012-11-25 03:25:15 +01:00
Benjamin Otte
42dc0ea0fd styleprovider: Change function prototype
Make _gtk_style_provider_private_get_color() return a GtkCssValue (a
GtkCssColorValue to be exact) instead of GtkSymbolicColor.

With this, the symbolic color usage inside GTK is minimized.
2012-11-25 02:45:10 +01:00
Benjamin Otte
08ac1504d2 symboliccolor: Implement using GtkCssValue 2012-11-25 02:41:17 +01:00
Benjamin Otte
e5948f5713 cssvalue: Fix copy/paste error
Introduced in e3f407a7.
2012-11-20 12:11:07 +01:00
Benjamin Otte
aae2bf91cb cssvalue: Make shade() work properly again
In a previous commit, I accidentally scaled the hue instead of the
saturation. Ooops.
2012-11-10 14:25:18 +01:00
Benjamin Otte
e3f407a71d cssvalue: Add GtkCssColorValue
This is mostly copy/paste from GtkSymbolicColor and is indeed intended
to replace it.
2012-11-08 23:34:06 +01:00