diff options
author | Benjamin Otte <otte@redhat.com> | 2023-05-12 19:20:58 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2023-05-16 18:53:27 +0200 |
commit | ee6ef41e715d3ea373c32e2bcd4d05e36d2534e8 (patch) | |
tree | 149d5bdb643428dc5539400e79fe7721570b33ea /testsuite | |
parent | fde3d2cd50585ec2abef1313fbf4cd189c88a2a1 (diff) | |
download | gtk+-ee6ef41e715d3ea373c32e2bcd4d05e36d2534e8.tar.gz |
css: Remove crashy resource:// optimization
Using gdk_texture_new_from_resource() is not valid here because we are
not sure if the given resource is valid.
Plus, the previous optimization is no longer relevant, because we are
not using gdk_pixbuf_new_from_resource() anymore - which was what this
optimization was about before it was ported to GdkTexture.
Test attached.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/css/parser/meson.build | 2 | ||||
-rw-r--r-- | testsuite/css/parser/resource-url.css | 3 | ||||
-rw-r--r-- | testsuite/css/parser/resource-url.ref.css | 7 |
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/css/parser/meson.build b/testsuite/css/parser/meson.build index b59ad993c8..b05efb7fd2 100644 --- a/testsuite/css/parser/meson.build +++ b/testsuite/css/parser/meson.build @@ -466,6 +466,8 @@ test_data = [ 'radial-positions.errors', 'radial-positions.ref.css', 'radial.ref.css', + 'resource-url.css', + 'resource-url.ref.css', 'rotate3d-crash.css', 'rotate3d-crash.errors', 'rotate3d-crash.ref.css', diff --git a/testsuite/css/parser/resource-url.css b/testsuite/css/parser/resource-url.css new file mode 100644 index 0000000000..04541160e2 --- /dev/null +++ b/testsuite/css/parser/resource-url.css @@ -0,0 +1,3 @@ +window { background-image: url("resource://"); } + +button { background-image: url("resource://doesnotexist.jpg"); } diff --git a/testsuite/css/parser/resource-url.ref.css b/testsuite/css/parser/resource-url.ref.css new file mode 100644 index 0000000000..439229a509 --- /dev/null +++ b/testsuite/css/parser/resource-url.ref.css @@ -0,0 +1,7 @@ +window { + background-image: none /* invalid image */; +} + +button { + background-image: none /* invalid image */; +} |