Remove an API test workaround that is no longer needed
https://bugs.webkit.org/show_bug.cgi?id=203037
Reviewed by Tim Horton.
This worked around <rdar://problem/51510554> by avoiding codepaths that resulted in failure to read dropped
content from NSItemProviders on iOS. <rdar://problem/51510554> is fixed in iOS 13, so we can remove this hack.
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView initWithFrame:configuration:addToWindow:]):
(applyWorkaroundToAllowWritingAttributedStringsToItemProviders): Deleted.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@251192 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Tools/ChangeLog b/Tools/ChangeLog
index 9e8c35b..c8ba794 100644
--- a/Tools/ChangeLog
+++ b/Tools/ChangeLog
@@ -1,3 +1,17 @@
+2019-10-16 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Remove an API test workaround that is no longer needed
+ https://bugs.webkit.org/show_bug.cgi?id=203037
+
+ Reviewed by Tim Horton.
+
+ This worked around <rdar://problem/51510554> by avoiding codepaths that resulted in failure to read dropped
+ content from NSItemProviders on iOS. <rdar://problem/51510554> is fixed in iOS 13, so we can remove this hack.
+
+ * TestWebKitAPI/cocoa/TestWKWebView.mm:
+ (-[TestWKWebView initWithFrame:configuration:addToWindow:]):
+ (applyWorkaroundToAllowWritingAttributedStringsToItemProviders): Deleted.
+
2019-10-16 Pablo Saavedra <psaavedra@igalia.com>
[Tools] Add a driver for cog for benchmark_runner.py
diff --git a/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm b/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm
index fa3e9c0..3b83c92 100644
--- a/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm
+++ b/Tools/TestWebKitAPI/cocoa/TestWKWebView.mm
@@ -290,25 +290,6 @@
#if PLATFORM(IOS_FAMILY)
-static NSArray<NSString *> *writableTypeIdentifiersForItemProviderWithoutPublicRTFD()
-{
- return @[
- @"com.apple.uikit.attributedstring",
- (__bridge NSString *)kUTTypeFlatRTFD,
- (__bridge NSString *)kUTTypeUTF8PlainText,
- ];
-}
-
-static void applyWorkaroundToAllowWritingAttributedStringsToItemProviders()
-{
- // FIXME: Remove this once <rdar://problem/51510554> is fixed.
- static std::unique_ptr<ClassMethodSwizzler> swizzler;
- static dispatch_once_t onceToken;
- dispatch_once(&onceToken, ^{
- swizzler = makeUnique<ClassMethodSwizzler>(NSAttributedString.class, @selector(writableTypeIdentifiersForItemProvider), reinterpret_cast<IMP>(writableTypeIdentifiersForItemProviderWithoutPublicRTFD));
- });
-}
-
using InputSessionChangeCount = NSUInteger;
static InputSessionChangeCount nextInputSessionChangeCount()
{
@@ -360,7 +341,6 @@
// FIXME: Remove this workaround once <https://webkit.org/b/175204> is fixed.
_sharedCalloutBarSwizzler = makeUnique<ClassMethodSwizzler>([UICalloutBar class], @selector(sharedCalloutBar), reinterpret_cast<IMP>(suppressUICalloutBar));
_inputSessionChangeCount = 0;
- applyWorkaroundToAllowWritingAttributedStringsToItemProviders();
#endif
return self;