Bug 30102

Summary: [Win] Drag cursor does not show not-allowed cursor on invalid drag-and-drop operation.
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, eric, jens, oliver
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows XP   
Bug Depends on:    
Bug Blocks: 24731    
Attachments:
Description Flags
Patch with manual test case
none
Manual test case (included in patch) none

Description Daniel Bates 2009-10-05 18:03:57 PDT
The allowed effects in WebDragClient::startDrag are hard-coded to be DROPEFFECT_COPY | DROPEFFECT_LINK | DROPEFFECT_MOVE. Instead, the list of allowed drop effects should be determined by the allowed operations of the drag source (i.e. event.dataTransfer.effectsAllowed).
Comment 1 Daniel Bates 2009-10-05 18:04:10 PDT
<rdar://problem/5015957>
Comment 2 Daniel Bates 2009-10-05 18:35:13 PDT
Created attachment 40674 [details]
Patch with manual test case

I could not think of a good name for the function draggingSourceOperationMaskToDragCursors in file WebDragClient.cpp. I am open to suggestions.

We cannot test this using DRT because DRT looks at the programmatic drop cursor and until bug #24731 is fixed this value is hard-coded to DragOperationCopy. That is, there is a discrepancy in the Windows build between the Windows API-based drop effect and the WebKit drop effect. Because DRT cannot read the screen buffer to determine the cursor, a manual test is needed.
Comment 3 Daniel Bates 2009-10-05 18:39:04 PDT
Created attachment 40675 [details]
Manual test case (included in patch)

For convenience, here is the test case included in the patch.
Comment 4 Daniel Bates 2009-10-07 15:27:12 PDT
Comment on attachment 40674 [details]
Patch with manual test case

Clearing flags on attachment: 40674

Committed r49268: <http://trac.webkit.org/changeset/49268>
Comment 5 Daniel Bates 2009-10-07 15:27:16 PDT
All reviewed patches have been landed.  Closing bug.