Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[iOS] Write web archive data using the
com.apple.webarchive
UTI whe…
…n copying/dragging https://bugs.webkit.org/show_bug.cgi?id=267131 rdar://120545471 Reviewed by Aditya Keerthi. Publish `com.apple.webarchive` alongside the legacy `Apple Web Archive pasteboard type` when writing web archive data to the pasteboard when copying or dragging, so that the system can automatically coerce from web archive data (which may include attachments) to `NSAttributedString`, RTF, or flat RTFD if needed. Note that landing this change no longer requires rdar://46830277 to be fixed after the (more recent) UIKit changes in rdar://116051491, because writing `com.apple.webarchive` data now additionally registers "derived" types for `public.rtf` and `com.apple.flat-rtfd`. This ensures that Messages won't prefer pasting text copied in Safari as a `.webarchive` file over plain text in the entry view. * Source/WebCore/platform/ios/PlatformPasteboardIOS.mm: (WebCore::PlatformPasteboard::write): * Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: Additionally rebaseline an API test, to reflect the fact that we should now register `com.apple.webarchive` when dragging. Canonical link: https://commits.webkit.org/272697@main
- Loading branch information