[webkit-changes] [WebKit/WebKit] 86f6d6: Stop asking isPDFOrPostScriptMIMEType() since PDFP...

Abrar Rahman Protyasha noreply at github.com
Tue May 7 11:48:15 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 86f6d64476efec01add5042e7659310bda8c0ce8
      https://github.com/WebKit/WebKit/commit/86f6d64476efec01add5042e7659310bda8c0ce8
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2024-05-07 (Tue, 07 May 2024)

  Changed paths:
    M Source/WebCore/dom/DOMImplementation.cpp
    M Source/WebCore/html/HTMLImageLoader.cpp
    M Source/WebCore/platform/MIMETypeRegistry.cpp
    M Source/WebCore/platform/MIMETypeRegistry.h
    M Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm
    M Source/WebKit/UIProcess/WebFrameProxy.cpp
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp
    M Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm
    M Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm

  Log Message:
  -----------
  Stop asking isPDFOrPostScriptMIMEType() since PDFPlugin does not transcode PostScript to PDF anymore
https://bugs.webkit.org/show_bug.cgi?id=273807
rdar://127647542

Reviewed by Tim Horton.

In 246657 at main, we removed PostScript conversion code. Since the
transcoding to PDF is not supported anymore, we can replace all calls to
`isPDFOrPostScriptMIMEType()` with `isPDFMIMEType()`. The former rests
on a false premise now.

This patch introduces one subtle behavior change, which is that we no
longer present a HUD on <object type="application/postscript">.

* Source/WebCore/dom/DOMImplementation.cpp:
(WebCore::DOMImplementation::createDocument):
* Source/WebCore/html/HTMLImageLoader.cpp:
(WebCore::HTMLImageLoader::dispatchLoadEvent):
* Source/WebCore/platform/MIMETypeRegistry.cpp:
(WebCore::MIMETypeRegistry::isPDFOrPostScriptMIMEType): Deleted.
* Source/WebCore/platform/MIMETypeRegistry.h:
* Source/WebCore/platform/cocoa/MIMETypeRegistryCocoa.mm:
(WebCore::MIMETypeRegistry::isApplicationPluginMIMEType):
* Source/WebKit/UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::isDisplayingPDFDocument const):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::canShowMIMEType):
(WebKit::WebPageProxy::decidePolicyForResponseShared):
* Source/WebKit/WebProcess/WebCoreSupport/WebLocalFrameLoaderClient.cpp:
(WebKit::WebLocalFrameLoaderClient::objectContentType):
* Source/WebKit/WebProcess/WebPage/Cocoa/WebPageCocoa.mm:
(WebKit::WebPage::shouldUsePDFPlugin const):
* Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm:
(-[NSPasteboard _web_writePromisedRTFDFromArchive:containsImage:]):

Canonical link: https://commits.webkit.org/278471@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list