[Qt] Qt needs Clipboard::files() implementation So that WebKit properly supports drag and drop of files onto web pages. See bug 25916
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(); }
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.
Currently drag'n'drop in Qt DRT is pretty much intractable, see https://bugs.webkit.org/show_bug.cgi?id=31332
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
Created attachment 76352 [details] Proposed patch
yah!
Comment on attachment 76352 [details] Proposed patch Clearing flags on attachment: 76352 Committed r74009: <http://trac.webkit.org/changeset/74009>
All reviewed patches have been landed. Closing bug.