| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 | 553 |
| 554 HDROP hdrop = reinterpret_cast<HDROP>(GlobalLock(medium.hGlobal)); | 554 HDROP hdrop = reinterpret_cast<HDROP>(GlobalLock(medium.hGlobal)); |
| 555 if (!hdrop) | 555 if (!hdrop) |
| 556 return files.release(); | 556 return files.release(); |
| 557 | 557 |
| 558 WCHAR filename[MAX_PATH]; | 558 WCHAR filename[MAX_PATH]; |
| 559 UINT fileCount = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0); | 559 UINT fileCount = DragQueryFileW(hdrop, 0xFFFFFFFF, 0, 0); |
| 560 for (UINT i = 0; i < fileCount; i++) { | 560 for (UINT i = 0; i < fileCount; i++) { |
| 561 if (!DragQueryFileW(hdrop, i, filename, WTF_ARRAY_LENGTH(filename))) | 561 if (!DragQueryFileW(hdrop, i, filename, WTF_ARRAY_LENGTH(filename))) |
| 562 continue; | 562 continue; |
| 563 files->append(File::create(reinterpret_cast<UChar*>(filename), File:
:AllContentTypes)); | 563 files->append(File::create(reinterpret_cast<UChar*>(filename))); |
| 564 } | 564 } |
| 565 | 565 |
| 566 GlobalUnlock(medium.hGlobal); | 566 GlobalUnlock(medium.hGlobal); |
| 567 ReleaseStgMedium(&medium); | 567 ReleaseStgMedium(&medium); |
| 568 return files.release(); | 568 return files.release(); |
| 569 } | 569 } |
| 570 if (!m_dragDataMap.contains(cfHDropFormat()->cfFormat)) | 570 if (!m_dragDataMap.contains(cfHDropFormat()->cfFormat)) |
| 571 return files.release(); | 571 return files.release(); |
| 572 Vector<String> filesVector = m_dragDataMap.get(cfHDropFormat()->cfFormat); | 572 Vector<String> filesVector = m_dragDataMap.get(cfHDropFormat()->cfFormat); |
| 573 for (Vector<String>::iterator it = filesVector.begin(); it != filesVector.en
d(); ++it) | 573 for (Vector<String>::iterator it = filesVector.begin(); it != filesVector.en
d(); ++it) |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 806 | 806 |
| 807 void ClipboardWin::setExternalDataObject(IDataObject *dataObject) | 807 void ClipboardWin::setExternalDataObject(IDataObject *dataObject) |
| 808 { | 808 { |
| 809 ASSERT(isForDragAndDrop()); | 809 ASSERT(isForDragAndDrop()); |
| 810 | 810 |
| 811 m_writableDataObject = 0; | 811 m_writableDataObject = 0; |
| 812 m_dataObject = dataObject; | 812 m_dataObject = dataObject; |
| 813 } | 813 } |
| 814 | 814 |
| 815 } // namespace WebCore | 815 } // namespace WebCore |
| OLD | NEW |