Bug 194059 - [NSDragItem init] is unavailable
Summary: [NSDragItem init] is unavailable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-30 16:10 PST by Keith Rollin
Modified: 2019-01-30 18:18 PST (History)
5 users (show)

See Also:


Attachments
Patch (3.09 KB, patch)
2019-01-30 16:17 PST, Keith Rollin
no flags Details | Formatted Diff | Diff
Patch (3.23 KB, patch)
2019-01-30 17:09 PST, Keith Rollin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2019-01-30 16:10:17 PST
[NSDragItem init] is marked as NS_UNAVAILABLE. This affects DumpRenderTree and TestWebKitAPI, which both try to create an NSDragItem in a manner that invokes this method. Address this by using -initWithPasteboardWriter instead.
Comment 1 Radar WebKit Bug Importer 2019-01-30 16:10:47 PST
<rdar://problem/47685715>
Comment 2 Keith Rollin 2019-01-30 16:17:06 PST
Created attachment 360639 [details]
Patch
Comment 3 Wenson Hsieh 2019-01-30 16:48:18 PST
Comment on attachment 360639 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=360639&action=review

> Tools/DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:280
> +        auto item = adoptNS([[NSDraggingItem alloc] initWithPasteboardWriter:(id<NSPasteboardWriting>)receiver.get()]);

Nit - we generally prefer spaces between id and < for ObjC protocols like this.

> Tools/TestWebKitAPI/mac/TestDraggingInfo.mm:118
> +        auto item = adoptNS([[NSDraggingItem alloc] initWithPasteboardWriter:(id<NSPasteboardWriting>)receiver.get()]);

It might be worth adding a FIXME here referencing https://bugs.webkit.org/show_bug.cgi?id=194060, too.
Comment 4 Keith Rollin 2019-01-30 17:09:02 PST
Created attachment 360653 [details]
Patch
Comment 5 WebKit Commit Bot 2019-01-30 18:18:23 PST
Comment on attachment 360653 [details]
Patch

Clearing flags on attachment: 360653

Committed r240749: <https://trac.webkit.org/changeset/240749>
Comment 6 WebKit Commit Bot 2019-01-30 18:18:25 PST
All reviewed patches have been landed.  Closing bug.