Benjamin Otte
95a4b46f8b
reftests: Fix reftests for recent changes
2012-04-17 08:59:21 +02:00
Benjamin Otte
33f111a47c
widget: Don't cache widget paths all the time
...
Add an internal API that allows GtkStyleContext to create a widget path
for the widget and with that bypassing gtk_widget_get_path() and that
function caching the path.
2012-04-17 08:59:21 +02:00
Benjamin Otte
6ac754cdd1
stylecontext: Remove theming_engine cache variable
...
Instead, look up the variable upon use. This is more correct (for when
the engine changes due to save/restore() shenanigans.
And it removes code that doesn't use the standard code paths.
2012-04-17 08:59:21 +02:00
Benjamin Otte
3ddb104302
stylecontext: Split out a function
2012-04-17 08:59:20 +02:00
Benjamin Otte
2fec112422
styleproperty: Remove equal_func vfunc
...
Equality tests are done with _gtk_css_value_equal(). There is no need to
do it per-property, equal values will still be equal.
This essentially reverts 24f5d54329e028347bd76af42e86ed190c1229a2 and
92c7a7171e1240b6d961ee5b6f9ab6b596e98904.
2012-04-17 08:59:20 +02:00
Benjamin Otte
40283e7c27
cssvalue: Split out old value handling to new typed value
...
... and Make this new value be a real GValue, as we don't need to save
performance for these anymore (it's just used for custom properties).
And I'd rather have code work for all values then be optimized for no
reason.
2012-04-17 08:59:20 +02:00
Benjamin Otte
883c871be6
themingengine: Fix outline-width
...
It's a number, not an int.
2012-04-17 08:59:20 +02:00
Benjamin Otte
ba7141b92e
shorthand: Fix border query functions
...
We haven't been using ints there for a while, I wonder why that never
blew up...
2012-04-17 08:59:20 +02:00
Benjamin Otte
0111b9d507
symboliccolor: Treat it as a CssValue
...
.. now that it is one.
2012-04-17 08:59:20 +02:00
Benjamin Otte
0048c8baf5
tests: Add a test ensuring currentColor is parsed everywhere
2012-04-17 08:59:20 +02:00
Benjamin Otte
505fefbec7
cssprovider: Add an empty line when printing
...
... between the @define-color statements and the rules.
2012-04-17 08:59:20 +02:00
Benjamin Otte
51da8cb263
symboliccolor: Parse 'currentColor' everywhere
2012-04-17 08:59:20 +02:00
Benjamin Otte
83be7e5dbd
symboliccolor: Pass the current color to the resolve function
...
This way, we can resolve things like
mix (currentColor, &otherColor);
and therefore parse currentColor as a regular color.
2012-04-17 08:59:19 +02:00
Benjamin Otte
1223d53a82
cssparser: Move symbolic color parser to gtksymboliccolor.c
2012-04-17 08:59:19 +02:00
Benjamin Otte
7606fcb52e
symboliccolor: Turn this into a GtkCssValue
2012-04-17 08:59:19 +02:00
Benjamin Otte
b403a1b550
css: Add a shorthand 'transition' property
2012-04-17 08:59:19 +02:00
Benjamin Otte
c3f46ab5c0
shorthand: Add ',' to value_is_done_parsing()
2012-04-17 08:59:19 +02:00
Benjamin Otte
04c5fdaca6
css: Remove old animation code
...
Deprecate public API where appropriate and make it no-ops.
Remove all calls to it.
Get rid of the 'transition' css property.
For now, this means spinners don't animate anymore.
2012-04-17 08:59:19 +02:00
Benjamin Otte
dcd54e20d1
css: Remove GtkCssNumber
...
It's completely replaced by GtkCssNumberValue now.
2012-04-17 08:59:19 +02:00
Benjamin Otte
1b69f1d7c2
linear-gradient: Convert from GtkCssNumber to GtkCssValue
2012-04-17 08:59:19 +02:00
Benjamin Otte
1170ecfd2e
cssvalue: Convert border-image-width to border value
2012-04-17 08:59:19 +02:00
Benjamin Otte
56f79fecce
cssvalue: Add a border value
...
.. and parse border-image-slice with it.
2012-04-17 08:59:18 +02:00
Benjamin Otte
cfc6462730
cssvalue: Add a cssvalue for background-size
2012-04-17 08:59:18 +02:00
Benjamin Otte
f785f7177c
cssvalue: Add a custom value for repeats
...
In particular, that's background-repeat and border-image-repeat.
Also, fix up the border-image shorthand to allow any order.
2012-04-17 08:59:18 +02:00
Benjamin Otte
5377169ef3
cssvalue: Add a value for background-position
2012-04-17 08:59:18 +02:00
Benjamin Otte
aed7600425
cssvalue: Add a css value for engines
2012-04-17 08:59:18 +02:00
Benjamin Otte
4f63c1c7ca
cssstyleproperty: Convert binding sets
...
Instead of keeping a custom GPtrArray, keep it as a GtkCssArrayValue of
GtkCssStringValue. This way, we gain equality comparisons and print
functions for free.
2012-04-17 08:59:18 +02:00
Benjamin Otte
edbc8e4f57
cssvalue: Add a value for border-radius corner properties
...
... and convert those properties to this value.
2012-04-17 08:59:18 +02:00
Benjamin Otte
05f2249d08
css: Make outline-offset a number property
2012-04-17 08:59:18 +02:00
Benjamin Otte
c366b5b8b7
shadow: Add equal and transition support
...
... and enable transitions for the shadow properties.
2012-04-17 08:59:18 +02:00
Benjamin Otte
ac6d61f6bb
cssvalue: Add GtkCssShadowsValue
...
This is necessary because shadows get treated differently from other
lists when transitioning.
2012-04-17 08:59:18 +02:00
Benjamin Otte
8f240275fd
tests: Add a parsing test for shadows
2012-04-17 08:59:17 +02:00
Benjamin Otte
b8ccda4140
shadow: Rewrite to store contents as values
2012-04-17 08:59:17 +02:00
Benjamin Otte
7bdcba189e
shadow: Make color a GtkCssValue
2012-04-17 08:59:17 +02:00
Benjamin Otte
ca17270187
cssvalue: Make GtkCssShadowValue only hold one shadow
...
All the properties now are a GtkCssArrayValue of GtkCssSadowValue.
GtkCssArrayValue already does everything we want, so no need to
duplicate its funtionality.
2012-04-17 08:59:17 +02:00
Benjamin Otte
c5878e8f6f
themingengine: Make _gtk_theming_engine_paint_spinner() args const
2012-04-17 08:59:17 +02:00
Benjamin Otte
b9ebe8c226
cssarrayvalue: Redo parsing arrays
...
Does 3 things:
1) Introduce a "none" array signleton
2) Get rid of memleaks in error paths
3) Reduce code in parse funcs
2012-04-17 08:59:17 +02:00
Benjamin Otte
580b5e4a83
stylecontext: Don't queue_resize() all the time
...
When a parent style context exists, there's no need to queue_resize() on
the widget, because the parent widget will call
gtk_style_context_validate() on us and _then_ we can call queue_resize()
if we have to.
2012-04-17 08:59:17 +02:00
Benjamin Otte
a8efb784d7
cssstyleproperty: Mark all animatable properties
...
Only the ones that can be animated are marked of course. So more work is
needed.
This is important for
transition-property: all;
because it'll just animate all the properties that can be.
2012-04-17 08:59:17 +02:00
Benjamin Otte
ed45a3c2f0
cssstyleproperty: Add _gtk_css_style_property_is_animated()
2012-04-17 08:59:17 +02:00
Benjamin Otte
9e4341f730
css: Move enum to the only source file using it
2012-04-17 08:59:17 +02:00
Benjamin Otte
e597f4d6a9
cssvalue: Add transition support for images
2012-04-17 08:59:16 +02:00
Benjamin Otte
d853a8f2f7
cssimage: Add GtkCssImageCrossFade
...
Supports the cross-fade() css notation the way the old CSS3 specs did.
The main reason for adding it is supporting image transitions though.
2012-04-17 08:59:16 +02:00
Benjamin Otte
8ad8a4febf
cssvalue: Add _gtk_css_value_to_string()
...
This is a tiny wrapper around _gtk_css_value_print().
It's intended for usage in gdb and printf debugging.
2012-04-17 08:59:16 +02:00
Benjamin Otte
41ce29767c
cssstyleproperty: Add transition properties
2012-04-17 08:59:16 +02:00
Benjamin Otte
7511109103
cssvalue: Add GtkCssEaseValue
...
This is supposed to hold the transition-easing-function and
animation-easing-function values.
2012-04-17 08:59:16 +02:00
Benjamin Otte
2ff47ed26d
cssvalue: Add a GtkCssValue for idents
2012-04-17 08:59:16 +02:00
Benjamin Otte
662d6787f3
css: Add <time> type to css number stuff
2012-04-17 08:59:16 +02:00
Benjamin Otte
68b7d3e410
computedvalues: Fix signage error
2012-04-17 08:59:16 +02:00
Benjamin Otte
a360e77a7b
css: Remove _gtk_css_computed_values_get_value_by_name()
...
Now that we use an enum for the IDs, we don't need that function
anymore.
2012-04-17 08:59:16 +02:00