| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Backwards compat is not necessary in GTK4.
|
|
|
|
| |
... which is a toplevel, but not a container.
|
|
|
|
| |
These functions are only used within their compilation unit.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Instead of having old and new style, now have a GtkCssStyleChange opaque
object that will compute the changes you are interested in for you.
This simplifies change signal handlers quite a bit and avoids lots of
repeated computation in every signal handler.
|
|
|
|
|
|
|
|
| |
Since 4ebb5781eaf332da3f8ce5ffb5ecc8668a56f118 ID has a specific value,
while it used to be the same as NAME. Thus, explicitly list ID as a
radical change just like NAME.
https://bugzilla.gnome.org/show_bug.cgi?id=757397
|
|
|
|
|
| |
This avoids allocating a temporary bitmask, and lets us
avoid some value comparisons altogether.
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 3eacfa88f2d9c690a006de9cac1cd3c60901686c.
Apart from the patch not being correct, we don't want to expose private
structures in header files if we can avoid it.
And this type-checking overhead is not an optimization that is even
measurable.
https://bugzilla.gnome.org/show_bug.cgi?id=754932
|
| |
|
|
|
|
|
| |
This lets us use inlined getters for members in there,
avoiding the type checks in the public getters.
|
|
|
|
|
| |
A type class reference gotten with g_type_class_ref must be released
with g_type_class_unref, or else we leak.
|
|
|
|
|
|
| |
We want to clear the style property cache whenever things change in the
tree, not as we previously did only when those changes actually lead to
a different CSS style.
|
|
|
|
|
|
|
|
|
| |
When recomputing CSS, we need a correct widget path in the fallback mode
where we're still using widget paths.
So we need to invalidate it everytime it actually changes, and not just
when emitting the style-updated signal.
Fixes css-match-regions reftest.
|
| |
|
|
|
|
|
| |
If the widget doesn't have a style context, don't create one. Instead,
call functions on the widget directly.
|
|
|
|
|
|
| |
Now that the widget node recomputes styles on update_style() we can just
call it during validate(). That way, we don't need the widget node to
manually compute its style.
|
|
|
|
|
|
|
|
| |
If CSS values are queried from a widget, recompute them if necessary. Do
not emit style-updated until the validation phase however.
This way, we don't run into performance traps when style-update causes
invalidations that cause new style-updated to be emitted.
|
|
|
|
|
| |
We now have a flag for "invalidate animations", use that to restart
animations and decide if we want to start transitions.
|
|
|
|
|
|
|
| |
This is a crude hack, but it works.
FIXME: Hook it up to the GtkSettings so that we properly update when the
setting changes.
|
| |
|
|
|
|
|
|
|
| |
... and pass it to the API that computes new styles.
A special timestamp of 0 means "please don't animate" and is used when
no frame clock is available for a node.
|
| |
|
|
|
|
|
|
| |
Instead of always returning a provider, allow the vfunc to return NULL
to mane "use same provider as parent". This allows a bunch of
optimizations.
|
|
|
|
|
|
|
|
| |
This is mainly an attempt to merge the update_style() and validte()
vfuncs. Code is not there yet, but that's the idea.
Also, gtk_css_node_set_style() should not be public. And this gets
closer to that goal, too.
|
|
|
|
| |
Nobody cares what changed in the parent, so don't track it.
|
|
|
|
|
|
| |
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 allows hiding nodes of invisible widgets.
And that in turn makes sure :nth-child() works as expected.
|
|
|
|
|
| |
This is a very simple patch that causes a bunch of overhead. But it
works.
|
|
|
|
|
|
|
| |
If we know the parent's get_path_for_child() implementation is safe to
be used with GtkCssNode because it doesn't do anything special, we do
that. Unfortunately that requires whitelisting vfuncs because the vfunc
is public API so anyone can override it.
|
| |
|
|
|
|
|
|
|
| |
Instead, use gtk_widget_get_path() which makes GtkWidget cache the path.
This is a temporary solution until we can get rid of widget paths.
This increases memory usage quite noticably.
|
| |
|
|
|
|
| |
Instead, just mark nodes permanently as invalid.
|
|
|
|
|
|
| |
Instead of directly requesting the layout phase, register a tick
callback. This is what the docs suggest for animations and it's what we
need for the next commit.
|
|
|
|
|
|
| |
Have a queue_validate() vfunc and a dequeue_validate() vfunc that are
called only on root nodes so they can queue a validation on their frame
clocks.
|
|
|
|
| |
Makes it clearer what actually happens in that function.
|
|
|
|
|
|
| |
When the style is invalid, redo it.
Make this a vfunc, so the widget nodes can opt out.
|
|
|
|
| |
... instead of GtkCssWidgetNode.
|
| |
|
|
|
|
| |
... and use it when looking up properties.
|
| |
|
|
|
|
| |
Remove it from GtkStyleContext.
|
| |
|
|
|
|
|
| |
Handle invalidation of node inside the CssNode code, don't do it in the
stylecontext.
|