Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4e0dd1ff1a4ca32b1e1743411884613c09470589
      
https://github.com/WebKit/WebKit/commit/4e0dd1ff1a4ca32b1e1743411884613c09470589
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2025-07-31 (Thu, 31 Jul 2025)

  Changed paths:
    M LayoutTests/fast/events/ios/pdf-modifer-key-down-crash.html
    M LayoutTests/fast/replaced/encrypted-pdf-as-object-and-embed.html
    M LayoutTests/fast/replaced/pdf-iframe-load-crash.html
    M Source/WTF/wtf/PlatformEnable.h
    M Source/WTF/wtf/PlatformEnableCocoa.h
    M Source/WTF/wtf/PlatformHave.h
    M Source/WebKit/Platform/spi/Cocoa/PDFKitSPI.h
    M Source/WebKit/Shared/Cocoa/PDFKitSoftLink.h
    M Source/WebKit/Shared/Cocoa/PDFKitSoftLink.mm
    M Source/WebKit/SourcesCocoa.txt
    M Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h
    M Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm
    M Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h
    M Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm
    R Source/WebKit/UIProcess/ios/WKPDFView.h
    R Source/WebKit/UIProcess/ios/WKPDFView.mm
    M Source/WebKit/UIProcess/ios/WKUSDPreviewView.mm
    M Source/WebKit/WebKit.xcodeproj/project.pbxproj
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm

  Log Message:
  -----------
  Remove WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=296654
rdar://157053061

Reviewed by Megan Gardner, Aditya Keerthi, and Tim Horton.

WKPDFView is no longer supported on trunk given that we've moved on with
UnifiedPDFPlugin on iOS family too. In this patch, we remove WKPDFView.
This also lets us perform adjacent cleanup, as detailed below:

1. Remove the USE_WKPDFVIEW and HAVE_SETUSEIOSURFACEFORTILES macros. The
   latter was used to gate -setUseIOSurfaceForTiles: in WKPDFView.
2. Remove PDFHVC declarations in PDFKitSPI.h.
3. Remove PDFHVC soft link support for tvOS.
4. Remove many methods from the WKWebViewContentProvider interface. This
   includes optional methods that were only implemented by WKPDFView, as
   well as web_requiresCustomSnapshotting, which was only a non-constant
   for WKPDFView. Removal of the custom snapshotting getter allowed us
   to some snapshot code.
5. Greatly simplify -_isDisplayingPDF to no longer consult either the
   presence of custom content providers or the UnifiedPDF feature status.
6. Remove -_tryToHandleKeyEventInCustomContentView and all paths that
   called it since WKUSDPreviewView did not use web_handleKeyEvent. This
   also allowed us to remove the presses[Began|Changed|Ended|Cancelled]:
   implementations on WKWebView.
7. Similarly, simplify the UIScrollViewDelegate implementations on
   WKWebView because WKUSDPreviewView did not do any custom scrolling.
8. Simplify [_data|suggestedFilename]ForDisplayedPDF to unconditionally
   return nil. These methods have been deprecated and return nil when
   Unified PDF is enabled, anyway.
9. No longer register WKPDFView as a PDF content provider in the content
   provider registry.

* LayoutTests/fast/events/ios/pdf-modifer-key-down-crash.html:
* LayoutTests/fast/replaced/encrypted-pdf-as-object-and-embed.html:
* LayoutTests/fast/replaced/pdf-iframe-load-crash.html:
* Source/WTF/wtf/PlatformEnable.h:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WTF/wtf/PlatformHave.h:
* Source/WebKit/Platform/spi/Cocoa/PDFKitSPI.h:
* Source/WebKit/Shared/Cocoa/PDFKitSoftLink.h:
* Source/WebKit/Shared/Cocoa/PDFKitSoftLink.mm:
* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView takeSnapshotWithConfiguration:completionHandler:]):
(-[WKWebView _isDisplayingPDF]):
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView scrollViewWillBeginZooming:withView:]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView scrollViewDidZoom:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[WKWebView _dataForDisplayedPDF]):
(-[WKWebView _suggestedFilenameForDisplayedPDF]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView 
_snapshotRectAfterScreenUpdates:rectInViewCoordinates:intoImageOfWidth:completionHandler:]):
(-[WKWebView _tryToHandleKeyEventInCustomContentView:]): Deleted.
(-[WKWebView pressesBegan:withEvent:]):
(-[WKWebView pressesChanged:withEvent:]):
(-[WKWebView pressesEnded:withEvent:]):
(-[WKWebView pressesCancelled:withEvent:]):
* Source/WebKit/UIProcess/Cocoa/WKWebViewContentProvider.h:
* Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
(-[WKWebViewContentProviderRegistry initWithConfiguration:]):
* Source/WebKit/UIProcess/ios/WKPDFView.h: Removed.
* Source/WebKit/UIProcess/ios/WKPDFView.mm: Removed.
* Source/WebKit/UIProcess/ios/WKUSDPreviewView.mm:
(+[WKUSDPreviewView web_requiresCustomSnapshotting]): Deleted.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:
(runTest):
(TEST(QuickLook, AllowResponseAfterLoadingPreview)):
(TEST(QuickLook, CancelResponseAfterLoadingPreview)):
(TEST(QuickLook, DownloadResponseAfterLoadingPreview)):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm:
(TEST(WebKit, WKNavigationResponsePDFType)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to