Bug 176038 - Add initial support for dataTransferItem.webkitGetAsEntry()
Summary: Add initial support for dataTransferItem.webkitGetAsEntry()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks: 175976
  Show dependency treegraph
 
Reported: 2017-08-28 16:11 PDT by Chris Dumez
Modified: 2017-08-29 10:00 PDT (History)
5 users (show)

See Also:


Attachments
WIP Patch (64.81 KB, patch)
2017-08-28 16:15 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
WIP Patch (66.89 KB, patch)
2017-08-28 20:22 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (77.10 KB, patch)
2017-08-28 21:06 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (76.92 KB, patch)
2017-08-29 09:16 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2017-08-28 16:11:43 PDT
Add initial support for dataTransferItem.webkitGetAsEntry():
- https://wicg.github.io/entries-api/#html-data
Comment 1 Radar WebKit Bug Importer 2017-08-28 16:12:27 PDT
<rdar://problem/34121095>
Comment 2 Chris Dumez 2017-08-28 16:15:59 PDT
Created attachment 319217 [details]
WIP Patch
Comment 3 Chris Dumez 2017-08-28 20:22:43 PDT
Created attachment 319236 [details]
WIP Patch
Comment 4 Chris Dumez 2017-08-28 21:06:14 PDT
Created attachment 319239 [details]
Patch
Comment 5 Wenson Hsieh 2017-08-29 09:09:41 PDT
Comment on attachment 319239 [details]
Patch

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

> Source/WebCore/ChangeLog:100
> +        Construct a DataTransferItem is the file is a directory now that we

s/is the file/if the file/

> Source/WebCore/dom/DataTransferItem.cpp:111
> +    if (!m_list || !m_list->dataTransfer().canReadData() || !m_file)

Could we just use ::getAsFile() here and bail if it's null? (this would avoid duplicated checks for !m_list or !m_list->dataTransfer().canReadData())

> Source/WebCore/dom/DataTransferItemList.cpp:31
> +#include "FileSystem.h"

Do we need this import? Looks like we've only added a call to File::isDirectory here.
Comment 6 Chris Dumez 2017-08-29 09:16:44 PDT
Created attachment 319254 [details]
Patch
Comment 7 WebKit Commit Bot 2017-08-29 10:00:18 PDT
Comment on attachment 319254 [details]
Patch

Clearing flags on attachment: 319254

Committed r221302: <http://trac.webkit.org/changeset/221302>
Comment 8 WebKit Commit Bot 2017-08-29 10:00:19 PDT
All reviewed patches have been landed.  Closing bug.