summaryrefslogtreecommitdiff
path: root/gtk/gtkcsswidgetnode.c
Commit message (Collapse)AuthorAgeFilesLines
* widgetnode: Remove unused defineTimm Bäder2017-03-021-4/+0
|
* csswidgetnode: Remove unused includeTimm Bäder2017-03-021-2/+0
|
* widgetnode: We never need widget paths anymoreBenjamin Otte2016-11-191-46/+1
| | | | Backwards compat is not necessary in GTK4.
* csswidgetnode: Fix container condition for GtkInvisibleTimm Bäder2016-10-281-2/+4
| | | | ... which is a toplevel, but not a container.
* gtk: Mark internal functions as staticEmmanuele Bassi2016-10-171-1/+1
| | | | These functions are only used within their compilation unit.
* container: Remove gtk_container_set_resize_mode()Benjamin Otte2016-10-161-6/+2
|
* Use g_set_object in one more placeMatthias Clasen2016-05-031-2/+1
|
* css: Use a getter for the enable-animations settingMatthias Clasen2016-04-301-5/+1
|
* widget: Pass a GtkCssStyleChange instead of a bitmaskBenjamin Otte2015-12-131-14/+20
|
* cssnode: Change style-changed signalBenjamin Otte2015-12-121-5/+6
| | | | | | | | 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.
* cssnode: Fix style updating when the CSS node ID changesColomban Wendling2015-11-011-1/+1
| | | | | | | | 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
* css style: Accumulate changes in placeMatthias Clasen2015-09-281-5/+2
| | | | | This avoids allocating a temporary bitmask, and lets us avoid some value comparisons altogether.
* Revert "Avoid type checking overhead for resize-mode"Benjamin Otte2015-09-121-2/+2
| | | | | | | | | | | 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
* Avoid type checking overhead for resize-modeMatthias Clasen2015-09-121-2/+2
|
* Move GtkWidgetPrivate to gtkwidgetprivate.hMatthias Clasen2015-09-071-2/+2
| | | | | This lets us use inlined getters for members in there, avoiding the type checks in the public getters.
* Plug a leakMatthias Clasen2015-09-061-2/+9
| | | | | A type class reference gotten with g_type_class_ref must be released with g_type_class_unref, or else we leak.
* stylecontext: Clear style property more frequentlyBenjamin Otte2015-04-271-0/+19
| | | | | | 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.
* cssnode: Clear widget path more aggressivelyBenjamin Otte2015-03-241-0/+3
| | | | | | | | | 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.
* csswidgetnode: Use style_changed signal instead of update_style vfuncBenjamin Otte2015-03-181-10/+6
|
* csswidgetnode: Avoid creating a stylecontextBenjamin Otte2015-03-181-4/+15
| | | | | If the widget doesn't have a style context, don't create one. Instead, call functions on the widget directly.
* cssnode: Merge the 2 places that compute stylesBenjamin Otte2015-03-181-94/+3
| | | | | | 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.
* cssnode: Always return correct style valuesBenjamin Otte2015-03-181-9/+33
| | | | | | | | 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.
* cssnode: Change the way we start animationsBenjamin Otte2015-03-181-16/+3
| | | | | We now have a flag for "invalidate animations", use that to restart animations and decide if we want to start transitions.
* cssnode: Return NULL as frame clock when animations are disabledBenjamin Otte2015-03-181-6/+8
| | | | | | | This is a crude hack, but it works. FIXME: Hook it up to the GtkSettings so that we properly update when the setting changes.
* cssnode: Move style context function to only userBenjamin Otte2015-03-181-1/+25
|
* cssnode: Add API to query the timestampBenjamin Otte2015-03-181-5/+31
| | | | | | | ... 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.
* cssnode: Make parent style change part of GtkCssNodeBenjamin Otte2015-03-181-8/+5
|
* cssnode: Change get_style_provider() vfuncBenjamin Otte2015-03-181-1/+1
| | | | | | 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.
* cssnode: Change vfuncBenjamin Otte2015-03-181-10/+10
| | | | | | | | 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.
* cssnode: Only pass a boolean for parent changesBenjamin Otte2015-03-181-7/+11
| | | | Nobody cares what changed in the parent, so don't track it.
* cssstyle: Remove unused optimizationBenjamin Otte2015-03-181-7/+2
| | | | | | 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.
* csswidgetnode: Always return a valid styleBenjamin Otte2015-03-181-0/+3
|
* cssnode: Add visibility conceptBenjamin Otte2015-03-181-0/+2
| | | | | This allows hiding nodes of invisible widgets. And that in turn makes sure :nth-child() works as expected.
* box: Use CSS nodes instead of widget pathsBenjamin Otte2015-03-181-1/+4
| | | | | This is a very simple patch that causes a bunch of overhead. But it works.
* cssnode: Add hackery to allow bypassing widget pathsBenjamin Otte2015-03-181-0/+35
| | | | | | | 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.
* cssnode: Remove now unused arg from vfuncBenjamin Otte2015-03-181-2/+1
|
* cssnode: Make widget node not copy the pathBenjamin Otte2015-03-181-3/+1
| | | | | | | 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.
* cssnode: Make widget node use new matcherBenjamin Otte2015-03-181-0/+18
|
* stylecontext: Don't queue animate tick callbacks anymoreBenjamin Otte2015-03-181-0/+4
| | | | Instead, just mark nodes permanently as invalid.
* cssnode: Handle invalidate queueing differentlyBenjamin Otte2015-03-181-3/+17
| | | | | | 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.
* cssnode: Change way invalidation is handledBenjamin Otte2015-03-181-8/+3
| | | | | | 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.
* cssnode: Refactor gtk_css_widget_node_validate()Benjamin Otte2015-03-181-58/+50
| | | | Makes it clearer what actually happens in that function.
* cssnode: Automatically recreate style on get_style() callBenjamin Otte2015-03-181-0/+9
| | | | | | When the style is invalid, redo it. Make this a vfunc, so the widget nodes can opt out.
* cssnode: Track pending changes hereBenjamin Otte2015-03-181-13/+0
| | | | ... instead of GtkCssWidgetNode.
* stylecontext: Move gtk_style_context_validate() to GtkCssWidgetNodeBenjamin Otte2015-03-181-5/+99
|
* cssnode: Add gtk_style_context_get_style_provider()Benjamin Otte2015-03-181-0/+12
| | | | ... and use it when looking up properties.
* stylecontext: Move validation into GtkCssNodeBenjamin Otte2015-03-181-13/+22
|
* cssnode: Track invalid flagBenjamin Otte2015-03-181-5/+19
| | | | Remove it from GtkStyleContext.
* stylecontext: Move relevant_changes tracking to GtkCssWidgetNodeBenjamin Otte2015-03-181-1/+17
|
* cssnode: Handle invalidationBenjamin Otte2015-03-181-0/+16
| | | | | Handle invalidation of node inside the CssNode code, don't do it in the stylecontext.