Bug 176038

Summary: Add initial support for dataTransferItem.webkitGetAsEntry()
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ggaren, rniwa, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 175976    
Attachments:
Description Flags
WIP Patch
none
WIP Patch
none
Patch
none
Patch none

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.