Title: [98781] trunk/Source/WebKit2
Revision
98781
Author
[email protected]
Date
2011-10-28 16:35:08 -0700 (Fri, 28 Oct 2011)

Log Message

More work on WebKit2 should respect WebKitOmitPDFSupport preference on the Mac
https://bugs.webkit.org/show_bug.cgi?id=71156
        
Don't include PDF and PostScript types in the set of MIME types with custom representations
when initializing the web process if WebKitOmitPDFSupport is set.
        
I believe the previous patch r98513 was actually sufficient to prevent PDFs from being
shown inline when this preference was set, but to be complete we should exclude the MIME
types here as well.

Reviewed by Alexey Proskuryakov.

* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (98780 => 98781)


--- trunk/Source/WebKit2/ChangeLog	2011-10-28 23:31:41 UTC (rev 98780)
+++ trunk/Source/WebKit2/ChangeLog	2011-10-28 23:35:08 UTC (rev 98781)
@@ -1,3 +1,20 @@
+2011-10-28  Jeff Miller  <[email protected]>
+
+        More work on WebKit2 should respect WebKitOmitPDFSupport preference on the Mac
+        https://bugs.webkit.org/show_bug.cgi?id=71156
+        
+        Don't include PDF and PostScript types in the set of MIME types with custom representations
+        when initializing the web process if WebKitOmitPDFSupport is set.
+        
+        I believe the previous patch r98513 was actually sufficient to prevent PDFs from being
+        shown inline when this preference was set, but to be complete we should exclude the MIME
+        types here as well.
+
+        Reviewed by Alexey Proskuryakov.
+
+        * UIProcess/mac/WebContextMac.mm:
+        (WebKit::WebContext::platformInitializeWebProcess):
+
 2011-10-28  John Sullivan  <[email protected]>
 
         WebKit2 part of:

Modified: trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm (98780 => 98781)


--- trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm	2011-10-28 23:31:41 UTC (rev 98780)
+++ trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm	2011-10-28 23:35:08 UTC (rev 98781)
@@ -69,9 +69,11 @@
 
 void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
 {
-    // We want to use a PDF view in the UI process for PDF MIME types.
-    HashSet<String, CaseFoldingHash> mimeType = pdfAndPostScriptMIMETypes();
-    parameters.mimeTypesWithCustomRepresentation.appendRange(mimeType.begin(), mimeType.end());
+    if (!omitPDFSupport()) {
+        // We want to use a PDF view in the UI process for PDF MIME types.
+        HashSet<String, CaseFoldingHash> mimeType = pdfAndPostScriptMIMETypes();
+        parameters.mimeTypesWithCustomRepresentation.appendRange(mimeType.begin(), mimeType.end());
+    }
 
     RetainPtr<CFStringRef> cachePath(AdoptCF, WKCopyFoundationCacheDirectory());
     if (!cachePath)
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to