OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 m_dataObject->setData(normalizeType(type), data); | 182 m_dataObject->setData(normalizeType(type), data); |
183 } | 183 } |
184 | 184 |
185 // extensions beyond IE's API | 185 // extensions beyond IE's API |
186 Vector<String> DataTransfer::types() const | 186 Vector<String> DataTransfer::types() const |
187 { | 187 { |
188 Vector<String> types; | 188 Vector<String> types; |
189 if (!canReadTypes()) | 189 if (!canReadTypes()) |
190 return types; | 190 return types; |
191 | 191 |
192 ListHashSet<String> typesSet = m_dataObject->types(); | 192 return m_dataObject->types(); |
193 types.appendRange(typesSet.begin(), typesSet.end()); | |
194 return types; | |
195 } | 193 } |
196 | 194 |
197 FileList* DataTransfer::files() const | 195 FileList* DataTransfer::files() const |
198 { | 196 { |
199 FileList* files = FileList::create(); | 197 FileList* files = FileList::create(); |
200 if (!canReadData()) | 198 if (!canReadData()) |
201 return files; | 199 return files; |
202 | 200 |
203 for (size_t i = 0; i < m_dataObject->length(); ++i) { | 201 for (size_t i = 0; i < m_dataObject->length(); ++i) { |
204 if (m_dataObject->item(i)->kind() == DataObjectItem::FileKind) { | 202 if (m_dataObject->item(i)->kind() == DataObjectItem::FileKind) { |
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
513 DEFINE_TRACE(DataTransfer) | 511 DEFINE_TRACE(DataTransfer) |
514 { | 512 { |
515 visitor->trace(m_dataObject); | 513 visitor->trace(m_dataObject); |
516 visitor->trace(m_dragImage); | 514 visitor->trace(m_dragImage); |
517 #if ENABLE(OILPAN) | 515 #if ENABLE(OILPAN) |
518 visitor->trace(m_dragImageElement); | 516 visitor->trace(m_dragImageElement); |
519 #endif | 517 #endif |
520 } | 518 } |
521 | 519 |
522 } // namespace blink | 520 } // namespace blink |
OLD | NEW |