| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Introduce refcounted structs for groups of related css properties,
and use them to store the style values. Both GtkCssStaticStyle and
GtkCssAnimatedStyle fill in the structs in GtkCssStyle, and we
can avoid vfuncs for value access, which should be much faster.
We can even start accessing style->core->color directly.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a fast path for parent selector matching that uses a bloom filter to
quickly discard selectors that can't possibly match.
Keep in mind that we match using a bloom filter, so we might
accidentally include too many selectors when hash/bucket collisions
occur.
That's not a correctness problem though, because we'll do a real check
afterwards.
The idea for this change is taken from browsers, in particular WebKit.
|
|
|
|
|
|
| |
... instead of passing a matcher.
The matcher code is now local to the CssProvider/CssSelector machinery.
|
|
|
|
| |
This reverts commit 0df0de0b5db87248ad1371ee1bfc8a733ec079e4.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Most of the time when styles need to be recreated, the name and classes
of the css node haven't changed. In this case, the change value will not
change either, since we are computing change under the assumption that
name and classes are unchanged.
So don't recompute the change. This avoids the second match we do to
find the superset, cutting down the number of times we consult the
selector tree.
|
|
|
|
| |
It is clearer if this function returns a GtkCssStaticStyle.
|
|
|
|
|
|
|
|
| |
This is just lots of renaming.
The interface remains private, so the public API does not change, apart
from removing the definition of the Interface object to avoid
subclassing.
|
|
|
|
|
|
|
|
|
| |
This makes custom CSS properties no longer configurable. But it avoids
crashes when loading custom themes, so that's a good thing.
Testcase included.
https://bugzilla.redhat.com/show_bug.cgi?id=1281234
|
|
|
|
|
|
| |
After measuring it, I realized the optimization never triggers for
Adwaita and rarely ever triggers for simple themes. So it is not
useful to keep it around.
|
|
|
|
|
|
| |
This way, we can remove it as a separate argument from
gtk_css_value_compute() and allow computation to only depend on one
thing: the style provider.
|
|
|
|
| |
Just have one static style for everything.
|
|
|
|
|
| |
This way we can initialize the default style info with a style and
ddon't need to special case NULL everywhere.
|
|
|
|
|
| |
Relevant change is returned from style lookups, so keep is with the
object that holds those values.
|
|
|
|
| |
And with that move, GtkCssStaticStyle is immutable.
|
|
|
|
|
| |
We want the new() return values to be immutable, so we have to move the
code that modifes them.
|
|
|
|
| |
It now always returns a new instance.
|
|
For now, this is only an implementation detail of the animated style.
The idea is to use GtkCssStaticStyle as the result of CSS queries and
then put a GtkCssAnimatedStyle on top that manages the animations. The
neat thing about this is that you can cache the static values.
|