Bug 87969

Summary: [chromium] DataTransferItem.webkitGetAsEntry() should synchronously return entry
Product: WebKit Reporter: Kinuko Yasuda <kinuko>
Component: WebCore Misc.Assignee: Kinuko Yasuda <kinuko>
Status: RESOLVED FIXED    
Severity: Normal CC: abarth, dcheng, ericu, levin, ojan, tony, tzik, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 76809    
Attachments:
Description Flags
Patch tony: review+

Kinuko Yasuda
Reported 2012-05-31 06:45:10 PDT
[chromium] DataTransferItem.webkitGetAsEntry() should synchronously return entry. We were adding DataTransferItem.webkitGetAsEntry(callback) which asynchronously returns FileEntry/DirectoryEntry for drag-and-dropped files, but on the public whatwg ML we got the feedback that this method should synchronously return Entry. (Right now this is only implemented on chromium) http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Apr/0079.html http://lists.w3.org/Archives/Public/public-whatwg-archive/2012Apr/0111.html
Attachments
Patch (13.37 KB, patch)
2012-05-31 07:06 PDT, Kinuko Yasuda
tony: review+
Kinuko Yasuda
Comment 1 2012-05-31 07:06:34 PDT
Kinuko Yasuda
Comment 2 2012-05-31 23:56:39 PDT
Adding some more filesystem folks to solicit unofficial review.
Tony Chang
Comment 3 2012-06-01 10:48:23 PDT
Comment on attachment 145083 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=145083&action=review > Source/WebCore/Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp:80 > + // FIXME: This involves synchronous file operation. We need to pass file type data when we dispatch drag event. If the file on disk changes during the drag, should calls to webkitGetAsEntry() return current information? If so, you probably can't do this optimization.
Kinuko Yasuda
Comment 4 2012-06-03 08:23:48 PDT
Comment on attachment 145083 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=145083&action=review >> Source/WebCore/Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp:80 >> + // FIXME: This involves synchronous file operation. We need to pass file type data when we dispatch drag event. > > If the file on disk changes during the drag, should calls to webkitGetAsEntry() return current information? If so, you probably can't do this optimization. Good point, it's a bit questionable. Actually if file<->directory changes we may rather want to return a stale Entry which yields InvalidStateError errors. I'll update the comment and bring it up on the public list.
Kinuko Yasuda
Comment 5 2012-06-03 22:38:23 PDT
Note You need to log in before you can comment on or make changes to this bug.