[webkit-changes] [WebKit/WebKit] c63a69: REGRESSION (iOS 17): Dragging a calendar event fro...
Wenson Hsieh
noreply at github.com
Sun Apr 7 20:29:53 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c63a695fb5e5f85bb7dc75efc3bcb008696e5703
https://github.com/WebKit/WebKit/commit/c63a695fb5e5f85bb7dc75efc3bcb008696e5703
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2024-04-07 (Sun, 07 Apr 2024)
Changed paths:
M Source/WebCore/platform/ios/PasteboardIOS.mm
M Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
M Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm
A Tools/TestWebKitAPI/Tests/WebKitCocoa/event.ics
Log Message:
-----------
REGRESSION (iOS 17): Dragging a calendar event from Spotlight into Mail doesn’t attach an .ics file
https://bugs.webkit.org/show_bug.cgi?id=272308
rdar://120436702
Reviewed by Abrar Protyasha.
In iOS 17, Spotlight no longer sets `-[NSItemProvider suggestedName]` when dragging calendar events.
This causes a drop from Spotlight into Mail compose to fall back to inserting plain text instead of
a file, since:
1. The dropped item has a plain text representation.
2. The dropped item does not have a preferred attachment representation type specified.
3. The dropped item does not have a suggested file name specified.
The fact that Spotlight has stopped vending this suggested name in iOS 17 is being tracked in
rdar://126050147; in the meantime, we can also improve this experience in WebKit by treating dropped
calendar invites as one of the types that defaults to being inserted as an attachment, rather than
text (similar to PDF and VCard files).
* Source/WebCore/platform/ios/PasteboardIOS.mm:
(WebCore::shouldTreatAsAttachmentByDefault):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::calendarInviteForTesting):
(TestWebKitAPI::TEST(WKAttachmentTestsIOS, InsertDroppedCalendarInviteAsAttachment)):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/event.ics: Added.
Add an API test to verify the fix.
Canonical link: https://commits.webkit.org/277187@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