Title: [97167] trunk/Source/WebKit2
Revision
97167
Author
[email protected]
Date
2011-10-11 12:01:14 -0700 (Tue, 11 Oct 2011)

Log Message

        Embedding of PDF's with <object> or <embed> fails when there is no MIME type specified
        https://bugs.webkit.org/show_bug.cgi?id=64934

        Reviewed by Dan Bernstein.

        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Check URL extension, too,
        like GetPluginPath does in UI process. One difference is that UI process additionally tries
        platform specific extension to MIME type mapping, but that doesn't matter for PDF, which
        does not have other standard extensions.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (97166 => 97167)


--- trunk/Source/WebKit2/ChangeLog	2011-10-11 18:39:42 UTC (rev 97166)
+++ trunk/Source/WebKit2/ChangeLog	2011-10-11 19:01:14 UTC (rev 97167)
@@ -1,5 +1,17 @@
 2011-10-11  Alexey Proskuryakov  <[email protected]>
 
+        Embedding of PDF's with <object> or <embed> fails when there is no MIME type specified
+        https://bugs.webkit.org/show_bug.cgi?id=64934
+
+        Reviewed by Dan Bernstein.
+
+        * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Check URL extension, too,
+        like GetPluginPath does in UI process. One difference is that UI process additionally tries
+        platform specific extension to MIME type mapping, but that doesn't matter for PDF, which
+        does not have other standard extensions.
+
+2011-10-11  Alexey Proskuryakov  <[email protected]>
+
         [Mac] Should be able to display multi-page PDFs in subframes
         https://bugs.webkit.org/show_bug.cgi?id=69804
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (97166 => 97167)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2011-10-11 18:39:42 UTC (rev 97166)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2011-10-11 19:01:14 UTC (rev 97167)
@@ -332,7 +332,8 @@
 
     if (pluginPath.isNull()) {
 #if PLATFORM(MAC)
-        if (parameters.mimeType == "application/pdf")
+        if (parameters.mimeType == "application/pdf"
+            || (parameters.mimeType.isEmpty() && parameters.url.path().lower().endsWith(".pdf")))
             return BuiltInPDFView::create(m_page.get());
 #endif
         return 0;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to