do not attempt rendering PDF with Qt image plugin
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Sat, 28 Aug 2021 17:44:39 +0000 (18:44 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Sat, 28 Aug 2021 17:44:39 +0000 (18:44 +0100)
Origin: upstream, https://github.com/qtwebkit/qtwebkit/commit/0443d42b04e0f99c
Last-Update: 2020-09-13

Qt 5.15 added Qt PDF module which comes with imageformat plugin, which
allows rendering first page of PDF document as image.

Gbp-Pq: Name no_pdf_image_plugin.diff

Source/WebCore/platform/MIMETypeRegistry.cpp

index f824e605bbab1bbb40677c914f1d990f27eb2281..8087dc984b92dfc3be9317a1bd67670a488b4e8f 100644 (file)
@@ -254,6 +254,9 @@ static void initializeSupportedImageMIMETypes()
     // Do not treat SVG as images directly because WebKit can handle them.
     supportedImageMIMETypes->remove("image/svg+xml");
     supportedImageResourceMIMETypes->remove("image/svg+xml");
+    // Do not treat PDF as images
+    supportedImageMIMETypes->remove("application/pdf");
+    supportedImageResourceMIMETypes->remove("application/pdf");
 #endif // PLATFORM(QT)
 #endif // USE(CG)
 }