| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
This is called a lot in the loop in gtk_css_style_provider_lookup which
actually showed up on profiles.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This is not used yet in this patch.
|
|
|
|
| |
This simplifies the code.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
(Actually, it's not a real 'new' value yet, but will be soon.
This is the first step to make bitmasks immutable.
|
| |
|
|
|
|
| |
This is useful when overriding values.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
To be used for storing computed values. Is the replacement for
GtkStyleProperties, which is now legacy code.
|
|
|
|
|
| |
When resolving a lookup, we may want to query the current style context,
as in the next patch. This works now.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This will be necessary soon.
|
| |
|
|
|
|
| |
... from GtkStyleProperty to GtkCssStyleProperty.
|
| |
|
|
|
|
|
| |
GtkStyleProperty is a real GObject now, so treat it like one and don't
use const.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This way, we can resolve inherit properties.
|
|
|
|
|
| |
In particular, document which parts of the CSS value querying we're
doing here.
|
|
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.
|