Benjamin Otte
efda30c495
stylecontext: Don't queue animate tick callbacks anymore
...
Instead, just mark nodes permanently as invalid.
2015-03-18 15:23:30 +01:00
Benjamin Otte
020f3f11c8
cssnode: Handle invalidate queueing differently
...
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.
2015-03-18 15:23:30 +01:00
Benjamin Otte
cdd964a3af
cssnode: Change way invalidation is handled
...
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.
2015-03-18 15:23:30 +01:00
Benjamin Otte
5f19f09ac3
cssnode: Refactor gtk_css_widget_node_validate()
...
Makes it clearer what actually happens in that function.
2015-03-18 15:23:30 +01:00
Benjamin Otte
219e52f7e1
cssnode: Automatically recreate style on get_style() call
...
When the style is invalid, redo it.
Make this a vfunc, so the widget nodes can opt out.
2015-03-18 15:23:30 +01:00
Benjamin Otte
71813671ef
cssnode: Track pending changes here
...
... instead of GtkCssWidgetNode.
2015-03-18 15:23:30 +01:00
Benjamin Otte
c550cf122a
stylecontext: Move gtk_style_context_validate() to GtkCssWidgetNode
2015-03-18 15:23:30 +01:00
Benjamin Otte
03ac5f310b
cssnode: Add gtk_style_context_get_style_provider()
...
... and use it when looking up properties.
2015-03-18 15:23:29 +01:00
Benjamin Otte
4cc2af2db1
stylecontext: Move validation into GtkCssNode
2015-03-18 15:23:29 +01:00
Benjamin Otte
55e68bc2ea
cssnode: Track invalid flag
...
Remove it from GtkStyleContext.
2015-03-18 15:23:29 +01:00
Benjamin Otte
8c73799ca8
stylecontext: Move relevant_changes tracking to GtkCssWidgetNode
2015-03-18 15:23:29 +01:00
Benjamin Otte
7bafb63ec3
cssnode: Handle invalidation
...
Handle invalidation of node inside the CssNode code, don't do it in the
stylecontext.
2015-03-18 15:23:29 +01:00
Benjamin Otte
d79a44c1af
stylecontext: Get rid of create_query_path()
...
Move that functionality into GtkCssNode.
2015-03-18 15:23:29 +01:00
Benjamin Otte
e2f6d4db43
cssnode: Split into 3 objects
...
- GtkCssWidgetNode
for style contexts owned by a widget
- GtkCssPathNode
for style contexts using a GtkWidgetPath
- GtkCssTransientNode
for nodes created with gtk_style_context_save()/restore()
2015-03-18 15:23:29 +01:00