summaryrefslogtreecommitdiff
path: root/gtk/gtkcsslookup.c
Commit message (Collapse)AuthorAgeFilesLines
* Make _gtk_css_lookup_get_missing inlineAlexander Larsson2012-11-091-19/+0
| | | | | This is called a lot in the loop in gtk_css_style_provider_lookup which actually showed up on profiles.
* css: Huge refactoring to avoid computing wrong valuesBenjamin Otte2012-09-281-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Here's the shortest description of the bug I can come up with: When computing values, we have 3 kinds of dependencies: (1) other properties ("currentColor" or em values) (2) inherited properties ("inherit") (3) generic things from the theme (@keyframes or @define-color) Previously, we passed the GtkStyleContext as an argument, because it provided these 3 things using: (1) _gtk_style_context_peek_property() (2) _gtk_style_context_peek_property(gtk_style_context_get_parent()) (3) context->priv->cascade However, this makes it impossible to lookup values other than the ones accessible via _gtk_style_context_peek_property(). And this is exactly what we are doing in gtk_style_context_update_cache(). So when the cache updates encountered case (1), they were looking up the values from the wrong style data. So this large patch essentially does nothing but replace the context argument in all compute functions with new arguments for the 3 cases above: (1) values (2) parent_values (3) provider We apparently have a lot of computing code.
* css: Pass relevant properties to css lookup codeBenjamin Otte2012-08-281-4/+14
| | | | This is not used yet in this patch.
* computedvalues: Pass dependencies to set_value()Benjamin Otte2012-08-281-0/+1
| | | | This simplifies the code.
* css: Use GtkCssValues instead of GValue in the css machineryAlexander Larsson2012-03-081-4/+4
| | | | | | 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.
* bitmask: Make setters return a new valueBenjamin Otte2012-03-011-3/+3
| | | | | | (Actually, it's not a real 'new' value yet, but will be soon. This is the first step to make bitmasks immutable.
* Change FSF AddressJavier Jardón2012-02-271-3/+1
|
* css: Allow bypassing the compute_value() stageBenjamin Otte2012-02-021-5/+46
| | | | This is useful when overriding values.
* csslookup: Query the bitmaskBenjamin Otte2012-02-021-1/+1
| | | | | | | Checking if the value is NULL is the wrong thing to do - the bitmask is usd to keep track of that. The reason for that will become apparent in the next patch.
* css: Introduce GtkCssComputedValuesBenjamin Otte2012-01-111-92/+10
| | | | | To be used for storing computed values. Is the replacement for GtkStyleProperties, which is now legacy code.
* stylecontext: NMake safe to call into during lookupBenjamin Otte2012-01-091-11/+8
| | | | | When resolving a lookup, we may want to query the current style context, as in the next patch. This works now.
* csslookup: Use the new gtk_style_context_peek_property()Benjamin Otte2012-01-091-4/+4
|
* css: Redo value resolvingBenjamin Otte2012-01-091-18/+14
| | | | | | | | | | | | 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.
* css: Pass the real context to the CSS lookupBenjamin Otte2012-01-091-4/+5
| | | | This will be necessary soon.
* css: Feed sections to CSS lookup codeBenjamin Otte2012-01-091-14/+24
|
* css: Move a bunch of functionsBenjamin Otte2012-01-091-9/+9
| | | | ... from GtkStyleProperty to GtkCssStyleProperty.
* styleproperty: Use _gtk_style_property_get_name()Benjamin Otte2012-01-091-1/+1
|
* styleproperty: unconstifyBenjamin Otte2012-01-091-1/+1
| | | | | GtkStyleProperty is a real GObject now, so treat it like one and don't use const.
* css: Make CSS resolving work according to specBenjamin Otte2012-01-091-7/+91
| | | | | | | | | 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.
* css: Pass the parent context to _gtk_css_lookup_resolve()Benjamin Otte2012-01-091-1/+5
| | | | This way, we can resolve inherit properties.
* css: Add some docs to GtkCssLookupBenjamin Otte2012-01-091-0/+22
| | | | | In particular, document which parts of the CSS value querying we're doing here.
* css: Redo StyleProvider interfaceBenjamin Otte2012-01-091-0/+107
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.