Title: [112473] trunk/Source/WebCore
- Revision
- 112473
- Author
- [email protected]
- Date
- 2012-03-28 16:43:19 -0700 (Wed, 28 Mar 2012)
Log Message
REGRESSION: editing/pasteboard/dataTransfer-setData-getData.html fails on Mac platforms.
https://bugs.webkit.org/show_bug.cgi?id=82497
<rdar://problem/11140334>
Reviewed by Brady Eidson.
The revision causing this regression fixed the way data is written to the pasteboard for NSURLPboardType.
This change fixes the way data is read from the pasteboard for the same pasteboard type.
No new tests. Fixes the existing one that fails.
* platform/mac/ClipboardMac.mm:
(WebCore::absoluteURLsFromPasteboard):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::PlatformPasteboard::stringForType):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (112472 => 112473)
--- trunk/Source/WebCore/ChangeLog 2012-03-28 23:41:42 UTC (rev 112472)
+++ trunk/Source/WebCore/ChangeLog 2012-03-28 23:43:19 UTC (rev 112473)
@@ -1,3 +1,21 @@
+2012-03-28 Enrica Casucci <[email protected]>
+
+ REGRESSION: editing/pasteboard/dataTransfer-setData-getData.html fails on Mac platforms.
+ https://bugs.webkit.org/show_bug.cgi?id=82497
+ <rdar://problem/11140334>
+
+ Reviewed by Brady Eidson.
+
+ The revision causing this regression fixed the way data is written to the pasteboard for NSURLPboardType.
+ This change fixes the way data is read from the pasteboard for the same pasteboard type.
+
+ No new tests. Fixes the existing one that fails.
+
+ * platform/mac/ClipboardMac.mm:
+ (WebCore::absoluteURLsFromPasteboard):
+ * platform/mac/PlatformPasteboardMac.mm:
+ (WebCore::PlatformPasteboard::stringForType):
+
2012-03-28 Joe Thomas <[email protected]>
SL bot is hitting SHOULD NEVER BE REACHED in WebCore::valueForLength() on many tests
Modified: trunk/Source/WebCore/platform/mac/ClipboardMac.mm (112472 => 112473)
--- trunk/Source/WebCore/platform/mac/ClipboardMac.mm 2012-03-28 23:41:42 UTC (rev 112472)
+++ trunk/Source/WebCore/platform/mac/ClipboardMac.mm 2012-03-28 23:43:19 UTC (rev 112473)
@@ -202,9 +202,8 @@
// Fallback to NSURLPboardType (which is a single URL)
if (availableTypes.contains(String(NSURLPboardType))) {
- platformStrategies()->pasteboardStrategy()->getPathnamesForType(absoluteURLs, String(NSURLPboardType), pasteboardName);
- if (!absoluteURLs.isEmpty())
- return absoluteURLs;
+ absoluteURLs.append(platformStrategies()->pasteboardStrategy()->stringForType(String(NSURLPboardType), pasteboardName));
+ return absoluteURLs;
}
// No file paths on the pasteboard, return nil
Modified: trunk/Source/WebCore/platform/mac/PlatformPasteboardMac.mm (112472 => 112473)
--- trunk/Source/WebCore/platform/mac/PlatformPasteboardMac.mm 2012-03-28 23:41:42 UTC (rev 112472)
+++ trunk/Source/WebCore/platform/mac/PlatformPasteboardMac.mm 2012-03-28 23:43:19 UTC (rev 112473)
@@ -65,6 +65,9 @@
String PlatformPasteboard::stringForType(const String& pasteboardType)
{
+ if (pasteboardType == String(NSURLPboardType))
+ return [[NSURL URLFromPasteboard:m_pasteboard.get()] absoluteString];
+
return [m_pasteboard.get() stringForType:pasteboardType];
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes