Keeping the GdkRGBA requires doing later conversions, which isn't
necessary if we just keep the already converted float[4].
It also prepares for future color states, where the color will need to
be converted using the colorstate.
Fill and stroke nodes were not reporting proper offscreen-for-opacity
and preferred depth.
This was unlikely to have been noticed as their child is usually a solid
color.
Some of the properties where currentcolor might make a difference
between computed and used value are arrays, so we need to be able
to resolve arrays of values. Change things around to make resolve
a GtkCssValue vfunc and turn the existing resolve() implementations
into implementations of that vfunc.
Fixes: #6814
There is no way for callers of this function to find out if
the drop is still the same, so spewing a critical if it isn't
seems useless. Just quietly do nothing.
gtk_text_set_positions is the central place for any changes to
text caret and selection bound. And it already filters out no-change
updates. So move the remaining signals from
gtk_text_set_selection_bounds here, for more accurate updates
of cursor positions in accessibility.
Fixes: #6805
These tests check various situations with inheritance and
currentColor. In particular the caret-color test was not
working correctly before we handled used values explicitly.
The way this works is that we first apply the value changes
from animations, which will trigger recomputation of the regular
style properies if the keyframes contains custom properties.
After that is done, we resolve the used values, base on the
new computed values. This is where currentcolor is resolved.
Change the style computation machinery to populate the used
values struct, and stop relying on NULL values in the values
structs to indicate currentColor occurrences. Instead, use
gtk_css_color_value_contains_current_color() when determining
style changes.
Make gtk_css_color_value_resolve() handle situations where it can't
fully resolve a color expression. This will start to happen in the
next commits, when we make currentColor compute to itself
This commit also changes the api for gtk_css_color_value_resolve
to not take the property_id, since we already pass the currentcolor
value that it is meant to help determine. Update all callers.
Track whether a value contains currentcolor (in which case
it needs to be resolved at use time).
This just adds the bit and the getter, it isn't used yet.
When we look for what values need recomputing, we also determine what
value we are going to use to recompute. For values that contain
variables, that is the 'original' value, as returned by
gtk_css_style_get_original_value. For values that we recompute
because they may contain currentcolor, that is the specified value
as returned by gtk_css_animated_style_get_intrinsic_value.
The one issue here is that we currently don't preserve currentcolor
in the computed value, so recomputing the value does not do us
any good in the color case. That will be fixed separately.