diff options
Diffstat (limited to 'WebCore/page/DragController.cpp')
-rw-r--r-- | WebCore/page/DragController.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/WebCore/page/DragController.cpp b/WebCore/page/DragController.cpp index 634595a..bde38bc 100644 --- a/WebCore/page/DragController.cpp +++ b/WebCore/page/DragController.cpp @@ -482,21 +482,6 @@ bool DragController::canProcessDrag(DragData* dragData) return true; } -static DragOperation defaultOperationForDrag(DragOperation srcOpMask) -{ - // This is designed to match IE's operation fallback for the case where - // the page calls preventDefault() in a drag event but doesn't set dropEffect. - if (srcOpMask & DragOperationCopy) - return DragOperationCopy; - if (srcOpMask & DragOperationMove || srcOpMask & DragOperationGeneric) - return DragOperationMove; - if (srcOpMask & DragOperationLink) - return DragOperationLink; - - // FIXME: Does IE really return "generic" even if no operations were allowed by the source? - return DragOperationGeneric; -} - bool DragController::tryDHTMLDrag(DragData* dragData, DragOperation& operation) { ASSERT(dragData); @@ -517,10 +502,8 @@ bool DragController::tryDHTMLDrag(DragData* dragData, DragOperation& operation) return false; } - if (!clipboard->destinationOperation(operation)) { - // The element accepted but they didn't pick an operation, so we pick one (to match IE). - operation = defaultOperationForDrag(srcOpMask); - } else if (!(srcOpMask & operation)) { + operation = clipboard->destinationOperation(); + if (!(srcOpMask & operation)) { // The element picked an operation which is not supported by the source operation = DragOperationNone; } |