css: Don't throw warnings on broken URL in image css
authorBenjamin Otte <otte@redhat.com>
Tue, 26 Oct 2021 15:02:56 +0000 (17:02 +0200)
committerBenjamin Otte <otte@redhat.com>
Tue, 26 Oct 2021 21:52:38 +0000 (23:52 +0200)
commitac8c4245b2fb2f1fe8e660c4ad2541efb39cf3d6
tree050b8b9b26940bf4936075ea193d506ddedfc712
parentd726ecdb5d1ece870585c7be89eb6355b2482544
css: Don't throw warnings on broken URL in image css

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 0886ade182f1a958024202d5c20248d57fcdb053

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
gtk/gtkcssimageurl.c
testsuite/reftests/css-image-broken-url.css [new file with mode: 0644]
testsuite/reftests/css-image-broken-url.ref.ui [new file with mode: 0644]
testsuite/reftests/css-image-broken-url.ui [new file with mode: 0644]
testsuite/reftests/meson.build