Title: [215893] trunk/Source/WebCore
- Revision
- 215893
- Author
- [email protected]
- Date
- 2017-04-27 14:17:59 -0700 (Thu, 27 Apr 2017)
Log Message
Performing data interaction with plain text into a contenteditable does not insert any content
https://bugs.webkit.org/show_bug.cgi?id=171381
Reviewed by Tim Horton.
Attempt to read plain-text-conformant UTI types as kUTTypePlainText before reading them as kUTTypeText.
This allows WebItemProviderPasteboard to properly materialize an NSString in -valuesForPasteboardType:
inItemSet: using a pre-loaded NSData blob.
This scenario is covered by DataInteractionTests.ExternalSourceUTF8PlainTextOnly, but DataInteractionTests
are temporarily disabled due to incompatibilities with the current internal SDK.
* platform/ios/PasteboardIOS.mm:
(WebCore::readPasteboardWebContentDataForType):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (215892 => 215893)
--- trunk/Source/WebCore/ChangeLog 2017-04-27 21:00:50 UTC (rev 215892)
+++ trunk/Source/WebCore/ChangeLog 2017-04-27 21:17:59 UTC (rev 215893)
@@ -1,3 +1,20 @@
+2017-04-27 Wenson Hsieh <[email protected]>
+
+ Performing data interaction with plain text into a contenteditable does not insert any content
+ https://bugs.webkit.org/show_bug.cgi?id=171381
+
+ Reviewed by Tim Horton.
+
+ Attempt to read plain-text-conformant UTI types as kUTTypePlainText before reading them as kUTTypeText.
+ This allows WebItemProviderPasteboard to properly materialize an NSString in -valuesForPasteboardType:
+ inItemSet: using a pre-loaded NSData blob.
+
+ This scenario is covered by DataInteractionTests.ExternalSourceUTF8PlainTextOnly, but DataInteractionTests
+ are temporarily disabled due to incompatibilities with the current internal SDK.
+
+ * platform/ios/PasteboardIOS.mm:
+ (WebCore::readPasteboardWebContentDataForType):
+
2017-04-27 Chris Dumez <[email protected]>
Element.getBoundingClientRect() / getClientRects() should return a DOMRect types
Modified: trunk/Source/WebCore/platform/ios/PasteboardIOS.mm (215892 => 215893)
--- trunk/Source/WebCore/platform/ios/PasteboardIOS.mm 2017-04-27 21:00:50 UTC (rev 215892)
+++ trunk/Source/WebCore/platform/ios/PasteboardIOS.mm 2017-04-27 21:17:59 UTC (rev 215893)
@@ -201,6 +201,11 @@
return !url.isNull() && reader.readURL(url, title);
}
+ if (UTTypeConformsTo((CFStringRef)type, kUTTypePlainText)) {
+ String string = strategy.readStringFromPasteboard(itemIndex, kUTTypePlainText, pasteboardName);
+ return !string.isNull() && reader.readPlainText(string);
+ }
+
if (UTTypeConformsTo((CFStringRef)type, kUTTypeText)) {
String string = strategy.readStringFromPasteboard(itemIndex, kUTTypeText, pasteboardName);
return !string.isNull() && reader.readPlainText(string);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes