⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 98781 in webkit


Ignore:
Timestamp:
Oct 28, 2011, 4:35:08 PM (15 years ago)
Author:
jeffm@apple.com
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):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r98769 r98781  
     12011-10-28  Jeff Miller  <jeffm@apple.com>
     2
     3        More work on WebKit2 should respect WebKitOmitPDFSupport preference on the Mac
     4        https://bugs.webkit.org/show_bug.cgi?id=71156
     5       
     6        Don't include PDF and PostScript types in the set of MIME types with custom representations
     7        when initializing the web process if WebKitOmitPDFSupport is set.
     8       
     9        I believe the previous patch r98513 was actually sufficient to prevent PDFs from being
     10        shown inline when this preference was set, but to be complete we should exclude the MIME
     11        types here as well.
     12
     13        Reviewed by Alexey Proskuryakov.
     14
     15        * UIProcess/mac/WebContextMac.mm:
     16        (WebKit::WebContext::platformInitializeWebProcess):
     17
    1182011-10-28  John Sullivan  <sullivan@apple.com>
    219
  • trunk/Source/WebKit2/UIProcess/mac/WebContextMac.mm

    r98513 r98781  
    7070void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& parameters)
    7171{
    72     // We want to use a PDF view in the UI process for PDF MIME types.
    73     HashSet<String, CaseFoldingHash> mimeType = pdfAndPostScriptMIMETypes();
    74     parameters.mimeTypesWithCustomRepresentation.appendRange(mimeType.begin(), mimeType.end());
     72    if (!omitPDFSupport()) {
     73        // We want to use a PDF view in the UI process for PDF MIME types.
     74        HashSet<String, CaseFoldingHash> mimeType = pdfAndPostScriptMIMETypes();
     75        parameters.mimeTypesWithCustomRepresentation.appendRange(mimeType.begin(), mimeType.end());
     76    }
    7577
    7678    RetainPtr<CFStringRef> cachePath(AdoptCF, WKCopyFoundationCacheDirectory());
Note: See TracChangeset for help on using the changeset viewer.