| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2008 Google Inc. | 3 * Copyright (C) 2008 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 } | 573 } |
| 574 | 574 |
| 575 static DragOperation defaultOperationForDrag(DragOperation srcOpMask) | 575 static DragOperation defaultOperationForDrag(DragOperation srcOpMask) |
| 576 { | 576 { |
| 577 // This is designed to match IE's operation fallback for the case where | 577 // This is designed to match IE's operation fallback for the case where |
| 578 // the page calls preventDefault() in a drag event but doesn't set dropEffec
t. | 578 // the page calls preventDefault() in a drag event but doesn't set dropEffec
t. |
| 579 if (srcOpMask == DragOperationEvery) | 579 if (srcOpMask == DragOperationEvery) |
| 580 return DragOperationCopy; | 580 return DragOperationCopy; |
| 581 if (srcOpMask == DragOperationNone) | 581 if (srcOpMask == DragOperationNone) |
| 582 return DragOperationNone; | 582 return DragOperationNone; |
| 583 if (srcOpMask & DragOperationMove || srcOpMask & DragOperationGeneric) | 583 if (srcOpMask & DragOperationMove) |
| 584 return DragOperationMove; | 584 return DragOperationMove; |
| 585 if (srcOpMask & DragOperationCopy) | 585 if (srcOpMask & DragOperationCopy) |
| 586 return DragOperationCopy; | 586 return DragOperationCopy; |
| 587 if (srcOpMask & DragOperationLink) | 587 if (srcOpMask & DragOperationLink) |
| 588 return DragOperationLink; | 588 return DragOperationLink; |
| 589 | 589 |
| 590 // FIXME: Does IE really return "generic" even if no operations were allowed
by the source? | 590 // FIXME: Does IE really return "generic" even if no operations were allowed
by the source? |
| 591 return DragOperationGeneric; | 591 return DragOperationGeneric; |
| 592 } | 592 } |
| 593 | 593 |
| (...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 992 | 992 |
| 993 DEFINE_TRACE(DragController) | 993 DEFINE_TRACE(DragController) |
| 994 { | 994 { |
| 995 visitor->trace(m_page); | 995 visitor->trace(m_page); |
| 996 visitor->trace(m_documentUnderMouse); | 996 visitor->trace(m_documentUnderMouse); |
| 997 visitor->trace(m_dragInitiator); | 997 visitor->trace(m_dragInitiator); |
| 998 visitor->trace(m_fileInputElementUnderMouse); | 998 visitor->trace(m_fileInputElementUnderMouse); |
| 999 } | 999 } |
| 1000 | 1000 |
| 1001 } // namespace blink | 1001 } // namespace blink |
| OLD | NEW |