Commit Graph

9 Commits

Author SHA1 Message Date
Benjamin Otte
170130f1d9 css: Add fast-path for parent selector matching
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.
2020-01-28 02:17:03 +01:00
Benjamin Otte
6a1adf6f1a cssnode: Remove unused widget path vfuncs 2020-01-21 12:47:16 +01:00
Benjamin Otte
6dd19306eb cssnode: Create animated styles by default
... and hardcode transient and path nodes to never create animated
styles.
2015-03-18 15:23:32 +01:00
Benjamin Otte
9b73b39f9a cssnode: Treat transient nodes as invisible nodes
Making transient nodes invisible allows us to remove special cases
without any bad side effects and they continue working just like they
did before.
2015-03-18 15:23:31 +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
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
55e68bc2ea cssnode: Track invalid flag
Remove it from GtkStyleContext.
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
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