Commit Graph

13 Commits

Author SHA1 Message Date
Benjamin Otte
6962b49a99 css: Introduce GtkCssComputedValues
To be used for storing computed values. Is the replacement for
GtkStyleProperties, which is now legacy code.
2012-01-11 15:48:54 +01:00
Benjamin Otte
84d294ee7f stylecontext: NMake safe to call into during lookup
When resolving a lookup, we may want to query the current style context,
as in the next patch. This works now.
2012-01-09 18:37:57 +01:00
Benjamin Otte
60b8b7a398 csslookup: Use the new gtk_style_context_peek_property() 2012-01-09 18:37:57 +01:00
Benjamin Otte
e87cf5d789 css: Redo value resolving
Instead of on-demand resolvage, we now resolve during lookup. The step
is done via
  _gtk_css_style_property_compute_value()
which currently calls into
  _gtk_css_style_compute_value()
That function has all the old resolving machinery.

The only part missing for now is the handling of win32 code. It will be
added back later.
2012-01-09 18:37:55 +01:00
Benjamin Otte
f2dc63cc6a css: Pass the real context to the CSS lookup
This will be necessary soon.
2012-01-09 18:37:55 +01:00
Benjamin Otte
30eb26087c css: Feed sections to CSS lookup code 2012-01-09 18:37:53 +01:00
Benjamin Otte
544d210a61 css: Move a bunch of functions
... from GtkStyleProperty to GtkCssStyleProperty.
2012-01-09 18:37:52 +01:00
Benjamin Otte
7a76694780 styleproperty: Use _gtk_style_property_get_name() 2012-01-09 18:37:52 +01:00
Benjamin Otte
4383701e25 styleproperty: unconstify
GtkStyleProperty is a real GObject now, so treat it like one and don't
use const.
2012-01-09 18:37:52 +01:00
Benjamin Otte
fbedcdaf7d css: Make CSS resolving work according to spec
See inline code comments taken from
  http://dev.w3.org/csswg/css3-cascade/#cascade

This now respects the special values "inherit" and "initial" properly.
Note that those values cannot be parsed yet. This will be added in a
future commit.
2012-01-09 18:37:50 +01:00
Benjamin Otte
242893a031 css: Pass the parent context to _gtk_css_lookup_resolve()
This way, we can resolve inherit properties.
2012-01-09 18:37:50 +01:00
Benjamin Otte
6dd50c6cca css: Add some docs to GtkCssLookup
In particular, document which parts of the CSS value querying we're
doing here.
2012-01-09 18:37:50 +01:00
Benjamin Otte
ba5e7012b1 css: Redo StyleProvider interface
We now use the GtkStleProviderPrivate interface, which hopefully is
faster and more conformant to CSS. Long term, it definitely should be
both.

I would have liked to split this up into multiple commits, but couldn't
find a way.
2012-01-09 18:37:50 +01:00