If a URL can't be loaded, we might end up with a NULL file. Handle that
case properly by creating an invalid image instead and don't crash or
complain to stderr when files are NULL.
This was broken since 0886ade182
A new reftest has been included. We need a reftest instead of a
CSS parser test, because the error only becomes visible when
compute()ing the actual image.
Fixes#4373
Have square images in the following sizes:
* 20
* 100
* 150
* 200
* 300
and place them in a can-shrink Picture allocated at the sizes:
* 200x100
* 100x200
and set align to center/center.
That's 10 combinations and they should all do the right thing.
We were only applying <binding> elements when the
object is constructed, which can be triggered by
various things (e.g. a <style> element). Defer
this until we reach </object>, so we can be sure
that we pick up all the bindings.
Testcase included.
Fixes: #4147
The GtkBuilder parser constructs the object e.g.
when handling a <binding> element. There may be
more <property> elements after it, which we were
just not applying. Fix that by always applying
property when we see </object>. To do that, we
need to track the applied status per property.
Test included.
Fixes: #4208
This also switches the rendering code from using gsk_render_node_draw()
to gsk_renderer_render_texture().
Some tests are broken with the GL renderer, so this patch forces the
Cairo renderer until they get fixed.
The test used to test that GtkBox ordered it's children left-to-right in
CSS, no matter the text direction or pack-type.
But there is neither a pack-type anymore nor does GTK4 do that.
So that test has been broken for yers, it just didn't render anything
wrong.
This was comparing the included image-missing icon
with the one in the current icontheme on the test
system. Works fine as long as we don't change
the icons (which we just did). To avoid this, set
the icontheme to hicolor for this test, which does
not have the image-missing icon, so we end up getting
the builtin icon for both ui files.
It seems to make assumptions about text positioning that
are not holding with subpixel positioning. I'm not 100%
sure how that leads to exactly the artifacts that are seen
here, but I am just disabling the test until that is fully
understood.
It makes assumptions about text positioning that are
not holding with subpixel positioning. There is no
guarantee that the next word in a multi-word text
starts on an even pixel boundary, as it does when
you break the text into multiple, separately rendered
blocks.
It tested that a widget shown after the window was mapped deals with
window resizing appropriately when doing the follow-up allocation. Now,
doing this only allocates both at the same time, as allocation happens
during the frame dispatch.
To do the equivalent now, one would have to write code that shows the
label after the first frame was drawn, and that's not possible via a
reftest, so lets remove it.
Use a single environment variable for everything:
- select the ATContext implementation
- select the test ATContext
- disable ATContext entirely
We use the same pattern as GSK_RENDERER, GTK_DEBUG, etc.
The documentation needs to be updated to include the environment
variable.
This makes meson actually parse the individual test
results. Most of the time, it does not make a difference,
but one case where it does is when all the individual
tests of a binary are skipped, meson will mark the
test as skipped.
This adds a GDK_DEBUG=default-settings flag which disables reads
from xsettings and Xft resources, and enables this for the testsuite.
This is one less way to get different testresults depending on the
environment. In particular, it was failing the css tests for me
due to getting the wrong font size because i have a different dpi.