CSS does not do exponents, so printing numbers close to 0 as 1.234e-15
does not work.
Also up the accuracy to 17 digits because that's what everyone else
uses.
We don't want to return a GFile because GFile can't handle can't deal
with data: urls.
That makes the code a bit more complicated that doesn't deal with those
URLs, but it makes the other code actually work.
GtkCssImageUrl also now decodes data urls immediately instead of only at
the first load. So don't use data urls if you care about performance.
When we're at the end of a block and gtk_css_parser_get_token() returns
NULL, gtk_css_parser_commit_token() still consumed the next token.
It does not anymore.
This does not affect the CSS parser, but it exposes issues with the
render parser, which previously just consumed too many closing } tokens
in the past.
Emit all errors via the parser, don't try to have a custom error
handling machinery.
The only exception is the initial file load error - we need to do that
one directly, because there is no 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.
Instead of an error vfunc, have the tokenizer vfunc take a GError
argument. Note that even when an error is returned, there is still a
token to be read.
This library is meant to be the new CSS library that gets used from GDK,
GSK and GTK for string printing and parsing.
As a first step, move GtkCssProviderError into it.
While doing so, split it into GtkCssParserError (for critical problems)
and GtkCssParserWarning (for non-critical problems).