summaryrefslogtreecommitdiff
path: root/gtk/gtkcssstringvalue.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow inserting newlines in css stringsMatthias Clasen2020-10-021-1/+1
| | | | | | Rename _gtk_css_print_string to strip the _ and add an insert_newlines argument to it. Update all callers, and make the render node serializer insert newlines.
* css: Move _gtk_css_print_string aroundMatthias Clasen2020-10-021-0/+1
| | | | | | Move this to a separate header, since it is not parser functionality, and kill the duplicate gtkcssparserprivate.h header.
* css: Set the is_computed flag for more valuesTimm Bäder2020-01-181-0/+2
| | | | | With these changes, we skip roughly 85% of compute() calls during widget-factory startup
* cssvalue: Add type names for all classesTimm Bäder2020-01-181-0/+2
| | | | | This is important to have for debugging and e.g. to print statistics for the individual css value types
* cssparser: Add gtk_css_parser_consume_string()Benjamin Otte2019-04-121-2/+7
| | | | | Well, just rename _gtk_css_parser_read_string() for the new semantics, but this sounds cooler.
* cssparser: Add gtk_css_parser_consume_ident()Benjamin Otte2019-04-121-1/+1
| | | | And use it to fix the palette parser.
* css: Introduce the idea of dynamic valuesBenjamin Otte2018-03-161-0/+4
| | | | | | | Dynamic values are values that change their contents with the current (monotonic) time. This just introduces the GtkCssValue API for it.
* css: Merge GtkStyleProviderPrivate into GtkStyleProviderBenjamin Otte2017-10-311-5/+5
| | | | | | | | This is just lots of renaming. The interface remains private, so the public API does not change, apart from removing the definition of the Interface object to avoid subclassing.
* css: Drop the new indent api againMatthias Clasen2017-09-181-28/+0
| | | | It is not used anymore, and it was not a good idea.
* Add an auxiliary ident parsing functionMatthias Clasen2017-09-181-0/+28
| | | | | This lets us conveniently create ident values from multiple candidates.
* cssvalue: Remove GtkCssDependenciesBenjamin Otte2015-03-181-2/+1
| | | | They are not used anymore.
* css: Move scale to GtkStyleProviderPrivatewip/mir2Benjamin Otte2015-02-061-3/+2
| | | | | | This way, we can remove it as a separate argument from gtk_css_value_compute() and allow computation to only depend on one thing: the style provider.
* cssstyle: Rename GtkCssComputedValues => GtkCssStyleBenjamin Otte2015-01-071-2/+2
| | | | | This is literally just renaming of the object (and the associated source files). No other changes are in there.
* css: Actually break at end of the stringBenjamin Otte2014-05-221-1/+4
| | | | | | | | Introduced in 65c4c1555d0634c063c3aa354620de260e4aaf7f. Found by gnome-continuous running the testsuite. Includes fixing a broken test in the testsuite.
* css: Fix printing code for CSS strings and identsBenjamin Otte2014-05-051-0/+1
| | | | It used to infloop on special characters.
* css: Split out a common functionBenjamin Otte2014-05-051-36/+2
| | | | It's used in two places already, and Iwant to use it in a third one.
* css: Add a scale argument to css-value compute vfuncAlexander Larsson2013-07-031-0/+1
| | | | | | | | We need to be able to compute different GtkCssImage values depending on the scale, and we need this at compute time so that we don't need to read any images other than the scale in used (to e.g. calculate the image size). GtkStyleProviderPrivate is shared for all style contexts, so its not right.
* css: Huge refactoring to avoid computing wrong valuesBenjamin Otte2012-09-281-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Here's the shortest description of the bug I can come up with: When computing values, we have 3 kinds of dependencies: (1) other properties ("currentColor" or em values) (2) inherited properties ("inherit") (3) generic things from the theme (@keyframes or @define-color) Previously, we passed the GtkStyleContext as an argument, because it provided these 3 things using: (1) _gtk_style_context_peek_property() (2) _gtk_style_context_peek_property(gtk_style_context_get_parent()) (3) context->priv->cascade However, this makes it impossible to lookup values other than the ones accessible via _gtk_style_context_peek_property(). And this is exactly what we are doing in gtk_style_context_update_cache(). So when the cache updates encountered case (1), they were looking up the values from the wrong style data. So this large patch essentially does nothing but replace the context argument in all compute functions with new arguments for the 3 cases above: (1) values (2) parent_values (3) provider We apparently have a lot of computing code.
* cssvalue: Don't crash when printing NULL stringsBenjamin Otte2012-09-281-0/+6
| | | | A NULL string should be printed as "none".
* Fix a memory leak in GtkCssStringValueMatthias Clasen2012-09-151-0/+1
|
* cssvalue: Pass property ID to transition functionBenjamin Otte2012-09-031-0/+1
| | | | | | | This is to allow animating arrays properly. I'm not really thrilled about this solution (we leak propertys into the values again...), but it's the best I can come up with - I prefer it to having N different array types...
* css: Introduce dependencies for value computationsBenjamin Otte2012-08-281-3/+4
| | | | | | | | | When values are computed, they might depend on various other values and we need to track this so we can update the values when those other values change. This is the first step in making that happen. This patch does not do any dependency tracking at all, instead it uses GTK_CSS_DEPENDS_ON_EVERYTHING as a sort of FIXME.
* css: Pass property_id to compute functionBenjamin Otte2012-08-281-0/+1
| | | | | | | | | | | | | | | | This is a reorganization of how value computing should be done. Previously the GtkCssStyleProperty.compute vfunc was supposed to take care of special cases when it needed those for computation. However, this proved to be very complicated in cases where values were nested and only the last value (of a common type) needed to be special cased. A common example for this was the fallback handling for unresolvable colors. Now, we pass the property's ID along with all compute functions so we can do the special casing where it's necessary. Note that no actual changes happen in this commit. This will happen in follow-ups.
* css: Introduce _gtk_css_value_compute()Benjamin Otte2012-08-281-0/+9
| | | | | | | This commit is essentially a large reorganization. Instead of all value subtypes having their own compute function, there is the general _gtk_css_value_compute() function that then calls a vfunc on the subtype.
* cssvalue: Add a GtkCssValue for identsBenjamin Otte2012-04-171-0/+87
|
* cssvalue: Add _gtk_css_value_transition()Benjamin Otte2012-04-171-0/+9
| | | | | | | Returns a value that transitions between start and end or %NULL if the values cannot be transitioned. So far, all implementations but numbers and rgba return NULL.
* cssvalue: Add a custom value for stringsBenjamin Otte2012-04-171-0/+128