Title: [212739] trunk/Source/WebCore
Revision
212739
Author
[email protected]
Date
2017-02-21 12:15:11 -0800 (Tue, 21 Feb 2017)

Log Message

Fix two failing WebKit legacy tests
https://bugs.webkit.org/show_bug.cgi?id=168667

Reviewed by Tim Horton.

Handle the NSPasteboardTypeString type.

* platform/mac/PasteboardMac.mm:
(WebCore::Pasteboard::read):
(WebCore::addHTMLClipboardTypesForCocoaType):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (212738 => 212739)


--- trunk/Source/WebCore/ChangeLog	2017-02-21 20:12:24 UTC (rev 212738)
+++ trunk/Source/WebCore/ChangeLog	2017-02-21 20:15:11 UTC (rev 212739)
@@ -1,3 +1,16 @@
+2017-02-21  Anders Carlsson  <[email protected]>
+
+        Fix two failing WebKit legacy tests
+        https://bugs.webkit.org/show_bug.cgi?id=168667
+
+        Reviewed by Tim Horton.
+
+        Handle the NSPasteboardTypeString type.
+
+        * platform/mac/PasteboardMac.mm:
+        (WebCore::Pasteboard::read):
+        (WebCore::addHTMLClipboardTypesForCocoaType):
+
 2017-02-21  Simon Fraser  <[email protected]>
 
         Add Web Audio and Web MIDI to features.json.

Modified: trunk/Source/WebCore/platform/mac/PasteboardMac.mm (212738 => 212739)


--- trunk/Source/WebCore/platform/mac/PasteboardMac.mm	2017-02-21 20:12:24 UTC (rev 212738)
+++ trunk/Source/WebCore/platform/mac/PasteboardMac.mm	2017-02-21 20:15:11 UTC (rev 212739)
@@ -306,7 +306,13 @@
 
     Vector<String> types;
     strategy.getTypes(types, m_pasteboardName);
-    
+
+    if (types.contains(String(NSPasteboardTypeString))) {
+        text.text = strategy.stringForType(NSPasteboardTypeString, m_pasteboardName);
+        text.isURL = false;
+        return;
+    }
+
     if (types.contains(String(NSStringPboardType))) {
         text.text = strategy.stringForType(NSStringPboardType, m_pasteboardName);
         text.isURL = false;
@@ -566,7 +572,7 @@
 static void addHTMLClipboardTypesForCocoaType(ListHashSet<String>& resultTypes, const String& cocoaType, const String& pasteboardName)
 {
     // UTI may not do these right, so make sure we get the right, predictable result
-    if (cocoaType == String(NSStringPboardType)) {
+    if (cocoaType == String(NSStringPboardType) || cocoaType == String(NSPasteboardTypeString)) {
         resultTypes.add(ASCIILiteral("text/plain"));
         return;
     }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to