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

Side by Side Diff: Source/WebCore/platform/gtk/ClipboardGtk.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 * This library is free software; you can redistribute it and/or 2 * This library is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU Lesser General Public 3 * modify it under the terms of the GNU Lesser General Public
4 * License as published by the Free Software Foundation; either 4 * License as published by the Free Software Foundation; either
5 * version 2 of the License, or (at your option) any later version. 5 * version 2 of the License, or (at your option) any later version.
6 * 6 *
7 * This library is distributed in the hope that it will be useful, 7 * This library is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 * Lesser General Public License for more details. 10 * Lesser General Public License for more details.
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 { 217 {
218 if (policy() != ClipboardReadable) 218 if (policy() != ClipboardReadable)
219 return FileList::create(); 219 return FileList::create();
220 220
221 if (m_clipboard) 221 if (m_clipboard)
222 PasteboardHelper::defaultPasteboardHelper()->getClipboardContents(m_clip board); 222 PasteboardHelper::defaultPasteboardHelper()->getClipboardContents(m_clip board);
223 223
224 RefPtr<FileList> fileList = FileList::create(); 224 RefPtr<FileList> fileList = FileList::create();
225 const Vector<String>& filenames = m_dataObject->filenames(); 225 const Vector<String>& filenames = m_dataObject->filenames();
226 for (size_t i = 0; i < filenames.size(); i++) 226 for (size_t i = 0; i < filenames.size(); i++)
227 fileList->append(File::create(filenames[i], File::AllContentTypes)); 227 fileList->append(File::create(filenames[i]));
228 return fileList.release(); 228 return fileList.release();
229 } 229 }
230 230
231 void ClipboardGtk::setDragImage(CachedImage* image, const IntPoint& location) 231 void ClipboardGtk::setDragImage(CachedImage* image, const IntPoint& location)
232 { 232 {
233 setDragImage(image, 0, location); 233 setDragImage(image, 0, location);
234 } 234 }
235 235
236 void ClipboardGtk::setDragImageElement(Node* element, const IntPoint& location) 236 void ClipboardGtk::setDragImageElement(Node* element, const IntPoint& location)
237 { 237 {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 bool ClipboardGtk::hasData() 325 bool ClipboardGtk::hasData()
326 { 326 {
327 if (m_clipboard) 327 if (m_clipboard)
328 PasteboardHelper::defaultPasteboardHelper()->getClipboardContents(m_clip board); 328 PasteboardHelper::defaultPasteboardHelper()->getClipboardContents(m_clip board);
329 329
330 return m_dataObject->hasText() || m_dataObject->hasMarkup() 330 return m_dataObject->hasText() || m_dataObject->hasMarkup()
331 || m_dataObject->hasURIList() || m_dataObject->hasImage(); 331 || m_dataObject->hasURIList() || m_dataObject->hasImage();
332 } 332 }
333 333
334 } 334 }
OLDNEW
« no previous file with comments | « Source/WebCore/platform/chromium/ChromiumDataObject.cpp ('k') | Source/WebCore/platform/mac/ClipboardMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698