From my tests, calling event.dataTransfer.setDragImage() within a "dragenter" event handler in JS code is a no-op and .setDragImage() only does what's intended within a "dragstart" event handler. This might be a "feature" and not a bug, but I'm not sure why there would such a limitation to the use of .setDragImage().
Created attachment 26254 [details]
This testcases shows that Clipboard::setDragImage() only works when called within a "dragstart" event handler. Indeed, when dragging the black square above, we set the drag image to be some element elsewhere in the DOM, and this works fine. As you initiate a drag from the black rectangle, you should see this message: This is a custom drag image. However, when you are dragging something else, say an image or URL shortcut from the Finder, over the black rectangle, attempting to set a custom drag image fails.
It seems this is by design. The docs <http://developer.apple.com/documentation/AppleApplications/Conceptual/SafariJSProgTopics/Tasks/DragAndDrop.html#//apple_ref/doc/uid/30001233-177395> say "When a drag operation begins, you can use the setDragImage method of the dataTransfer object".
In terms of the implementation, DragController::tryDHTMLDrag() actually creates a new Clipboard object on every mouse drag, with a policy of ClipboardReadable or ClipboardTypesReadable. setDragImage() then bails on setting the image for this Clipboard because of that policy.
If it were possible to change the drag image after the start of the drag, I think there would have to be some 'same origin' policy to avoid pages changing the drag images of drags from other documents, or from outside the browser.
I think the current policy is too restrictive, I would prefer to have something like a same-domain policy so that I could have an element dragged from one of my webpages opened in one window dropped onto another webpages off my website in another window, and have the drop page be able to update the drag image to reflect the state of the element once dropped onto the current drop zone.
Created attachment 65639 [details]
Another test case
I was also surprised to find that the drag image can only be set during the "dragstart" event handler. Attaching another test case that demonstrates the issue: RainbowDragging.html