Bug 184237 - [Mac] Prioritize file promises over filenames during drag and drop
Summary: [Mac] Prioritize file promises over filenames during drag and drop
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andy Estes
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-02 09:50 PDT by Andy Estes
Modified: 2018-04-03 13:40 PDT (History)
8 users (show)

See Also:


Attachments
Patch (12.36 KB, patch)
2018-04-02 10:09 PDT, Andy Estes
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews102 for mac-sierra (2.24 MB, application/zip)
2018-04-02 11:09 PDT, EWS Watchlist
no flags Details
Archive of layout-test-results from ews114 for mac-sierra (2.93 MB, application/zip)
2018-04-02 11:47 PDT, EWS Watchlist
no flags Details
Patch (14.28 KB, patch)
2018-04-03 11:11 PDT, Andy Estes
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Estes 2018-04-02 09:50:22 PDT
[Mac] Prioritize file promises over filenames during drag and drop
Comment 1 Andy Estes 2018-04-02 09:51:05 PDT
rdar://problem/38278076
Comment 2 Andy Estes 2018-04-02 10:09:16 PDT
Created attachment 336992 [details]
Patch
Comment 3 Wenson Hsieh 2018-04-02 10:46:29 PDT
Comment on attachment 336992 [details]
Patch

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

> Source/WebCore/platform/mac/DragDataMac.mm:179
> +        return fileNames();

Nice!

Looks like FileInputType::receiveDroppedFiles uses this when dropping files on a file input. Would this suggest that dropping file promises (without corresponding filenames in the pasteboard) into <input type=file> was broken? Seems like it would be good to add a test case for this if so.
Comment 4 Andy Estes 2018-04-02 10:54:18 PDT
(In reply to Wenson Hsieh from comment #3)
> Comment on attachment 336992 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=336992&action=review
> 
> > Source/WebCore/platform/mac/DragDataMac.mm:179
> > +        return fileNames();
> 
> Nice!
> 
> Looks like FileInputType::receiveDroppedFiles uses this when dropping files
> on a file input. Would this suggest that dropping file promises (without
> corresponding filenames in the pasteboard) into <input type=file> was
> broken? Seems like it would be good to add a test case for this if so.

It wasn't broken. This function would return fileNames() by default if there was no filename type on the pasteboard. We have a test for this, too, which is sadly now failing on Mac EWS :(

I cleared my r? to investigate why.
Comment 5 Wenson Hsieh 2018-04-02 11:05:54 PDT
(In reply to Andy Estes from comment #4)
> (In reply to Wenson Hsieh from comment #3)
> > Comment on attachment 336992 [details]
> > Patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=336992&action=review
> > 
> > > Source/WebCore/platform/mac/DragDataMac.mm:179
> > > +        return fileNames();
> > 
> > Nice!
> > 
> > Looks like FileInputType::receiveDroppedFiles uses this when dropping files
> > on a file input. Would this suggest that dropping file promises (without
> > corresponding filenames in the pasteboard) into <input type=file> was
> > broken? Seems like it would be good to add a test case for this if so.
> 
> It wasn't broken. This function would return fileNames() by default if there
> was no filename type on the pasteboard. We have a test for this, too, which
> is sadly now failing on Mac EWS :(
> 
> I cleared my r? to investigate why.

I see. Thanks for the explanation!
Comment 6 EWS Watchlist 2018-04-02 11:09:47 PDT Comment hidden (obsolete)
Comment 7 EWS Watchlist 2018-04-02 11:09:48 PDT Comment hidden (obsolete)
Comment 8 EWS Watchlist 2018-04-02 11:47:09 PDT Comment hidden (obsolete)
Comment 9 EWS Watchlist 2018-04-02 11:47:10 PDT Comment hidden (obsolete)
Comment 10 Andy Estes 2018-04-03 11:11:26 PDT
Created attachment 337092 [details]
Patch
Comment 11 WebKit Commit Bot 2018-04-03 13:40:17 PDT
Comment on attachment 337092 [details]
Patch

Clearing flags on attachment: 337092

Committed r230221: <https://trac.webkit.org/changeset/230221>
Comment 12 WebKit Commit Bot 2018-04-03 13:40:19 PDT
All reviewed patches have been landed.  Closing bug.