LibWeb: Support decoding SVG favicons

Adds a path that checks if blob contains SVG image before reaching for
image decoder.

Fixes logged image decoding errors on https://chatgpt.com/
This commit is contained in:
Aliaksandr Kalenik 2025-08-25 18:15:31 +02:00 committed by Jelle Raaijmakers
commit 77f6edaf71
Notes: github-actions[bot] 2025-08-27 06:42:04 +00:00
3 changed files with 29 additions and 5 deletions

View file

@ -18,7 +18,7 @@ class SVGDecodedImageData final : public HTML::DecodedImageData {
public:
class SVGPageClient;
static ErrorOr<GC::Ref<SVGDecodedImageData>> create(JS::Realm&, GC::Ref<Page>, URL::URL const&, ByteBuffer encoded_svg);
static ErrorOr<GC::Ref<SVGDecodedImageData>> create(JS::Realm&, GC::Ref<Page>, URL::URL const&, ReadonlyBytes encoded_svg);
virtual ~SVGDecodedImageData() override;
virtual RefPtr<Gfx::ImmutableBitmap> bitmap(size_t frame_index, Gfx::IntSize) const override;