Bug 30102 - [Win] Drag cursor does not show not-allowed cursor on invalid drag-and-drop operation.
Summary: [Win] Drag cursor does not show not-allowed cursor on invalid drag-and-drop o...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows XP
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks: 24731
  Show dependency treegraph
 
Reported: 2009-10-05 18:03 PDT by Daniel Bates
Modified: 2009-10-07 15:27 PDT (History)
4 users (show)

See Also:


Attachments
Patch with manual test case (8.33 KB, patch)
2009-10-05 18:35 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Manual test case (included in patch) (4.07 KB, text/html)
2009-10-05 18:39 PDT, Daniel Bates
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.