Bug 167942 - Add kUTTypeUTF8PlainText and kUTTypeJPEG to the list of compatible content types in DragData
Summary: Add kUTTypeUTF8PlainText and kUTTypeJPEG to the list of compatible content ty...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-02-07 09:34 PST by Wenson Hsieh
Modified: 2017-02-08 20:27 PST (History)
4 users (show)

See Also:


Attachments
Patch (1.62 KB, patch)
2017-02-07 09:38 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (3.32 KB, patch)
2017-02-07 23:00 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (20.46 KB, patch)
2017-02-08 13:18 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Build fix (20.37 KB, patch)
2017-02-08 13:23 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Move ivars to interface declaration. (20.48 KB, patch)
2017-02-08 14:08 PST, Wenson Hsieh
thorton: review+
Details | Formatted Diff | Diff
Patch for landing (20.30 KB, patch)
2017-02-08 14:54 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2017-02-07 09:34:01 PST
<rdar://problem/30315079>
Comment 1 Wenson Hsieh 2017-02-07 09:38:42 PST
Created attachment 300815 [details]
Patch
Comment 2 Sam Weinig 2017-02-07 09:59:34 PST
Comment on attachment 300815 [details]
Patch

Is this really only needed under ENABLE(DATA_INTERACTION)?
Comment 3 Wenson Hsieh 2017-02-07 10:01:01 PST
(In reply to comment #2)
> Comment on attachment 300815 [details]
> Patch
> 
> Is this really only needed under ENABLE(DATA_INTERACTION)?

I believe so. In Pasteboard::read (in PasteboardMac.mm) we don't seem to support reading these types.
Comment 4 Sam Weinig 2017-02-07 14:08:00 PST
(In reply to comment #3)
> (In reply to comment #2)
> > Comment on attachment 300815 [details]
> > Patch
> > 
> > Is this really only needed under ENABLE(DATA_INTERACTION)?
> 
> I believe so. In Pasteboard::read (in PasteboardMac.mm) we don't seem to
> support reading these types.

Should we? Is there a good reason to support different types?
Comment 5 Wenson Hsieh 2017-02-07 23:00:28 PST
Created attachment 300881 [details]
Patch
Comment 6 Wenson Hsieh 2017-02-07 23:05:06 PST
I have progress on test cases in TestWebKitAPI that use an NSView that vends only a certain UTI type (in this case, UTF8 or JPEG) when dragging. The test attempts to drag from this NSView into a web view and observe the inserted contents, but sending mouse dragged events isn't resulting in any dragging taking place for some reason. Into AppKit to find out why...
Comment 7 Wenson Hsieh 2017-02-08 13:18:38 PST
Created attachment 300949 [details]
Patch
Comment 8 Wenson Hsieh 2017-02-08 13:23:33 PST
Created attachment 300951 [details]
Build fix
Comment 9 Wenson Hsieh 2017-02-08 14:08:57 PST
Created attachment 300958 [details]
Move ivars to interface declaration.
Comment 10 Tim Horton 2017-02-08 14:20:31 PST
Comment on attachment 300958 [details]
Move ivars to interface declaration.

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

> Tools/TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm:36
> +    dispatch_block_t _completionBlock;

No BlockPtr love?

> Tools/TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm:223
> +    [hostWindow setFrameOrigin:NSMakePoint(0, 0)];

Is this on-screen? We probably don't want that. Does it have to be?
Comment 11 Wenson Hsieh 2017-02-08 14:54:24 PST
Created attachment 300970 [details]
Patch for landing
Comment 12 Wenson Hsieh 2017-02-08 15:18:26 PST
(In reply to comment #10)
> Comment on attachment 300958 [details]
> Move ivars to interface declaration.
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=300958&action=review
> 
> > Tools/TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm:36
> > +    dispatch_block_t _completionBlock;
> 
> No BlockPtr love?

Changed to use BlockPtr :)

> 
> > Tools/TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm:223
> > +    [hostWindow setFrameOrigin:NSMakePoint(0, 0)];
> 
> Is this on-screen? We probably don't want that. Does it have to be?

Good point -- removed setVisible: and makeKeyAndOrderFront: -- it no longer appears on screen.

Thanks!
Comment 13 WebKit Commit Bot 2017-02-08 15:32:25 PST
Comment on attachment 300970 [details]
Patch for landing

Clearing flags on attachment: 300970

Committed r211906: <http://trac.webkit.org/changeset/211906>