Title: [222176] trunk
- Revision
- 222176
- Author
- [email protected]
- Date
- 2017-09-18 13:38:15 -0700 (Mon, 18 Sep 2017)
Log Message
getData('text/plain') doesn't work on iOS 10
https://bugs.webkit.org/show_bug.cgi?id=177034
Reviewed by Wenson Hsieh.
Source/WebCore:
The bug was caused by the mispatch of UTI between reading & writing plain text.
Use kUTTypeText (instead of kUTTypePlainText) to read from UIPasteboard on iOS 10.
Re-enabled tests were passing on iOS 11 and continues to pass after this code change.
Tests: editing/pasteboard/clipboard-event.html
editing/pasteboard/datatransfer-items-paste-plaintext.html
editing/pasteboard/get-data-text-plain-paste.html
* platform/ios/PasteboardIOS.mm:
(WebCore::cocoaTypeFromHTMLClipboardType):
LayoutTests:
Removed the failing test expectations from tests that now pass on iOS.
* platform/ios/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (222175 => 222176)
--- trunk/LayoutTests/ChangeLog 2017-09-18 20:06:34 UTC (rev 222175)
+++ trunk/LayoutTests/ChangeLog 2017-09-18 20:38:15 UTC (rev 222176)
@@ -1,3 +1,14 @@
+2017-09-18 Ryosuke Niwa <[email protected]>
+
+ getData('text/plain') doesn't work on iOS 10
+ https://bugs.webkit.org/show_bug.cgi?id=177034
+
+ Reviewed by Wenson Hsieh.
+
+ Removed the failing test expectations from tests that now pass on iOS.
+
+ * platform/ios/TestExpectations:
+
2017-09-18 Emilio Cobos Álvarez <[email protected]>
Always update display: contents styles in RenderTreeUpdater.
Modified: trunk/LayoutTests/platform/ios/TestExpectations (222175 => 222176)
--- trunk/LayoutTests/platform/ios/TestExpectations 2017-09-18 20:06:34 UTC (rev 222175)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2017-09-18 20:38:15 UTC (rev 222176)
@@ -2227,7 +2227,6 @@
editing/pasteboard/5780697-2.html [ Failure ]
editing/pasteboard/can-read-in-copy-and-cut-events.html [ Failure ]
editing/pasteboard/clipboard-customData.html [ Failure ]
-editing/pasteboard/clipboard-event.html [ Failure ]
editing/pasteboard/copy-backslash-with-euc.html [ Failure ]
editing/pasteboard/copy-in-password-field.html [ Failure ]
editing/pasteboard/copy-inside-h1-preserves-h1.html [ Failure ]
@@ -2238,13 +2237,11 @@
editing/pasteboard/dataTransfer-setData-getData.html [ Failure ]
editing/pasteboard/datatransfer-getdata-plaintext.html [ Failure ]
editing/pasteboard/datatransfer-items-copy-plaintext.html [ Failure ]
-editing/pasteboard/datatransfer-items-paste-plaintext.html [ Failure ]
editing/pasteboard/display-block-on-spans.html [ Failure ]
editing/pasteboard/emacs-ctrl-k-with-move.html [ Failure ]
editing/pasteboard/emacs-ctrl-k-y-001.html [ Failure ]
editing/pasteboard/emacs-killring-alternating-append-prepend.html [ Failure ]
editing/pasteboard/emacs-killring-backward-delete-prepend.html [ Failure ]
-editing/pasteboard/get-data-text-plain-paste.html [ Failure ]
editing/pasteboard/input-with-display-none-div.html [ Failure ]
editing/pasteboard/input-with-visibility-hidden.html [ Failure ]
editing/pasteboard/insert-div-text-into-text.html [ Failure ]
Modified: trunk/Source/WebCore/ChangeLog (222175 => 222176)
--- trunk/Source/WebCore/ChangeLog 2017-09-18 20:06:34 UTC (rev 222175)
+++ trunk/Source/WebCore/ChangeLog 2017-09-18 20:38:15 UTC (rev 222176)
@@ -1,3 +1,22 @@
+2017-09-18 Ryosuke Niwa <[email protected]>
+
+ getData('text/plain') doesn't work on iOS 10
+ https://bugs.webkit.org/show_bug.cgi?id=177034
+
+ Reviewed by Wenson Hsieh.
+
+ The bug was caused by the mispatch of UTI between reading & writing plain text.
+ Use kUTTypeText (instead of kUTTypePlainText) to read from UIPasteboard on iOS 10.
+
+ Re-enabled tests were passing on iOS 11 and continues to pass after this code change.
+
+ Tests: editing/pasteboard/clipboard-event.html
+ editing/pasteboard/datatransfer-items-paste-plaintext.html
+ editing/pasteboard/get-data-text-plain-paste.html
+
+ * platform/ios/PasteboardIOS.mm:
+ (WebCore::cocoaTypeFromHTMLClipboardType):
+
2017-09-18 Youenn Fablet <[email protected]>
Allow WTF::map to use any class that is iterable and has a size getter
Modified: trunk/Source/WebCore/platform/ios/PasteboardIOS.mm (222175 => 222176)
--- trunk/Source/WebCore/platform/ios/PasteboardIOS.mm 2017-09-18 20:06:34 UTC (rev 222175)
+++ trunk/Source/WebCore/platform/ios/PasteboardIOS.mm 2017-09-18 20:38:15 UTC (rev 222176)
@@ -331,7 +331,11 @@
{
// Ignore any trailing charset - JS strings are Unicode, which encapsulates the charset issue.
if (type == "text/plain")
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
return (NSString *)kUTTypePlainText;
+#else
+ return (NSString *)kUTTypeText;
+#endif
// Special case because UTI doesn't work with Cocoa's URL type.
if (type == "text/uri-list")
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes