Commit Graph

12 Commits

Author SHA1 Message Date
Benjamin Otte
8d6b560ff3 cssparser: Fix cases where we could overrun the terminating 0 2011-08-26 16:26:28 +02:00
Benjamin Otte
62d231aeff cssparser: Make lines and positions 0-indexed 2011-08-26 16:26:28 +02:00
Benjamin Otte
014165151f css: Use the correct free function 2011-07-20 02:36:44 +02:00
Benjamin Otte
0d253b67f4 css: Make font property a shorthand
... and implement the CSS font properties:
- font-size
- font-style
- font-family
- font-weight
- font-variant

This is the second try at this. The first was backed out previously due
to bugginess. Let's hope this one survives a bit longer.

Also makes the font-family CSS test work again.
2011-06-15 12:52:53 +02:00
Benjamin Otte
9e2ebdee07 cssparser: Actually send an error in an error case
The error case was excess commas in rgb/rgba colors, such as
rgba(0,255,0,0,0.5)
2011-06-13 15:01:52 +02:00
Benjamin Otte
2e6bb2a0c9 Revert "css: Make font property a shorthand"
The hack in gtk_style_context_get_font() was causing segfaults in
combobox code. This is not acceptable and I'm not awake enough to fix
it, so just reverting until it's fixed sanely is easiest.

This reverts commit cf6bfbdb17.
2011-06-02 02:31:44 +02:00
Benjamin Otte
cf6bfbdb17 css: Make font property a shorthand
... and implement the CSS font properties:
- font-size
- font-style
- font-family
- font-weight
- font-variant
2011-06-02 02:03:52 +02:00
Benjamin Otte
b1aa59d385 css: Don't infloop when resyncing over a slash 2011-06-02 02:03:51 +02:00
Benjamin Otte
beccec296b css: We want to unescape backslashes, not slashes 2011-06-02 02:03:51 +02:00
Benjamin Otte
4c6721d096 cssparser: Fix typo where we used "uint" for a type
Interestingly this works for gcc, but breaks on MSVC.
2011-05-22 06:07:45 +02:00
Benjamin Otte
d2ef71627b css: Make property parsing functions take a css parser
Instead of reading a string and then passing that in, let the parse
functions use the full power of the parser.
2011-05-18 22:17:59 +02:00
Benjamin Otte
7ccb9db79e css: Rewrite the parser
Instead of relying on GScanner and its idea of syntax, code up a parser
that obeys the CSS spec.
This also has the great side effect of reporting correct line numbers
and positions.

Also included is a reorganization of the returned error values. Instead
of error values describing what type of syntax error was returned, the
code just returns SYNTAX_ERROR. Other messages exist for when actual
values don't work or when errors shouldn't be fatal due to backwards
compatibility.
2011-05-18 22:17:55 +02:00