Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(77)

Side by Side Diff: Source/WebCore/platform/qt/ClipboardQt.cpp

Issue 11370004: Revert 123677 - Merge 123495 - Files from drag and file <input> should use getMIMETypeForExtension … (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2010 Sencha, Inc. All rights reserved. 5 * Copyright (C) 2010 Sencha, Inc. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 if (policy() != ClipboardReadable || !m_readableData->hasUrls()) 200 if (policy() != ClipboardReadable || !m_readableData->hasUrls())
201 return FileList::create(); 201 return FileList::create();
202 202
203 RefPtr<FileList> fileList = FileList::create(); 203 RefPtr<FileList> fileList = FileList::create();
204 QList<QUrl> urls = m_readableData->urls(); 204 QList<QUrl> urls = m_readableData->urls();
205 205
206 for (int i = 0; i < urls.size(); i++) { 206 for (int i = 0; i < urls.size(); i++) {
207 QUrl url = urls[i]; 207 QUrl url = urls[i];
208 if (url.scheme() != QLatin1String("file")) 208 if (url.scheme() != QLatin1String("file"))
209 continue; 209 continue;
210 fileList->append(File::create(url.toLocalFile(), File::AllContentTypes)) ; 210 fileList->append(File::create(url.toLocalFile()));
211 } 211 }
212 212
213 return fileList.release(); 213 return fileList.release();
214 } 214 }
215 215
216 void ClipboardQt::setDragImage(CachedImage* image, const IntPoint& point) 216 void ClipboardQt::setDragImage(CachedImage* image, const IntPoint& point)
217 { 217 {
218 setDragImage(image, 0, point); 218 setDragImage(image, 0, point);
219 } 219 }
220 220
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 if (isForCopyAndPaste() && policy() == ClipboardReadable) { 358 if (isForCopyAndPaste() && policy() == ClipboardReadable) {
359 const QStringList types = m_readableData->formats(); 359 const QStringList types = m_readableData->formats();
360 for (int i = 0; i < types.count(); ++i) 360 for (int i = 0; i < types.count(); ++i)
361 items->addPasteboardItem(types.at(i)); 361 items->addPasteboardItem(types.at(i));
362 } 362 }
363 return items; 363 return items;
364 } 364 }
365 #endif 365 #endif
366 366
367 } 367 }
OLDNEW
« no previous file with comments | « Source/WebCore/platform/mac/ClipboardMac.mm ('k') | Source/WebCore/platform/win/ClipboardWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698