[webkit-changes] [WebKit/WebKit] e844ed: [iOS] Disable QuickLook thumbnails when using the ...

Aditya Keerthi noreply at github.com
Sat Oct 8 12:09:55 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e844ed6399a9a0e5e6eb5652f87170c547cca5a5
      https://github.com/WebKit/WebKit/commit/e844ed6399a9a0e5e6eb5652f87170c547cca5a5
  Author: Aditya Keerthi <akeerthi at apple.com>
  Date:   2022-10-08 (Sat, 08 Oct 2022)

  Changed paths:
    M Source/WebCore/page/Navigator.cpp
    M Source/WebCore/page/ShareData.h
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
    M Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp
    M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
    M Source/WebKit/UIProcess/ios/WKPDFView.mm

  Log Message:
  -----------
  [iOS] Disable QuickLook thumbnails when using the Web Share API
https://bugs.webkit.org/show_bug.cgi?id=246097
rdar://99294213

Reviewed by Wenson Hsieh.

Display document icons rather than thumbnail previews when files are shared
using the Web Share API.

To achieve this behavior, provide a placeholder URL using a `UIActivityItemProvider`.

Note `-[UIActivityItemProvider item]` can also be leveraged to further defer
writing to files, beyond our existing logic to write files prior to handing off items to
the Share Sheet (using a `WorkQueue`). However, since `-[UIActivityItemProvider item]`
must return a non-nil value, and the file-writing path has multiple failure modes,
the existing file-writing logic is preserved.

* Source/WebCore/page/Navigator.cpp:
(WebCore::Navigator::share):
* Source/WebCore/page/ShareData.h:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm:
(-[WKShareSheetFileItemProvider initWithURL:]):
(-[WKShareSheetFileItemProvider item]):
(appendFilesAsShareableURLs):
(-[WKShareSheet presentWithParameters:inRect:completionHandler:]):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showShareSheet):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView actionSheetAssistant:shareElementWithURL:rect:]):
(-[WKContentView actionSheetAssistant:shareElementWithImage:rect:]):
* Source/WebKit/UIProcess/ios/WKPDFView.mm:
(-[WKPDFView actionSheetAssistant:shareElementWithURL:rect:]):

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




More information about the webkit-changes mailing list