WebKit Bugzilla
Attachment 371450 Details for
Bug 198588
: [macOS] Stop calling -[NSDraggingItem setItem:]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-198588-20190605165441.patch (text/plain), 22.06 KB, created by
Andy Estes
on 2019-06-05 16:54:42 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Andy Estes
Created:
2019-06-05 16:54:42 PDT
Size:
22.06 KB
patch
obsolete
>Subversion Revision: 246122 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index b5f4d6da42a903391e502048e4d35237769f3cf1..82a49c2eb7d8c396460e97396ccddde3ee333cbf 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,31 @@ >+2019-06-05 Andy Estes <aestes@apple.com> >+ >+ [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 NOBODY (OOPS!). >+ >+ * 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 Wenson Hsieh <wenson_hsieh@apple.com> > > Upstream content mode support into open source from WebKitAdditions >diff --git a/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj b/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj >index e2b4821ab94338d7f66443a5f42b5a984ea1fdd2..463b60991bada337569d82980b3cfdf4528792d3 100644 >--- a/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj >+++ b/Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj >@@ -293,11 +293,10 @@ > 2CE88FA117124CEE00734FC0 /* JavaScriptThreading.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JavaScriptThreading.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 */ = { >diff --git a/Tools/DumpRenderTree/mac/AppKitTestSPI.h b/Tools/DumpRenderTree/mac/AppKitTestSPI.h >deleted file mode 100644 >index 4b76ca7e541c47ebc30211ff9a1b1b40d52655c4..0000000000000000000000000000000000000000 >--- a/Tools/DumpRenderTree/mac/AppKitTestSPI.h >+++ /dev/null >@@ -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) >- >diff --git a/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm b/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm >index 6bf764eaef8a5988beea4bddf4804747831faeb8..22c528e52ae19f7af74b91fee7e6eb54d56d30e1 100644 >--- a/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm >+++ b/Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm >@@ -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 @@ - (void)enumerateDraggingItemsWithOptions:(NSEnumerationOptions)enumOptions forV > [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) >diff --git a/Tools/TestRunnerShared/spi/AppKitTestSPI.h b/Tools/TestRunnerShared/spi/AppKitTestSPI.h >new file mode 100644 >index 0000000000000000000000000000000000000000..949e00eb42951f3f9e9de5b17934f819be49f08d >--- /dev/null >+++ b/Tools/TestRunnerShared/spi/AppKitTestSPI.h >@@ -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) >+ >diff --git a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >index 4fac4e6f87787ad9a8b1666e01a2de26c4b57096..a5eefb4592a0e554453513359713971eb0211fe9 100644 >--- a/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >+++ b/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj >@@ -2029,6 +2029,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>"; }; >@@ -2490,6 +2491,7 @@ > BC575944126E733C006F0F12 /* InjectedBundle */, > 2E9660DC16C07D7B00371B42 /* ios */, > BCA61C3A11700B9400460D1E /* mac */, >+ A17A5A3122A887610065C5F0 /* TestRunnerShared */, > BC131A9E1171317C00B69727 /* config.h */, > 7C6BBD8B19CEA63000C1F5E0 /* Counters.cpp */, > 7C6BBD8A19CEA54300C1F5E0 /* Counters.h */, >@@ -3161,6 +3163,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 = ( >diff --git a/Tools/TestWebKitAPI/mac/TestDraggingInfo.mm b/Tools/TestWebKitAPI/mac/TestDraggingInfo.mm >index 0665280d8b91aa9089f23d68bc0e63abdcf75fd7..95d1089292f1abcb606918ee54217103506b0d84 100644 >--- a/Tools/TestWebKitAPI/mac/TestDraggingInfo.mm >+++ b/Tools/TestWebKitAPI/mac/TestDraggingInfo.mm >@@ -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)setDraggingSource:(id)draggingSource > > - (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 @@ - (void)enumerateDraggingItemsWithOptions:(NSDraggingItemEnumerationOptions)enum > [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)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 198588
: 371450