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

Side by Side Diff: Source/WebCore/platform/mac/ClipboardMac.mm

Issue 10821032: Merge 123495 - Files from drag and file <input> should use getMIMETypeForExtension to determine con… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 months 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) 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2005, 2006, 2008, 2010 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 { 314 {
315 if (policy() != ClipboardReadable || m_clipboardContents == DragAndDropData) 315 if (policy() != ClipboardReadable || m_clipboardContents == DragAndDropData)
316 return FileList::create(); 316 return FileList::create();
317 317
318 Vector<String> absoluteURLs = absoluteURLsFromPasteboardFilenames(m_pasteboa rdName); 318 Vector<String> absoluteURLs = absoluteURLsFromPasteboardFilenames(m_pasteboa rdName);
319 319
320 RefPtr<FileList> fileList = FileList::create(); 320 RefPtr<FileList> fileList = FileList::create();
321 for (size_t i = 0; i < absoluteURLs.size(); i++) { 321 for (size_t i = 0; i < absoluteURLs.size(); i++) {
322 NSURL *absoluteURL = [NSURL URLWithString:absoluteURLs[i]]; 322 NSURL *absoluteURL = [NSURL URLWithString:absoluteURLs[i]];
323 ASSERT([absoluteURL isFileURL]); 323 ASSERT([absoluteURL isFileURL]);
324 fileList->append(File::create([absoluteURL path])); 324 fileList->append(File::create([absoluteURL path], File::AllContentTypes) );
325 } 325 }
326 return fileList.release(); // We will always return a FileList, sometimes em pty 326 return fileList.release(); // We will always return a FileList, sometimes em pty
327 } 327 }
328 328
329 // The rest of these getters don't really have any impact on security, so for no w make no checks 329 // The rest of these getters don't really have any impact on security, so for no w make no checks
330 330
331 void ClipboardMac::setDragImage(CachedImage* img, const IntPoint &loc) 331 void ClipboardMac::setDragImage(CachedImage* img, const IntPoint &loc)
332 { 332 {
333 setDragImage(img, 0, loc); 333 setDragImage(img, 0, loc);
334 } 334 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } else if (m_dragImage) { 428 } else if (m_dragImage) {
429 result = m_dragImage->image()->getNSImage(); 429 result = m_dragImage->image()->getNSImage();
430 430
431 loc = m_dragLoc; 431 loc = m_dragLoc;
432 loc.y = [result size].height - loc.y; 432 loc.y = [result size].height - loc.y;
433 } 433 }
434 return result; 434 return result;
435 } 435 }
436 436
437 } 437 }
OLDNEW
« no previous file with comments | « Source/WebCore/platform/gtk/ClipboardGtk.cpp ('k') | Source/WebCore/platform/qt/ClipboardQt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698