Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 919dd36c27d2d5e4825d68c5f6750e993183aa69
https://github.com/WebKit/WebKit/commit/919dd36c27d2d5e4825d68c5f6750e993183aa69
Author: Ari Young <[email protected]>
Date: 2026-03-20 (Fri, 20 Mar 2026)
Changed paths:
M Source/WebKit/UIProcess/ios/WKActionSheetAssistant.h
M Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm
M Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
M Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm
Log Message:
-----------
Hide _WKElementActionTypeSaveImage for images hosted or displayed on managed
domains
rdar://37031149
https://bugs.webkit.org/show_bug.cgi?id=310229
Reviewed by Abrar Rahman Protyasha.
When the page URL or image URL is managed by MDM (MCProfileConnection) on iOS,
hide the Save Image
action from both image and linked-image action sheets. The delegate
(WKContentViewInteraction)
provides the page URL via a new required delegate method,
currentPageURLForActionSheetAssistant:.
Also add several tests which verify the contents of the action sheet when there
is no management and
when either the page or image URL is managed, for both plain images and linked
images.
Test: Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm
* Source/WebKit/UIProcess/ios/WKActionSheetAssistant.h:
* Source/WebKit/UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant defaultActionsForLinkSheet:]):
(-[WKActionSheetAssistant _isPhotoLibraryAccessDenied]):
(-[WKActionSheetAssistant _canShowSaveImageActionForImageURL:]):
(-[WKActionSheetAssistant defaultActionsForImageSheet:]):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView currentPageURLForActionSheetAssistant:]):
* Tools/TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
(-[MockManagedPageURL isURLManaged:]):
(-[MockManagedImageURL isURLManaged:]):
(-[MockTCCGranted _isPhotoLibraryAccessDenied]):
(-[MockTCCDenied _isPhotoLibraryAccessDenied]):
(TestWebKitAPI::defaultActionsContainSaveImage):
(TestWebKitAPI::saveImageActionIsPresent):
(TestWebKitAPI::TEST(ActionSheetTests, SaveImageActionIsPresent)):
(TestWebKitAPI::TEST(ActionSheetTests,
SaveImageActionIsExcludedWhenTCCIsDenied)):
(TestWebKitAPI::TEST(ActionSheetTests,
SaveImageActionIsExcludedWhenPageURLIsManaged)):
(TestWebKitAPI::TEST(ActionSheetTests,
SaveImageActionIsExcludedWhenImageURLIsManaged)):
(TestWebKitAPI::TEST(ActionSheetTests, LinkedImageSaveImageActionIsPresent)):
(TestWebKitAPI::TEST(ActionSheetTests,
LinkedImageSaveImageActionIsExcludedWhenTCCIsDenied)):
(TestWebKitAPI::TEST(ActionSheetTests,
LinkedImageSaveImageActionIsExcludedWhenPageURLIsManaged)):
(TestWebKitAPI::TEST(ActionSheetTests,
LinkedImageSaveImageActionIsExcludedWhenImageURLIsManaged)):
Canonical link: https://commits.webkit.org/309628@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications