Matthias Clasen
b3b83545c4
Don't return prematurely
...
This code was clearly meant to return _after_ the loop.
Don't put the return inside the loop body, then.
2012-11-29 23:10:35 -05:00
Benjamin Otte
bd31bd6d63
cssstyleproperty: Replace symbolic colors with GtkCssColorValue
2012-11-08 23:34:29 +01:00
Matthias Clasen
4e09e180e4
Fix css parser tests
...
Parsing a shorthand background property was running into unexpected
errors when trying position values where there were none. To fix this,
introduce a try_parse variant of the position parse function that
silently returns NULL.
2012-10-16 06:02:03 -04:00
Benjamin Otte
854585e770
css: Implement 'animation' shorthand parsing
2012-09-17 20:39:11 +02:00
Cosimo Cecchi
61c7014e3e
shorthand: implement multiple backgrounds for the background shorthand
2012-05-15 13:24:40 -04:00
Cosimo Cecchi
a17c69cc03
shorthand: add background-position and background-size to bg shorthand
2012-05-15 13:24:40 -04:00
Cosimo Cecchi
cfc5854068
shorthand: use array values for shorthand properties parsing
...
Right now, just parse the first value in the array.
2012-05-15 13:24:40 -04:00
Benjamin Otte
cc6c7c5e16
cssshorthand: Don't pass base file anymore
...
It's part of the parser now.
2012-05-11 16:42:12 +02:00
Benjamin Otte
c9f01ffb43
cssimage: No need to pass base file anymore
...
The file is now part of the GtkCssParser
2012-05-11 16:42:12 +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
51da8cb263
symboliccolor: Parse 'currentColor' everywhere
2012-04-17 08:59:20 +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
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
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
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
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
bf92f2f7ac
cssvalue: Do a hacky conversion of font-size to a number value
...
Just store the value as px for now.
The font-size property needs a complete makeover anyway.
2012-04-17 08:59:15 +02:00
Benjamin Otte
ad05604b3e
cssvalue: Convert 'font-family'
...
It's now a CssArrayValue filled with CssStringValue
2012-04-17 08:59:15 +02:00
Benjamin Otte
4ba9be5b97
cssvalue: Add GtkCssArea to the enum values
...
... and get rid of its GType.
This makes it non-queryable using gtk_style_context_get() but it used to
be a private struct anyway.
2012-04-17 08:59:15 +02:00
Benjamin Otte
8c49cd97a7
cssvalue: Add a cssvalue for images
2012-04-17 08:59:14 +02:00
Benjamin Otte
d63b11e56b
cssvalue: Add enum values for the pango enums
...
And fix the parser to conform to the CSS spec while at it.
2012-04-17 08:59:14 +02:00
Benjamin Otte
b65d17dda8
cssvalue: Make border styles be their own value
...
... and add them via gtkcssenumvalue.[ch] which will be used for all
enums.
2012-04-17 08:59:14 +02:00
Benjamin Otte
a33df2d1d6
cssvalue: Split number values into their own class
2012-04-17 08:59:13 +02:00
Benjamin Otte
9b7640b898
styleproperty: Make _gtk_style_property_parse_value() return a CssValue
...
Also split out initial/inherit handling into a custom GtkCssValue class.
2012-04-17 08:59:11 +02:00
Benjamin Otte
5ac9ba714a
styleproperty: Make _gtk_style_property_query() take a GValue
...
... and don't make it return a GtkCssValue. We want to use this for
compat with the old GValue APIs after all...
2012-04-17 08:59:11 +02:00
Benjamin Otte
5bbf59b519
cssvalue: Constify a bunch of APIs
2012-04-17 08:59:10 +02:00
Alexander Larsson
7603e6e473
css: Use GtkCssValues instead of GValue in the css machinery
...
Also, in places where we're computing a new CssValue based on an
old one, make sure that if nothing changes we're returning a reference
to the old one, rather than creating a new identical instance.
2012-03-08 11:03:57 +01:00
Javier Jardón
9d0febc9a6
Change FSF Address
2012-02-27 17:06:11 +00:00
Benjamin Otte
e84af235ee
css: Implement padding as numbers
...
Also remove the now unused border parsing function for shorthands.
2012-02-02 03:14:02 +01:00
Benjamin Otte
3c4b8a676f
css: Port margin properties to GtkCssNumber
2012-02-02 03:14:01 +01:00
Benjamin Otte
a63ff72406
css: Convert border-radius to GtkCssNumber
...
We can do % now, wohoo!
2012-02-02 03:14:00 +01:00
Benjamin Otte
762ea4793f
css: Make border-width a length property
2012-02-02 03:14:00 +01:00
Benjamin Otte
05f14af24c
css: Make the 'currentColor' keyword a symbolic color
...
This is the first step on a quest to ensure that there is only ever one
GType in use for GValues in every stage of the CSS resolving process.
2012-02-02 00:40:33 +01:00
Cosimo Cecchi
09b4658c06
shorthand: fix parsing of currentColor for border-color shorthand
...
Code for border-color was missing the currentColor parsing.
2012-01-11 17:35:59 -05:00
Benjamin Otte
5939baa556
styleproperty: Make query function take a vfunc
...
This way we can use different methods to query properties and aren't
bound to a GtkStyleProperties object.
2012-01-11 15:48:54 +01:00
Benjamin Otte
738f96252e
shorthand: Get rid of GParameter dance
...
Instead assign properties directly.
2012-01-11 15:48:54 +01:00
Benjamin Otte
53b2f05a64
shorthand: Unify unpack_border()
...
Just use the property names.
2012-01-11 15:48:54 +01:00
Benjamin Otte
df88700230
shorthand: Do an unpack function to assign to everything
...
It's basically the opposite to pack_first_element() - it takes the given
value and stores it in all subproperties.
2012-01-11 15:48:54 +01:00
Benjamin Otte
73fac24a3a
shorthand: Add a "pack_first_element" pack function
...
And use it where appropriate.
See the docs in the function for what it does.
2012-01-11 15:48:53 +01:00
Benjamin Otte
6ebb85a69e
shorthand: Unify border parsing code
...
Parse border.{top,right,bottom,left} into subproperties {1,2,3,4}.
2012-01-11 15:48:53 +01:00
Benjamin Otte
78fee2f54b
shorthand: Remove hack
...
This hack was used for parsing back before the refactoring.
2012-01-11 15:48:53 +01:00
Benjamin Otte
e603992ac7
shorthand: Move pack funcs from base class
...
Also make the vfuncs take the shorthand as an argument.
2012-01-11 15:48:53 +01:00
Benjamin Otte
e9cd339573
css: Add outline CSS properties
2012-01-09 18:38:00 +01:00
Paolo Borelli
c167b4129e
Also add border-{top|right|bottom|left} shorthands
2012-01-09 18:37:59 +01:00
Paolo Borelli
0120aaace5
Add the border css shorthand
2012-01-09 18:37:59 +01:00
Paolo Borelli
6525ed76e0
Rename parse_border
...
For consistency we will use this name for the boder shorthand.
2012-01-09 18:37:59 +01:00
Paolo Borelli
e69f14cf2b
Add border-{top|left|bottom|right}-style properties
...
Add all the border-style subproperties and turn border-style itself in a
shorthand.
2012-01-09 18:37:58 +01:00