Alexander Larsson
42716cb60f
css: Add const to _gtk_css_selector_tree_match_all arg
2012-11-30 14:53:30 +01:00
Alexander Larsson
9b989a1427
css: Implement ruleset_get_change() with the tree
...
We traverse the tree on the matches instead of using
the linear selectors.
2012-11-30 14:53:30 +01:00
Alexander Larsson
3d5e8f98ec
css: Use the tree to print css selectors
2012-11-30 14:53:30 +01:00
Alexander Larsson
6bec577771
css: Track the tree selector matches
2012-11-30 14:53:30 +01:00
Alexander Larsson
daefb12a23
css: Add GtkCssSelectorTree creation and matching
...
From a set of GtkCssSelectors and the rulesets they match to
we create a large decision tree that lets us efficitently match
against all the rules and return the set of matched rulesets.
The tree is created such that at each level we pick the initial rule[1]
in all the considered selectors for that level and use put the
one that is in most selectors in the node. All selectors matching that
are put in the previous part of the tree.
2012-11-30 14:53:29 +01:00
Benjamin Otte
932794e105
styleprovider: Remove (broken) implementations of get_style
...
The implementations were broken and get_style() is deprecated and
documented to return NULL now.
2012-11-24 21:12:00 +01:00
Benjamin Otte
2d01f7786d
css: Add selector change types
...
This allows querying selectors for which changes would change their
"matchingness".
2012-04-17 08:59:07 +02:00
Benjamin Otte
a94b85d375
css: Make the style provider take a matcher as an input argument
2012-04-17 08:59:07 +02:00
Benjamin Otte
461803e407
gtk: Get gtkwidgetpath.h includes out of the public headers
...
and include them in the C files instead.
2012-03-19 02:26:16 +01:00
Benjamin Otte
ae1cd1b354
selector: Introduce gtk_css_selector_previous()
2012-03-02 02:17:09 +01:00
Benjamin Otte
67d0b8195d
css: Move selector parsing code into a custom function
2012-03-02 02:17:09 +01:00
Javier Jardón
9d0febc9a6
Change FSF Address
2012-02-27 17:06:11 +00:00
Benjamin Otte
a6ac53e2a9
css: Change prototype of _gtk_css_selector_matches()
...
Passing the length of the widget path that is relevant is not necessary
anymore, it was only useful for inheritance. Instead, we now pass the
state flags and let the selector do the state matching for us.
2012-01-09 18:37:50 +01:00
Benjamin Otte
d1a8d73871
css: Constify path argument to _css_selector_matches()
...
It should have been const all the time, but I assumed widgetpath code
wasn't properly const. PEBKAC.
2011-05-27 16:11:09 +02:00
Benjamin Otte
d6f0042773
css: Make _gtk_css_selector_matches() take a path length
...
This will be necessary when handling inherit.
2011-05-18 22:17:57 +02:00
Benjamin Otte
fc88b0f47c
css: Rewrite selectors
...
Selectors now go into their own C file. The new selectors are modeled a
lot closer to the CSS spec. In particular the specificity computation
matches CSS 2.1 exactly.
For details about the why, see also:
http://mail.gnome.org/archives/gtk-devel-list/2011-May/msg00061.html
https://bugzilla.gnome.org/show_bug.cgi?id=649798
2011-05-18 22:17:55 +02:00