Title: [239369] trunk
- Revision
- 239369
- Author
- [email protected]
- Date
- 2018-12-18 22:10:28 -0800 (Tue, 18 Dec 2018)
Log Message
[iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
https://bugs.webkit.org/show_bug.cgi?id=192842
<rdar://problem/46823586>
Reviewed by Tim Horton.
Source/WebCore:
Temporarily revert a behavior change introduced by r238661, where we now add "com.apple.webarchive" as a
registered UTI when dragging or copying a text selection. This broke the Messages app on iOS, which currently
inserts a copied or dragged text selection from WebKit-based views as a web archive file attachment. A fix for
this is internally tracked in <rdar://problem/46830277>.
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::PlatformPasteboard::write):
Tools:
Adjusts an existing API test to verify that "com.apple.webarchive" is not one of the types registered to the
item provider when dragging a rich text selection.
* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (239368 => 239369)
--- trunk/Source/WebCore/ChangeLog 2018-12-19 05:31:11 UTC (rev 239368)
+++ trunk/Source/WebCore/ChangeLog 2018-12-19 06:10:28 UTC (rev 239369)
@@ -1,3 +1,19 @@
+2018-12-18 Wenson Hsieh <[email protected]>
+
+ [iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
+ https://bugs.webkit.org/show_bug.cgi?id=192842
+ <rdar://problem/46823586>
+
+ Reviewed by Tim Horton.
+
+ Temporarily revert a behavior change introduced by r238661, where we now add "com.apple.webarchive" as a
+ registered UTI when dragging or copying a text selection. This broke the Messages app on iOS, which currently
+ inserts a copied or dragged text selection from WebKit-based views as a web archive file attachment. A fix for
+ this is internally tracked in <rdar://problem/46830277>.
+
+ * platform/ios/PlatformPasteboardIOS.mm:
+ (WebCore::PlatformPasteboard::write):
+
2018-12-18 Michael Catanzaro <[email protected]>
Unreviewed, add a missing UNUSED_PARAM()
Modified: trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm (239368 => 239369)
--- trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm 2018-12-19 05:31:11 UTC (rev 239368)
+++ trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm 2018-12-19 06:10:28 UTC (rev 239369)
@@ -369,10 +369,13 @@
if (content.dataInWebArchiveFormat) {
auto webArchiveData = content.dataInWebArchiveFormat->createNSData();
-#if !PLATFORM(IOSMAC)
- [representationsToRegister addData:webArchiveData.get() forType:WebArchivePboardType];
+#if PLATFORM(IOSMAC)
+ NSString *webArchiveType = (__bridge NSString *)kUTTypeWebArchive;
+#else
+ // FIXME: We should additionally register "com.apple.webarchive" once <rdar://problem/46830277> is fixed.
+ NSString *webArchiveType = WebArchivePboardType;
#endif
- [representationsToRegister addData:webArchiveData.get() forType:(__bridge NSString *)kUTTypeWebArchive];
+ [representationsToRegister addData:webArchiveData.get() forType:webArchiveType];
}
if (content.dataInAttributedStringFormat) {
Modified: trunk/Tools/ChangeLog (239368 => 239369)
--- trunk/Tools/ChangeLog 2018-12-19 05:31:11 UTC (rev 239368)
+++ trunk/Tools/ChangeLog 2018-12-19 06:10:28 UTC (rev 239369)
@@ -1,3 +1,16 @@
+2018-12-18 Wenson Hsieh <[email protected]>
+
+ [iOS] A copied text selection is pasted as a web archive attachment in the entry view in Messages
+ https://bugs.webkit.org/show_bug.cgi?id=192842
+ <rdar://problem/46823586>
+
+ Reviewed by Tim Horton.
+
+ Adjusts an existing API test to verify that "com.apple.webarchive" is not one of the types registered to the
+ item provider when dragging a rich text selection.
+
+ * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
+
2018-12-18 David Quesada <[email protected]>
REGRESSION: [iOS] API test TestWebKitAPI._WKDownload.OriginatingWebView is a flaky failure
Modified: trunk/Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm (239368 => 239369)
--- trunk/Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm 2018-12-19 05:31:11 UTC (rev 239368)
+++ trunk/Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm 2018-12-19 06:10:28 UTC (rev 239369)
@@ -372,6 +372,9 @@
checkSelectionRectsWithLogging(@[ makeCGRectValue(1, 201, 961, 227) ], [simulator finalSelectionRects]);
checkRichTextTypePrecedesPlainTextType(simulator.get());
EXPECT_TRUE([simulator lastKnownDropProposal].precise);
+
+ // FIXME: Once <rdar://problem/46830277> is fixed, we should add "com.apple.webarchive" as a registered pasteboard type and rebaseline this expectation.
+ EXPECT_FALSE([[[simulator sourceItemProviders].firstObject registeredTypeIdentifiers] containsObject:(__bridge NSString *)kUTTypeWebArchive]);
}
TEST(DragAndDropTests, ContentEditableToTextarea)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes