Closed
Bug 1289255
Opened 8 years ago
Closed 8 years ago
Implement DataTransferItem.webkitGetAsEntry
Categories
(Core :: DOM: Core & HTML, defect, P2)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: smaug, Assigned: smaug)
References
Details
(Keywords: dev-doc-complete)
Attachments
(2 files, 1 obsolete file)
5.69 KB,
patch
|
baku
:
review+
|
Details | Diff | Splinter Review |
5.71 KB,
patch
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•8 years ago
|
||
Bug 1289254 adds IsDirectory() to BlobImpl which should make this rather trivial.
Updated•8 years ago
|
Priority: -- → P2
Assignee | ||
Comment 2•8 years ago
|
||
I took the patch 7 from bug 1284987 and added support for DOMFileSystem and directories. The only issue I know atm is that FileEntry doesn't have fullpath. baku, how would one get fullpath information to the FileEntries? Basically /<filename>
Assignee: nobody → bugs
Flags: needinfo?(amarchesini)
Attachment #8774948 -
Flags: feedback?(amarchesini)
Assignee | ||
Comment 3•8 years ago
|
||
Looks like my patch for bug Bug 1289254 has the same issue with FileEntries. They are missing the fullpath
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8774948 -
Attachment is obsolete: true
Attachment #8774948 -
Flags: feedback?(amarchesini)
Attachment #8775320 -
Flags: review?(amarchesini)
Assignee | ||
Comment 5•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=8216d6a07c17
Comment 6•8 years ago
|
||
Comment on attachment 8775320 [details] [diff] [review] patch Review of attachment 8775320 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/events/DataTransferItem.cpp @@ +282,5 @@ > + } > + > + nsCOMPtr<nsIGlobalObject> global; > + RefPtr<DataTransfer> dataTransfer; > + RefPtr<DataTransferItemList> list = GetParentObject(); Nit, but just to make this code more readable, what about if we do: if (!list) { return nullptr; } RefPtr<DataTransfer> dataTransfer = list->GetParentObject(); if (!dataTransfer) { return nullptr; } @@ +306,5 @@ > + return nullptr; > + } > + > + RefPtr<DOMFileSystem> fs = DOMFileSystem::Create(global); > + Sequence<RefPtr<Entry>> entries; move this to line 336. @@ +309,5 @@ > + RefPtr<DOMFileSystem> fs = DOMFileSystem::Create(global); > + Sequence<RefPtr<Entry>> entries; > + RefPtr<Entry> entry; > + > + BlobImpl* impl = file->Impl(); MOZ_ASSERT(impl); and remove if(impl) part. @@ +320,5 @@ > + } > + > + nsCOMPtr<nsIFile> directoryFile; > + NS_ConvertUTF16toUTF8 path(fullpath); > + nsresult rv = NS_NewNativeLocalFile(path, true, nsresult rv = NS_NewNativeLocalFile(NS_ConvertUTF16toUTF8(fullPath), true, getter_...);
Attachment #8775320 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 7•8 years ago
|
||
Updated•8 years ago
|
Flags: needinfo?(amarchesini)
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/5e254e995379 Implement DataTransferItem.webkitGetAsEntry, r=baku
Comment 9•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5e254e995379
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Updated•7 years ago
|
Keywords: dev-doc-needed
Comment 10•7 years ago
|
||
Documented, with lovely live sample to boot (which is reused on other pages about file system, too): https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem/webkitGetAsEntry Updated https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItem to include it. Listed on Firefox 50 for developers.
Keywords: dev-doc-needed → dev-doc-complete
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•