RESOLVED FIXED 26710
[Qt] Qt needs Clipboard::files() implementation
https://bugs.webkit.org/show_bug.cgi?id=26710
Summary [Qt] Qt needs Clipboard::files() implementation
Eric Seidel (no email)
Reported 2009-06-24 23:47:53 PDT
[Qt] Qt needs Clipboard::files() implementation So that WebKit properly supports drag and drop of files onto web pages. See bug 25916
Attachments
Proposed patch (1.84 KB, patch)
2010-12-12 22:09 PST, Jarred Nicholls
no flags
Benjamin Meyer
Comment 1 2009-10-03 21:50:41 PDT
Is there a test page for this feature? Is it suppose to return the file names ore the file contents? First pass: PassRefPtr<FileList> ClipboardQt::files() const { - notImplemented(); - return 0; + if (policy() != ClipboardReadable) + return FileList::create(); + + RefPtr<FileList> fileList = FileList::create(); + QList<QUrl> urls = m_readableData->urls(); + foreach (QUrl url, urls) { + if (url.scheme() != QLatin1String("file")) + continue; + fileList->append(File::create(url.toLocalFile())); + } + + return fileList.release(); }
Eric Seidel (no email)
Comment 2 2009-10-07 21:56:19 PDT
There are several tests. Qt's DumpRenderTree needs a eventSender.beginDragWithFiles implementation. There is a bug filed about Windows DumpRenderTree (bug 25924), but I don't see one for Qt yet.
Robert Hogan
Comment 3 2010-12-04 02:37:43 PST
Currently drag'n'drop in Qt DRT is pretty much intractable, see https://bugs.webkit.org/show_bug.cgi?id=31332
Jarred Nicholls
Comment 4 2010-12-12 21:23:51 PST
Tests depend upon beginDragWithFiles implementation in DRT, so you can mark this bug as depending upon this one: https://bugs.webkit.org/show_bug.cgi?id=50902
Jarred Nicholls
Comment 5 2010-12-12 22:09:29 PST
Created attachment 76352 [details] Proposed patch
Benjamin Meyer
Comment 6 2010-12-14 01:40:10 PST
yah!
WebKit Commit Bot
Comment 7 2010-12-14 02:50:22 PST
Comment on attachment 76352 [details] Proposed patch Clearing flags on attachment: 76352 Committed r74009: <http://trac.webkit.org/changeset/74009>
WebKit Commit Bot
Comment 8 2010-12-14 02:50:28 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.