| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Use it instead of _gtk_css_parser_has_number().
We need that once we introduce calc() support.
|
|
|
|
|
|
|
| |
This is in preparation for calc(), as calc(50% - 5px) is valid CSS
but has 2 units. Instead, add a function to query a value's dimension
(so we can differentiate lengths from numbers) and add a function to
query if the value contains percentages.
|
| |
|
|
|
|
|
| |
These are not in any CSS specifications, so mark them as GTK+
additions by giving them a -gtk prefix. The old names still work.
|
|
|
|
|
| |
The support is limited to underline single, double and wavy, which
is what pango has today.
|
|
|
|
|
| |
Note that for now we take into account only text-decoration-line
and text-decoration-color
|
|
|
|
| |
Some forgotten include path adjustments.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The font-stretch CSS property is defined in the Level 3 CSS Fonts
module, available at:
http://dev.w3.org/csswg/css-fonts/#propdef-font-stretch
It allows defining a normal, condensed, or expanded face to the font
description. Pango already supports it, so this is literally just the
CSS parser machinery needed to bridge our CSS to the FontDescription
API.
https://bugzilla.gnome.org/show_bug.cgi?id=735593
|
|
|
|
|
|
|
| |
When a number is not a nubmer, don't just crash, exit properly with an
error code.
See attached testcase for an example.
|
|
|
|
|
| |
There was an infinite loop when parsing invalid text after having parsed
a color in the border shorthand. See attached testcase for an example.
|
|
|
|
|
|
|
| |
I have no idea why it was special cased when parsing the 'animation'
shorthand, but it caused crashes.
So remove the special case.
|
|
|
|
|
|
|
|
| |
Here's the spec:
http://dev.w3.org/csswg/css-cascade/#all-shorthand
Also use it in the reset-to-defaults CSS where a bunch of properties had
been missing.
|
|
|
|
|
|
| |
Both a shorthand and individual properties. This is not officially part
of the CSS standard, but there's precedence for it at least in Mozilla:
https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-outline-radius
|
|
|
|
|
| |
This code was clearly meant to return _after_ the loop.
Don't put the return inside the loop body, then.
|
| |
|
|
|
|
|
|
|
| |
Parsing a shorthand background property was running into unexpected
errors when trying position values where there were none. To fix this,
introduce a try_parse variant of the position parse function that
silently returns NULL.
|
| |
|
| |
|
| |
|
|
|
|
| |
Right now, just parse the first value in the array.
|
|
|
|
| |
It's part of the parser now.
|
|
|
|
| |
The file is now part of the GtkCssParser
|
|
|
|
|
| |
We haven't been using ints there for a while, I wonder why that never
blew up...
|
|
|
|
| |
.. now that it is one.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
.. and parse border-image-slice with it.
|
|
|
|
|
|
| |
In particular, that's background-repeat and border-image-repeat.
Also, fix up the border-image shorthand to allow any order.
|
|
|
|
| |
... and convert those properties to this value.
|
|
|
|
|
|
|
| |
Does 3 things:
1) Introduce a "none" array signleton
2) Get rid of memleaks in error paths
3) Reduce code in parse funcs
|
|
|
|
|
|
| |
Just store the value as px for now.
The font-size property needs a complete makeover anyway.
|
|
|
|
| |
It's now a CssArrayValue filled with CssStringValue
|
|
|
|
|
|
|
| |
... and get rid of its GType.
This makes it non-queryable using gtk_style_context_get() but it used to
be a private struct anyway.
|
| |
|
|
|
|
| |
And fix the parser to conform to the CSS spec while at it.
|
|
|
|
|
| |
... and add them via gtkcssenumvalue.[ch] which will be used for all
enums.
|
| |
|
|
|
|
| |
Also split out initial/inherit handling into a custom GtkCssValue class.
|
|
|
|
|
| |
... and don't make it return a GtkCssValue. We want to use this for
compat with the old GValue APIs after all...
|
| |
|
|
|
|
|
|
| |
Also, in places where we're computing a new CssValue based on an
old one, make sure that if nothing changes we're returning a reference
to the old one, rather than creating a new identical instance.
|
| |
|
|
|
|
| |
Also remove the now unused border parsing function for shorthands.
|
| |
|
|
|
|
| |
We can do % now, wohoo!
|
| |
|
|
|
|
|
| |
This is the first step on a quest to ensure that there is only ever one
GType in use for GValues in every stage of the CSS resolving process.
|
|
|
|
| |
Code for border-color was missing the currentColor parsing.
|