REGRESSION (iOS 8): PDFs embedded in <object>/<embed> tag don't load at all
[WebKit-https.git] / Source / WebKit2 / WebProcess / WebCoreSupport / WebFrameLoaderClient.cpp
index 3970ce906a9d5691e589305775c06b1b1c9bae6d..7529f92c714e0b9eba13a55be040cf86a8b78b77 100644 (file)
@@ -1501,6 +1501,12 @@ ObjectContentType WebFrameLoaderClient::objectContentType(const URL& url, const
     if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType))
         return ObjectContentFrame;
 
+#if PLATFORM(IOS)
+    // iOS can render PDF in <object>/<embed> via PDFDocumentImage.
+    if (MIMETypeRegistry::isPDFOrPostScriptMIMEType(mimeType))
+        return ObjectContentImage;
+#endif
+
     return ObjectContentNone;
 }