[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da
andersca at apple.com
andersca at apple.com
Wed Dec 22 18:14:20 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 2e689a96adbc264fa08540e406b70c044f078559
Author: andersca at apple.com <andersca at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Dec 9 01:09:03 2010 +0000
WebFrameProxy::canShowMIMEType should return true for PDF MIME types in the main frame
https://bugs.webkit.org/show_bug.cgi?id=50724
Reviewed by Darin Adler.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::pdfAndPostScriptMIMETypes):
* UIProcess/WebContext.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::canShowMIMEType):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@73569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 185d9f0..e6f1a03 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-08 Anders Carlsson <andersca at apple.com>
+
+ Reviewed by Darin Adler.
+
+ WebFrameProxy::canShowMIMEType should return true for PDF MIME types in the main frame
+ https://bugs.webkit.org/show_bug.cgi?id=50724
+
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::pdfAndPostScriptMIMETypes):
+ * UIProcess/WebContext.h:
+ * UIProcess/WebFrameProxy.cpp:
+ (WebKit::WebFrameProxy::canShowMIMEType):
+
2010-12-08 Brian Weinstein <bweinstein at apple.com>
Reviewed by Brady Eidson.
diff --git a/WebKit2/UIProcess/WebContext.cpp b/WebKit2/UIProcess/WebContext.cpp
index 6419c6c..930d2fd 100644
--- a/WebKit2/UIProcess/WebContext.cpp
+++ b/WebKit2/UIProcess/WebContext.cpp
@@ -411,6 +411,18 @@ void WebContext::downloadFinished(DownloadProxy* downloadProxy)
m_downloads.remove(downloadProxy->downloadID());
}
+// FIXME: This is not the ideal place for this function.
+HashSet<String, CaseFoldingHash> WebContext::pdfAndPostScriptMIMETypes()
+{
+ HashSet<String, CaseFoldingHash> mimeTypes;
+
+ mimeTypes.add("application/pdf");
+ mimeTypes.add("application/postscript");
+ mimeTypes.add("text/pdf");
+
+ return mimeTypes;
+}
+
void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments)
{
if (messageID.is<CoreIPC::MessageClassWebContext>()) {
diff --git a/WebKit2/UIProcess/WebContext.h b/WebKit2/UIProcess/WebContext.h
index 6a26c64..91aed59 100644
--- a/WebKit2/UIProcess/WebContext.h
+++ b/WebKit2/UIProcess/WebContext.h
@@ -122,6 +122,8 @@ public:
WebDownloadClient& downloadClient() { return m_downloadClient; }
void downloadFinished(DownloadProxy*);
+ static HashSet<String, CaseFoldingHash> pdfAndPostScriptMIMETypes();
+
private:
WebContext(ProcessModel, const String& injectedBundlePath);
diff --git a/WebKit2/UIProcess/WebFrameProxy.cpp b/WebKit2/UIProcess/WebFrameProxy.cpp
index f5b5731..5b8a3d4 100644
--- a/WebKit2/UIProcess/WebFrameProxy.cpp
+++ b/WebKit2/UIProcess/WebFrameProxy.cpp
@@ -26,6 +26,7 @@
#include "WebFrameProxy.h"
#include "WebCertificateInfo.h"
+#include "WebContext.h"
#include "WebFormSubmissionListenerProxy.h"
#include "WebFramePolicyListenerProxy.h"
#include "WebPageProxy.h"
@@ -86,6 +87,12 @@ bool WebFrameProxy::canShowMIMEType(const String& mimeType) const
if (m_page->canShowMIMEType(mimeType))
return true;
+#if PLATFORM(MAC)
+ // On Mac, we can show PDFs in the main frame.
+ if (isMainFrame())
+ return WebContext::pdfAndPostScriptMIMETypes().contains(mimeType);
+#endif
+
return false;
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list