| 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 | 399 |
| 400 DragOperation DataTransfer::destinationOperation() const | 400 DragOperation DataTransfer::destinationOperation() const |
| 401 { | 401 { |
| 402 DragOperation op = convertEffectAllowedToDragOperation(m_dropEffect); | 402 DragOperation op = convertEffectAllowedToDragOperation(m_dropEffect); |
| 403 ASSERT(op == DragOperationCopy || op == DragOperationNone || op == DragOpera
tionLink || op == (DragOperation)(DragOperationGeneric | DragOperationMove) || o
p == DragOperationEvery); | 403 ASSERT(op == DragOperationCopy || op == DragOperationNone || op == DragOpera
tionLink || op == (DragOperation)(DragOperationGeneric | DragOperationMove) || o
p == DragOperationEvery); |
| 404 return op; | 404 return op; |
| 405 } | 405 } |
| 406 | 406 |
| 407 void DataTransfer::setSourceOperation(DragOperation op) | 407 void DataTransfer::setSourceOperation(DragOperation op) |
| 408 { | 408 { |
| 409 ASSERT_ARG(op, op != DragOperationPrivate); | 409 DCHECK_NE(op, DragOperationPrivate); |
| 410 m_effectAllowed = convertDragOperationToEffectAllowed(op); | 410 m_effectAllowed = convertDragOperationToEffectAllowed(op); |
| 411 } | 411 } |
| 412 | 412 |
| 413 void DataTransfer::setDestinationOperation(DragOperation op) | 413 void DataTransfer::setDestinationOperation(DragOperation op) |
| 414 { | 414 { |
| 415 ASSERT_ARG(op, op == DragOperationCopy || op == DragOperationNone || op == D
ragOperationLink || op == DragOperationGeneric || op == DragOperationMove || op
== (DragOperation)(DragOperationGeneric | DragOperationMove)); | 415 DCHECK(op == DragOperationCopy || op == DragOperationNone || op == DragOpera
tionLink || op == DragOperationGeneric || op == DragOperationMove || op == stati
c_cast<DragOperation>(DragOperationGeneric | DragOperationMove)); |
| 416 m_dropEffect = convertDragOperationToEffectAllowed(op); | 416 m_dropEffect = convertDragOperationToEffectAllowed(op); |
| 417 } | 417 } |
| 418 | 418 |
| 419 bool DataTransfer::hasDropZoneType(const String& keyword) | 419 bool DataTransfer::hasDropZoneType(const String& keyword) |
| 420 { | 420 { |
| 421 if (keyword.startsWith("file:")) | 421 if (keyword.startsWith("file:")) |
| 422 return hasFileOfType(keyword.substring(5)); | 422 return hasFileOfType(keyword.substring(5)); |
| 423 | 423 |
| 424 if (keyword.startsWith("string:")) | 424 if (keyword.startsWith("string:")) |
| 425 return hasStringOfType(keyword.substring(7)); | 425 return hasStringOfType(keyword.substring(7)); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 511 DEFINE_TRACE(DataTransfer) | 511 DEFINE_TRACE(DataTransfer) |
| 512 { | 512 { |
| 513 visitor->trace(m_dataObject); | 513 visitor->trace(m_dataObject); |
| 514 visitor->trace(m_dragImage); | 514 visitor->trace(m_dragImage); |
| 515 #if ENABLE(OILPAN) | 515 #if ENABLE(OILPAN) |
| 516 visitor->trace(m_dragImageElement); | 516 visitor->trace(m_dragImageElement); |
| 517 #endif | 517 #endif |
| 518 } | 518 } |
| 519 | 519 |
| 520 } // namespace blink | 520 } // namespace blink |
| OLD | NEW |