| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
They are not used anymore.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is literally just renaming of the object (and the associated source
files). No other changes are in there.
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Almost all array computations lead to no changes (99% in nautilus)
so we avoid the upfront allocation and delay it until we know its
needed. This drops the allocate/free from the profile.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
Or rather: Implement it for backgrounds, as the animation rules for
arrays vary by property.
|
|
|
|
|
|
|
| |
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 arrays aren't empty, even the ones that appear empty contain one
"none" element.
|
|
|
|
| |
Arrays that support it, handle it themselves.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
All the properties now are a GtkCssArrayValue of GtkCssSadowValue.
GtkCssArrayValue already does everything we want, so no need to
duplicate its funtionality.
|
|
|
|
|
|
|
| |
Does 3 things:
1) Introduce a "none" array signleton
2) Get rid of memleaks in error paths
3) Reduce code in parse funcs
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For now, we return FALSE for all default css values, so this is not very
useful.
I also think of this as an optimization equal, not a guaranteed equal,
because we don't even have a notion of what "equal" means.
For example, for background-repeat, "repeat, repeat" and "repeat"
are functionally equivalent. But the cssvalue has no idea that it's used
for background-repeat.
As a more complicated example, "repeat, no-repeat" and "repeat" are
equal to what one sees as long as there's only one image listed
background-image-source. But once you start transition'ing to an image
with 2 sources, it's different...
|
|
Make the value auto-cycle its child values, so it can be used for
background properties.
|