When dragging files onto an <input type="file"> element, visual feedback is required so that the user knows where to drop the file so that it will be set as the file upload path instead of being opened in the browser.
Regarding visual feedback, I think either a cursor change or a focus ring around the input element (or both) would be sufficient.
See: <rdar://problem/4728842> Can't drag-and-drop files onto <input type="file">
The previous implementation applied a tint to the background of the control when it was being targeted.
I see a (+) cursor when i drag a file over the input.
But yes, it would probably help if there was some kind of feedback that was more distinguishable
(In reply to comment #3)
> I see a (+) cursor when i drag a file over the input.
That's true for any document type that Safari will accept, like an image or HTML. The (+) cursor starts when you enter the page boundary, not when you get to the input element, so you don't know what will happen when you drop it. :(
*** Bug 15753 has been marked as a duplicate of this bug. ***
When I initially added type=file drops, it drew a focus ring. it was a bit strange looking on some sites, but it worked. That support was lost when forms moved out of NSViews, it seems.
*** Bug 17024 has been marked as a duplicate of this bug. ***
*** Bug 32493 has been marked as a duplicate of this bug. ***
Split out some tasks for the multiple file case. This bug can track the single file drag case.
Created attachment 113733 [details]
Comment on attachment 113733 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=113733&action=review
r- because of the potential stale pointer issue. Other than that I think the patch is okay!
> + HTMLInputElement* m_fileInputElementUnderMouse;
I am not convinced that using a raw pointer here is safe. For example, it seems like a script could remove the element from the document while the user is dragging.
Created attachment 113757 [details]
Comment on attachment 113757 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=113757&action=review
> + , m_fileInputElementUnderMouse(0)
No need to initialize a RefPtr to 0.
Committed r99369: <http://trac.webkit.org/changeset/99369>