| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 442 drag_image_element_ = node; | 442 drag_image_element_ = node; |
| 443 } | 443 } |
| 444 | 444 |
| 445 bool DataTransfer::HasFileOfType(const String& type) const { | 445 bool DataTransfer::HasFileOfType(const String& type) const { |
| 446 if (!CanReadTypes()) | 446 if (!CanReadTypes()) |
| 447 return false; | 447 return false; |
| 448 | 448 |
| 449 for (size_t i = 0; i < data_object_->length(); ++i) { | 449 for (size_t i = 0; i < data_object_->length(); ++i) { |
| 450 if (data_object_->Item(i)->Kind() == DataObjectItem::kFileKind) { | 450 if (data_object_->Item(i)->Kind() == DataObjectItem::kFileKind) { |
| 451 Blob* blob = data_object_->Item(i)->GetAsFile(); | 451 Blob* blob = data_object_->Item(i)->GetAsFile(); |
| 452 if (blob && blob->IsFile() && EqualIgnoringCase(blob->type(), type)) | 452 if (blob && blob->IsFile() && |
| 453 DeprecatedEqualIgnoringCase(blob->type(), type)) |
| 453 return true; | 454 return true; |
| 454 } | 455 } |
| 455 } | 456 } |
| 456 return false; | 457 return false; |
| 457 } | 458 } |
| 458 | 459 |
| 459 bool DataTransfer::HasStringOfType(const String& type) const { | 460 bool DataTransfer::HasStringOfType(const String& type) const { |
| 460 if (!CanReadTypes()) | 461 if (!CanReadTypes()) |
| 461 return false; | 462 return false; |
| 462 | 463 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 487 } | 488 } |
| 488 } | 489 } |
| 489 | 490 |
| 490 DEFINE_TRACE(DataTransfer) { | 491 DEFINE_TRACE(DataTransfer) { |
| 491 visitor->Trace(data_object_); | 492 visitor->Trace(data_object_); |
| 492 visitor->Trace(drag_image_); | 493 visitor->Trace(drag_image_); |
| 493 visitor->Trace(drag_image_element_); | 494 visitor->Trace(drag_image_element_); |
| 494 } | 495 } |
| 495 | 496 |
| 496 } // namespace blink | 497 } // namespace blink |
| OLD | NEW |