REGRESSION (255315@main): "Save X images" and "Print" options are missing when sharing image files using Web Share#13111
Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom Apr 24, 2023
Conversation
Collaborator
|
EWS run on current version of this PR (hash 066a1bd) Details
|
whsieh
approved these changes
Apr 24, 2023
Member
Author
|
Thanks for the review! |
…sing when sharing image files using Web Share https://bugs.webkit.org/show_bug.cgi?id=255641 rdar://108242255 Reviewed by Wenson Hsieh. 255315@main made the behavior change to display document icons rather than thumbnail previews when files are shared using the Web Share API, as part of IPC hardening. To achieve this behavior, a placeholder URL using a `UIActivityItemProvider` was provided, rather than the actual file URL. However, a URL with empty data does not provide the Share Sheet with enough information to display the right set of actions for the file. Additionally, file size information is also lost. To fix, provide placeholder `NSData` and a type identifier, rather than a placeholder URL, so that Share Sheet has the information necessary to display the correct actions. Additionally, generate `LPLinkMetadata` using the original URL to ensure the Share Sheet header is correctly populated. * Source/WebKit/Platform/spi/Cocoa/LinkPresentationSPI.h: Added. * Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm: (-[WKShareSheetFileItemProvider initWithURL:]): Provide empty `NSData` rather than a placeholder URL so that Share Sheet requests a type identifier for the file. Use `-[LPMetadataProvider setShouldFetchSubresources:]` to fetch metadata for the header, without generating a thumbnail preview. (-[WKShareSheetFileItemProvider activityViewController:dataTypeIdentifierForActivityType:]): Provide a type identifier for the file. (-[WKShareSheetFileItemProvider activityViewControllerLinkMetadata:]): (-[WKShareSheetURLItemProvider initWithURL:]): * Source/WebKit/WebKit.xcodeproj/project.pbxproj: Canonical link: https://commits.webkit.org/263341@main
066a1bd to
e58872a
Compare
Collaborator
|
Committed 263341@main (e58872a): https://commits.webkit.org/263341@main Reviewed commits have been landed. Closing PR #13111 and removing active labels. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
e58872a
066a1bd
🧪 gtk-wk2🛠 watch