Matthias Clasen
9033336a23
css: Move _gtk_css_print_string around
...
Move this to a separate header, since it is not
parser functionality, and kill the duplicate
gtkcssparserprivate.h header.
2020-10-02 23:40:16 -04:00
Matthias Clasen
527a8048b6
Avoid a crash in css font features values
2020-02-27 14:30:58 -05:00
Timm Bäder
24d8c0a7dc
css: Set the is_computed flag for more values
...
With these changes, we skip roughly 85% of compute() calls during
widget-factory startup
2020-01-18 08:49:51 +01:00
Timm Bäder
1200fe2daf
cssvalue: Add type names for all classes
...
This is important to have for debugging and e.g. to print statistics for
the individual css value types
2020-01-18 08:49:51 +01:00
Matthias Clasen
f0dc5e0be5
css: Simplify font features
...
Don't store numbers as GtkCssValues needlessly.
2020-01-10 16:59:56 -05:00
Matthias Clasen
898e29c989
css: Simplify compute for font features
...
Font features consist of a hash table of number
values, which will never change during compute,
so there is no point in recreating a new value
with a copy of the hash table, constaining the
same string->number mapping.
2020-01-10 15:48:51 -05:00
Benjamin Otte
1cd9396154
css: Review error messages
...
... and move them from _gtk_css_parser_error() to the proper new error
message.
2019-04-12 19:34:28 +02:00
Benjamin Otte
e0a01ba174
css: Redo for new parser
...
This commit is still way too big, but I couldn't make it smaller.
It transitions the old CSS parser to the new parser. CSS parsing is now
tokenized, everything else is probably still buggy.
2019-04-12 19:34:28 +02:00
Benjamin Otte
7f99c1e588
cssparser: Split integer gettig into has/consume functions
...
We can't try to get an integer because ultimately integer getters
support the same shenanigans that numbers and percentages do with calc()
and whatnot.
2019-04-12 19:34:28 +02:00
Benjamin Otte
f0d2f99239
cssparser: Add gtk_css_parser_consume_string()
...
Well, just rename _gtk_css_parser_read_string() for the new semantics,
but this sounds cooler.
2019-04-12 19:34:28 +02:00
Benjamin Otte
3fb44ae651
cssparser: Add gtk_css_parser_try_token()
2019-04-12 19:34:28 +02:00
Benjamin Otte
76fb80f46c
cssparser: Introduce gtk_css_parser_try_ident()
...
... and gtk_css_parser_has_function().
2019-04-12 19:34:28 +02:00
Benjamin Otte
3322599e99
css: Introduce the idea of dynamic values
...
Dynamic values are values that change their contents with the current
(monotonic) time.
This just introduces the GtkCssValue API for it.
2018-03-16 06:04:43 +01:00
Matthias Clasen
22f9562928
Implement font-feature-settings
...
This is a missing part of the CSS font level 3 module.
2017-12-20 10:31:30 -05:00