| OLD | NEW |
| 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 Loading... |
| 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], File::AllContentTypes)
); | 324 fileList->append(File::create([absoluteURL path])); |
| 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 Loading... |
| 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 } |
| OLD | NEW |