File: no_pdf_image_plugin.diff

package info (click to toggle)
qtwebkit-opensource-src 5.212.0~alpha4-30
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 126,360 kB
  • sloc: cpp: 1,399,204; javascript: 111,961; ansic: 29,742; perl: 19,510; python: 13,364; ruby: 10,299; xml: 9,342; asm: 5,078; yacc: 2,166; lex: 906; sh: 417; makefile: 34
file content (18 lines) | stat: -rw-r--r-- 854 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Description: do not attempt rendering PDF with Qt image plugin
 Qt 5.15 added Qt PDF module which comes with imageformat plugin, which
 allows rendering first page of PDF document as image.
Origin: upstream, https://github.com/qtwebkit/qtwebkit/commit/0443d42b04e0f99c
Last-Update: 2020-09-13

--- a/Source/WebCore/platform/MIMETypeRegistry.cpp
+++ b/Source/WebCore/platform/MIMETypeRegistry.cpp
@@ -254,6 +254,9 @@ static void initializeSupportedImageMIME
     // 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)
 }