Created attachment 33477 [details]
Test case for setting the dragImage for a link.
At the start of a drag operation you can use event.dataTransfer.setDragImage(...) to change the graphic to display by the cursor during the operation.
On Windows Safari it is not supported on <a> tags, which uses the default drag image for the link instead of whatever image is specified in by setDragImage.
(Breaking up https://bugs.webkit.org/show_bug.cgi?id=24735)
Created attachment 109399 [details]
Screenshot from Google Chrome 14.0.835.187
It works fine here.
Jessie: first of all your test case is invalid:
1) It doesn't have DOCTYPE (like HTML5's <!DOCTYPE html>)
2) You don't pass "event" in "ondragstart"
3) In "dragLinkAndSeeDivDragged" you use undefined event
Webkit recovers from last two issues by silently magically setting "event" inside the function. Thanks to that this test case *works* in my Google Chrome 14.0.835.187.
If you fix the issues I have mentioned, the test case starts working also in Firefox.
Please, re-test this bug, it seems to be fixes now.
The behavior has improved since this bug was filed, the fix was in <http://trac.webkit.org/changeset/86472>.
But the drag image is still misplaced in WebKit nigtlies.
> Webkit recovers from last two issues by silently magically setting "event" inside the function.
It's not so magical, see <http://www.quirksmode.org/js/events_access.html> for a description of window.event. Besides, it's completely unrelated to this bug, so let's not discuss that here.