Title: [222746] trunk/Source/WebCore
- Revision
- 222746
- Author
- [email protected]
- Date
- 2017-10-02 14:44:05 -0700 (Mon, 02 Oct 2017)
Log Message
PasteImage tests are failing on debug builds
https://bugs.webkit.org/show_bug.cgi?id=177778
Reviewed by Wenson Hsieh.
After r222702, PlatformPasteboard is no longer responsible for adding "Files" as a type"
as DataTransfer takes care of it now. Removed the code to do this from PlatformPasteboardIOS.mm
and PlatformPasteboardMac.mm so that we don't fail assertions in debug builds.
* platform/ios/PlatformPasteboardIOS.mm:
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
* platform/mac/PlatformPasteboardMac.mm:
(WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
(WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (222745 => 222746)
--- trunk/Source/WebCore/ChangeLog 2017-10-02 21:42:19 UTC (rev 222745)
+++ trunk/Source/WebCore/ChangeLog 2017-10-02 21:44:05 UTC (rev 222746)
@@ -1,3 +1,20 @@
+2017-10-02 Ryosuke Niwa <[email protected]>
+
+ PasteImage tests are failing on debug builds
+ https://bugs.webkit.org/show_bug.cgi?id=177778
+
+ Reviewed by Wenson Hsieh.
+
+ After r222702, PlatformPasteboard is no longer responsible for adding "Files" as a type"
+ as DataTransfer takes care of it now. Removed the code to do this from PlatformPasteboardIOS.mm
+ and PlatformPasteboardMac.mm so that we don't fail assertions in debug builds.
+
+ * platform/ios/PlatformPasteboardIOS.mm:
+ (WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
+ * platform/mac/PlatformPasteboardMac.mm:
+ (WebCore::safeTypeForDOMToReadAndWriteForPlatformType):
+ (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
+
2017-10-02 Daniel Bates <[email protected]>
No need to truncate text after calling InlineTextBox::text()
Modified: trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm (222745 => 222746)
--- trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm 2017-10-02 21:42:19 UTC (rev 222745)
+++ trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm 2017-10-02 21:44:05 UTC (rev 222746)
@@ -340,9 +340,6 @@
if (UTTypeConformsTo(cfType.get(), kUTTypeURL))
return ASCIILiteral("text/uri-list");
- if (Pasteboard::shouldTreatCocoaTypeAsFile(platformType))
- return ASCIILiteral("Files");
-
return nullptr;
}
Modified: trunk/Source/WebCore/platform/mac/PlatformPasteboardMac.mm (222745 => 222746)
--- trunk/Source/WebCore/platform/mac/PlatformPasteboardMac.mm 2017-10-02 21:42:19 UTC (rev 222745)
+++ trunk/Source/WebCore/platform/mac/PlatformPasteboardMac.mm 2017-10-02 21:44:05 UTC (rev 222746)
@@ -104,9 +104,6 @@
if (platformType == String(NSHTMLPboardType))
return ASCIILiteral("text/html");
- if (platformType == String(NSFilenamesPboardType) || platformType == String(NSFilesPromisePboardType) || Pasteboard::shouldTreatCocoaTypeAsFile(platformType))
- return ASCIILiteral("Files");
-
return nullptr;
}
@@ -126,12 +123,8 @@
if (Pasteboard::isSafeTypeForDOMToReadAndWrite(type))
domPasteboardTypes.add(type);
- else if (auto* domType = safeTypeForDOMToReadAndWriteForPlatformType(type)) {
- auto coercedType = String::fromUTF8(domType);
- if (coercedType == "Files" && !numberOfFiles())
- continue;
- domPasteboardTypes.add(WTFMove(coercedType));
- }
+ else if (auto* domType = safeTypeForDOMToReadAndWriteForPlatformType(type))
+ domPasteboardTypes.add(String::fromUTF8(domType));
}
Vector<String> result;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes