Diff
Modified: trunk/Tools/ChangeLog (246140 => 246141)
--- trunk/Tools/ChangeLog 2019-06-06 03:20:00 UTC (rev 246140)
+++ trunk/Tools/ChangeLog 2019-06-06 03:24:19 UTC (rev 246141)
@@ -1,3 +1,31 @@
+2019-06-05 Andy Estes <[email protected]>
+
+ [macOS] Stop calling -[NSDraggingItem setItem:]
+ https://bugs.webkit.org/show_bug.cgi?id=198588
+ <rdar://problem/48297453>
+
+ On macOS Catalina, use -[NSDraggingItem _initWithItem:] instead.
+
+ Reviewed by Wenson Hsieh.
+
+ * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Fixed up file paths in the
+ TestRunnerShared group.
+
+ * DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
+ (-[DumpRenderTreeDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
+ Changed to call -[NSDraggingItem _initWithItem:] when available.
+
+ * TestRunnerShared/spi/AppKitTestSPI.h: Renamed from
+ Tools/DumpRenderTree/mac/AppKitTestSPI.h and moved NSDraggingItem internal interface
+ declarations here from DumpRenderTree.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ Added TestRunnerShared/spi/AppKitTestSPI.h.
+
+ * TestWebKitAPI/mac/TestDraggingInfo.mm:
+ (-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
+ Changed to call -[NSDraggingItem _initWithItem:] when available.
+
2019-06-05 Jer Noble <[email protected]>
-[WKWebView _suspendAllMediaPlayback] does not persist across navigation.
Modified: trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj (246140 => 246141)
--- trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj 2019-06-06 03:20:00 UTC (rev 246140)
+++ trunk/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj 2019-06-06 03:24:19 UTC (rev 246141)
@@ -293,11 +293,10 @@
2CE88FA117124CEE00734FC0 /* _javascript_Threading.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = _javascript_Threading.cpp; sourceTree = "<group>"; };
2D403EA215087142005358D2 /* LayoutTestHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = LayoutTestHelper.m; path = mac/LayoutTestHelper.m; sourceTree = "<group>"; };
2D403F19150871F9005358D2 /* LayoutTestHelper */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = LayoutTestHelper; sourceTree = BUILT_PRODUCTS_DIR; };
- 2EDE0DAA1F5131DE00D5F8DF /* AppKitTestSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AppKitTestSPI.h; path = mac/AppKitTestSPI.h; sourceTree = "<group>"; };
31117B3A15D9A56A00163BC8 /* MockWebNotificationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockWebNotificationProvider.h; path = mac/MockWebNotificationProvider.h; sourceTree = "<group>"; };
31117B3B15D9A56A00163BC8 /* MockWebNotificationProvider.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MockWebNotificationProvider.mm; path = mac/MockWebNotificationProvider.mm; sourceTree = "<group>"; };
- 3148A0551E6F90F400D3B316 /* IOSLayoutTestCommunication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IOSLayoutTestCommunication.cpp; path = ../TestRunnerShared/IOSLayoutTestCommunication.cpp; sourceTree = "<group>"; };
- 3148A0561E6F90F400D3B316 /* IOSLayoutTestCommunication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IOSLayoutTestCommunication.h; path = ../TestRunnerShared/IOSLayoutTestCommunication.h; sourceTree = "<group>"; };
+ 3148A0551E6F90F400D3B316 /* IOSLayoutTestCommunication.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IOSLayoutTestCommunication.cpp; sourceTree = "<group>"; };
+ 3148A0561E6F90F400D3B316 /* IOSLayoutTestCommunication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IOSLayoutTestCommunication.h; sourceTree = "<group>"; };
32A70AAB03705E1F00C91783 /* DumpRenderTreePrefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DumpRenderTreePrefix.h; sourceTree = "<group>"; };
375F09710DAC3CB600C8B4E5 /* WebKitWeightWatcher100.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher100.ttf; path = fonts/WebKitWeightWatcher100.ttf; sourceTree = "<group>"; };
375F09720DAC3CB600C8B4E5 /* WebKitWeightWatcher200.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher200.ttf; path = fonts/WebKitWeightWatcher200.ttf; sourceTree = "<group>"; };
@@ -341,6 +340,9 @@
A134E53718905F4C00901D06 /* AccessibilityCommonMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AccessibilityCommonMac.h; path = mac/AccessibilityCommonMac.h; sourceTree = "<group>"; };
A134E5391890671C00901D06 /* DumpRenderTreeLibrary.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = DumpRenderTreeLibrary.xcconfig; path = mac/Configurations/DumpRenderTreeLibrary.xcconfig; sourceTree = "<group>"; };
A16CD20D18907A7D0092363E /* BaseTarget.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = BaseTarget.xcconfig; path = mac/Configurations/BaseTarget.xcconfig; sourceTree = "<group>"; };
+ A17A5A2C22A881090065C5F0 /* PencilKitTestSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PencilKitTestSPI.h; sourceTree = "<group>"; };
+ A17A5A2D22A881090065C5F0 /* AppKitTestSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppKitTestSPI.h; sourceTree = "<group>"; };
+ A17A5A2E22A881090065C5F0 /* CoreGraphicsTestSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoreGraphicsTestSPI.h; sourceTree = "<group>"; };
A19317FC1892855F001C52B1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = ios/Info.plist; sourceTree = "<group>"; };
A19317FD18928738001C52B1 /* DumpRenderTreeApp.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = DumpRenderTreeApp.xcconfig; path = mac/Configurations/DumpRenderTreeApp.xcconfig; sourceTree = "<group>"; };
A1B89B93221E025B00EB4CEA /* SDKVariant.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = SDKVariant.xcconfig; path = mac/Configurations/SDKVariant.xcconfig; sourceTree = "<group>"; };
@@ -421,12 +423,12 @@
C23EA2071BC9EABA00C980B7 /* FontWithFeatures.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = FontWithFeatures.ttf; path = fonts/FontWithFeatures.ttf; sourceTree = "<group>"; };
E1B7808511AF1643007E1BC2 /* MockGeolocationProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockGeolocationProvider.h; path = mac/MockGeolocationProvider.h; sourceTree = "<group>"; };
E1B7808711AF1669007E1BC2 /* MockGeolocationProvider.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MockGeolocationProvider.mm; path = mac/MockGeolocationProvider.mm; sourceTree = "<group>"; };
- F44A531921B89A4400DBB99C /* InstanceMethodSwizzler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InstanceMethodSwizzler.h; path = ../TestRunnerShared/cocoa/InstanceMethodSwizzler.h; sourceTree = "<group>"; };
- F44A531A21B89A4400DBB99C /* ClassMethodSwizzler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ClassMethodSwizzler.mm; path = ../TestRunnerShared/cocoa/ClassMethodSwizzler.mm; sourceTree = "<group>"; };
- F44A531B21B89A4400DBB99C /* ClassMethodSwizzler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ClassMethodSwizzler.h; path = ../TestRunnerShared/cocoa/ClassMethodSwizzler.h; sourceTree = "<group>"; };
- F44A531C21B89A4500DBB99C /* InstanceMethodSwizzler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InstanceMethodSwizzler.mm; path = ../TestRunnerShared/cocoa/InstanceMethodSwizzler.mm; sourceTree = "<group>"; };
- F4C3578820E8442700FA0748 /* LayoutTestSpellChecker.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = LayoutTestSpellChecker.mm; path = ../TestRunnerShared/cocoa/LayoutTestSpellChecker.mm; sourceTree = "<group>"; };
- F4C3578920E8442700FA0748 /* LayoutTestSpellChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LayoutTestSpellChecker.h; path = ../TestRunnerShared/cocoa/LayoutTestSpellChecker.h; sourceTree = "<group>"; };
+ F44A531921B89A4400DBB99C /* InstanceMethodSwizzler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InstanceMethodSwizzler.h; sourceTree = "<group>"; };
+ F44A531A21B89A4400DBB99C /* ClassMethodSwizzler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ClassMethodSwizzler.mm; sourceTree = "<group>"; };
+ F44A531B21B89A4400DBB99C /* ClassMethodSwizzler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClassMethodSwizzler.h; sourceTree = "<group>"; };
+ F44A531C21B89A4500DBB99C /* InstanceMethodSwizzler.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InstanceMethodSwizzler.mm; sourceTree = "<group>"; };
+ F4C3578820E8442700FA0748 /* LayoutTestSpellChecker.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LayoutTestSpellChecker.mm; sourceTree = "<group>"; };
+ F4C3578920E8442700FA0748 /* LayoutTestSpellChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LayoutTestSpellChecker.h; sourceTree = "<group>"; };
F4D4235F1DD5045300678290 /* TextInputControllerIOS.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TextInputControllerIOS.m; path = ios/TextInputControllerIOS.m; sourceTree = "<group>"; };
F4D423601DD5046900678290 /* TextInputController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextInputController.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
@@ -560,7 +562,6 @@
0F6A0E001D6E0F8A00F1C9A8 /* mac */ = {
isa = PBXGroup;
children = (
- 2EDE0DAA1F5131DE00D5F8DF /* AppKitTestSPI.h */,
0F18E70E1D6BACB60027E547 /* UIScriptControllerMac.mm */,
);
name = mac;
@@ -701,11 +702,12 @@
isa = PBXGroup;
children = (
F4B6C31820E84382008AC225 /* cocoa */,
+ A17A5A2B22A880D80065C5F0 /* spi */,
3148A0551E6F90F400D3B316 /* IOSLayoutTestCommunication.cpp */,
3148A0561E6F90F400D3B316 /* IOSLayoutTestCommunication.h */,
);
name = TestRunnerShared;
- path = ../WebKitTestRunner;
+ path = ../TestRunnerShared;
sourceTree = "<group>";
};
417DA9181373674D007C57FB /* WebCoreTestSupport */ = {
@@ -759,6 +761,16 @@
name = ios;
sourceTree = "<group>";
};
+ A17A5A2B22A880D80065C5F0 /* spi */ = {
+ isa = PBXGroup;
+ children = (
+ A17A5A2D22A881090065C5F0 /* AppKitTestSPI.h */,
+ A17A5A2E22A881090065C5F0 /* CoreGraphicsTestSPI.h */,
+ A17A5A2C22A881090065C5F0 /* PencilKitTestSPI.h */,
+ );
+ path = spi;
+ sourceTree = "<group>";
+ };
A803FF6409CAACC1009B2A37 /* Frameworks */ = {
isa = PBXGroup;
children = (
@@ -840,7 +852,7 @@
F4C3578920E8442700FA0748 /* LayoutTestSpellChecker.h */,
F4C3578820E8442700FA0748 /* LayoutTestSpellChecker.mm */,
);
- name = cocoa;
+ path = cocoa;
sourceTree = "<group>";
};
F4D4235D1DD4F99900678290 /* mac */ = {
Deleted: trunk/Tools/DumpRenderTree/mac/AppKitTestSPI.h (246140 => 246141)
--- trunk/Tools/DumpRenderTree/mac/AppKitTestSPI.h 2019-06-06 03:20:00 UTC (rev 246140)
+++ trunk/Tools/DumpRenderTree/mac/AppKitTestSPI.h 2019-06-06 03:24:19 UTC (rev 246141)
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#if PLATFORM(MAC)
-
-#if USE(APPLE_INTERNAL_SDK)
-
-#import <AppKit/NSTextInputContext_Private.h>
-
-#else
-
-extern "C" {
-extern NSString *NSTextInputReplacementRangeAttributeName;
-}
-
-#endif
-
-#endif // PLATFORM(MAC)
-
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm (246140 => 246141)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm 2019-06-06 03:20:00 UTC (rev 246140)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm 2019-06-06 03:24:19 UTC (rev 246141)
@@ -31,6 +31,7 @@
#if !PLATFORM(IOS_FAMILY)
+#import "AppKitTestSPI.h"
#import "DumpRenderTree.h"
#import "DumpRenderTreeFileDraggingSource.h"
#import "DumpRenderTreePasteboard.h"
@@ -38,10 +39,6 @@
#import <WebKit/WebKit.h>
#import <wtf/RetainPtr.h>
-@interface NSDraggingItem ()
-- (void)setItem:(id)item;
-@end
-
@interface DumpRenderTreeFilePromiseReceiver : NSFilePromiseReceiver {
RetainPtr<NSArray<NSString *>> _promisedUTIs;
RetainPtr<NSMutableArray<NSURL *>> _destinationURLs;
@@ -277,8 +274,12 @@
[receiver setDraggingSource:draggingSource];
[allFilePromiseReceivers() addObject:receiver.get()];
+#if HAVE(NSDRAGGINGITEM_INITWITHITEM)
+ auto item = adoptNS([[NSDraggingItem alloc] _initWithItem:receiver.get()]);
+#else
auto item = adoptNS([[NSDraggingItem alloc] initWithPasteboardWriter:(id <NSPasteboardWriting>)receiver.get()]); // FIXME: <https://webkit.org/b/194060> Pass an object of the right type.
[item setItem:receiver.get()];
+#endif
block(item.get(), 0, &stop);
if (stop)
Copied: trunk/Tools/TestRunnerShared/spi/AppKitTestSPI.h (from rev 246140, trunk/Tools/DumpRenderTree/mac/AppKitTestSPI.h) (0 => 246141)
--- trunk/Tools/TestRunnerShared/spi/AppKitTestSPI.h (rev 0)
+++ trunk/Tools/TestRunnerShared/spi/AppKitTestSPI.h 2019-06-06 03:24:19 UTC (rev 246141)
@@ -0,0 +1,55 @@
+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if PLATFORM(MAC)
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import <AppKit/NSTextInputContext_Private.h>
+
+#else
+
+extern "C" {
+extern NSString *NSTextInputReplacementRangeAttributeName;
+}
+
+#endif
+
+#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
+#define HAVE_NSDRAGGINGITEM_INITWITHITEM 1
+#endif
+
+@interface NSDraggingItem ()
+#if HAVE(NSDRAGGINGITEM_INITWITHITEM)
+- (instancetype)_initWithItem:(id)item;
+#else
+- (void)setItem:(id)item;
+#endif
+@end
+
+#endif // PLATFORM(MAC)
+
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (246140 => 246141)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2019-06-06 03:20:00 UTC (rev 246140)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2019-06-06 03:24:19 UTC (rev 246141)
@@ -2030,6 +2030,7 @@
A17991861E1C994E00A505ED /* SharedBuffer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SharedBuffer.mm; sourceTree = "<group>"; };
A17991891E1CA24100A505ED /* SharedBufferTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SharedBufferTest.cpp; sourceTree = "<group>"; };
A179918A1E1CA24100A505ED /* SharedBufferTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SharedBufferTest.h; sourceTree = "<group>"; };
+ A17A5A3422A887EC0065C5F0 /* AppKitTestSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppKitTestSPI.h; sourceTree = "<group>"; };
A17EAC542083056E0084B41B /* find.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = find.pdf; path = Tests/WebKit/find.pdf; sourceTree = SOURCE_ROOT; };
A180C0F91EE67DF000468F47 /* RunOpenPanel.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RunOpenPanel.mm; sourceTree = "<group>"; };
A18AA8CC1C3FA218009B2B97 /* ContentFiltering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentFiltering.h; sourceTree = "<group>"; };
@@ -2492,6 +2493,7 @@
BC575944126E733C006F0F12 /* InjectedBundle */,
2E9660DC16C07D7B00371B42 /* ios */,
BCA61C3A11700B9400460D1E /* mac */,
+ A17A5A3122A887610065C5F0 /* TestRunnerShared */,
BC131A9E1171317C00B69727 /* config.h */,
7C6BBD8B19CEA63000C1F5E0 /* Counters.cpp */,
7C6BBD8A19CEA54300C1F5E0 /* Counters.h */,
@@ -3164,6 +3166,23 @@
name = Resources;
sourceTree = "<group>";
};
+ A17A5A3122A887610065C5F0 /* TestRunnerShared */ = {
+ isa = PBXGroup;
+ children = (
+ A17A5A3322A887CE0065C5F0 /* spi */,
+ );
+ name = TestRunnerShared;
+ path = ../TestRunnerShared;
+ sourceTree = "<group>";
+ };
+ A17A5A3322A887CE0065C5F0 /* spi */ = {
+ isa = PBXGroup;
+ children = (
+ A17A5A3422A887EC0065C5F0 /* AppKitTestSPI.h */,
+ );
+ path = spi;
+ sourceTree = "<group>";
+ };
A1C4FB6F1BACCEFA003742D0 /* Resources */ = {
isa = PBXGroup;
children = (
Modified: trunk/Tools/TestWebKitAPI/mac/TestDraggingInfo.mm (246140 => 246141)
--- trunk/Tools/TestWebKitAPI/mac/TestDraggingInfo.mm 2019-06-06 03:20:00 UTC (rev 246140)
+++ trunk/Tools/TestWebKitAPI/mac/TestDraggingInfo.mm 2019-06-06 03:24:19 UTC (rev 246141)
@@ -28,14 +28,11 @@
#if ENABLE(DRAG_SUPPORT) && PLATFORM(MAC)
+#import "AppKitTestSPI.h"
#import "DragAndDropSimulator.h"
#import "TestFilePromiseReceiver.h"
#import <wtf/WeakObjCPtr.h>
-@interface NSDraggingItem ()
-@property (nonatomic, strong) id item;
-@end
-
@implementation TestDraggingInfo {
WeakObjCPtr<id> _source;
WeakObjCPtr<DragAndDropSimulator> _dragAndDropSimulator;
@@ -85,7 +82,8 @@
- (void)enumerateDraggingItemsWithOptions:(NSDraggingItemEnumerationOptions)enumerationOptions forView:(NSView *)view classes:(NSArray<Class> *)classes searchOptions:(NSDictionary<NSString *, id> *)searchOptions usingBlock:(void (^)(NSDraggingItem *, NSInteger, BOOL *))block
{
- // FIXME: Much of this can be shared with existing drag and drop testing code in DumpRenderTree.
+ // FIXME: Much of this can be shared with existing drag and drop testing code in DumpRenderTree,
+ // perhaps by putting it in Tools/TestRunnerShared.
if (enumerationOptions) {
[NSException raise:@"DragAndDropSimulator" format:@"Dragging item enumeration options are currently unsupported. (got: %tu)", enumerationOptions];
@@ -115,8 +113,12 @@
[receiver setDraggingSource:_source.get().get()];
[_filePromiseReceivers addObject:receiver.get()];
+#if HAVE(NSDRAGGINGITEM_INITWITHITEM)
+ auto item = adoptNS([[NSDraggingItem alloc] _initWithItem:receiver.get()]);
+#else
auto item = adoptNS([[NSDraggingItem alloc] initWithPasteboardWriter:(id <NSPasteboardWriting>)receiver.get()]); // FIXME: <https://webkit.org/b/194060> Pass an object of the right type.
[item setItem:receiver.get()];
+#endif
block(item.get(), 0, &stop);
if (stop)