drag/dropping image from one tab into another should drop the image, not the URL.
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, enhancement, P5)
Tracking
()
People
(Reporter: mhoye, Unassigned)
References
Details
Attachments
(2 files)
Updated•6 years ago
|
Updated•3 years ago
|
Comment 1•3 years ago
|
||
When using images with drag & drop (or the clipboard) we use two or more different types:
- When dragging an image we put it into the DataTransfer object using the
type kNativeImageMime and the data as an imgIContainer object. - When dropping an image we want to have some kind of image/ type,
but the data is already supposed to be a File or nsIInputStream when it comes from the OS.
This weird split usually works fine, because in our GTK, Windows and macOS code
we first convert imgIContainer to whatever native image format is required when
dragging something and then convert back to a file (or stream) when dropping.
What however doesn't work is when we never actually round-trip through the OS.
In that case we have the imgIContainer that we can't drop in a meaningful way.
(I actually already ran into this issue in bug 1396587 with the clipboard,
but we kind of resolved this by always doing the roundtrip through the OS's clipboard)
Updated•3 years ago
|
Comment 2•3 years ago
|
||
The only real downside of this approach is that we aren't dragging the original file, but that would probably be harder to solve. We would have to
- Actually download the file from the promise URL
- or, actually put the original image bytes onto DataTransfer (not sure if those still exists when dragging)
Updated•3 years ago
|
Comment 6•3 years ago
|
||
Backed out for causing mochitests failures on test_drag_image_file.html.
- Backout link
- Push with failures
- Failure Log
- Failure line: TEST-UNEXPECTED-FAIL | dom/events/test/test_drag_image_file.html | Test timed out. -
Updated•3 years ago
|
Comment 8•3 years ago
|
||
bugherder |
Updated•3 years ago
|
Comment 10•3 years ago
|
||
This was disabled by default in bug 1812611. Not sure when I will have time to fix these issues.
Updated•2 years ago
|
Comment 12•1 year ago
|
||
Tom, can you please raise the priority of this bug? It's still set to P5, even though you worked on dom.events.dataTransfer.imageAsFile.enabled
years ago.
This feature is supported by Chromium browsers and is more relevant now - with the proliferation of web apps - than it was back when this issue was created.
Comment 13•6 months ago
|
||
Updated•4 days ago
|
Description
•