From af5d892a7e2dc44f8c6b4ff3e3397903a9bcc9e1 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 7 May 2023 06:43:22 +0200 Subject: Ladybird: Don't ask Qt to decode SVG images for us While it's nice to see suddenly work in Ladybird after linking with the Qt SVG module, this is cheating. We should implement SVG-as-image ourselves instead of relying on 3rd party code to do it. :^) --- Ladybird/ImageCodecPluginLadybird.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Ladybird/ImageCodecPluginLadybird.cpp b/Ladybird/ImageCodecPluginLadybird.cpp index 0172d2d384..054a343391 100644 --- a/Ladybird/ImageCodecPluginLadybird.cpp +++ b/Ladybird/ImageCodecPluginLadybird.cpp @@ -72,6 +72,12 @@ Optional ImageCodecPluginLadybird::decode_image(Rea auto image = decode_image_with_libgfx(data); if (image.has_value()) return image; + + // NOTE: Even though Qt can decode SVG images for us, let's not do that. + // We should handle ourselves instead of cheating by using Qt. + if (data.starts_with("