Closed Bug 1732528 Opened 3 years ago Closed 2 years ago

Stop putting Blobs into nsITransferable when converting from DataTransfer

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect)

defect

Tracking

()

RESOLVED FIXED
110 Branch
Tracking Status
relnote-firefox --- -
firefox110 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

(Regressed 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

I am not sure if there is something missing about blobImpl = do_QueryInterface(data);, but it doesn't work in my testing when data is a webidl File.

This is important for my case of supporting dragging images on Linux, because we convert the nsIInputStream provided by the platform code to a File in DataTransferItem::FillInExternalData via CreateFileFromInputStream.

Summary: Support Blob in nsContentUtils::TransferableToIPCTransferable → Support File in nsContentUtils::TransferableToIPCTransferable
Assignee: nobody → evilpies
Status: NEW → ASSIGNED
See Also: → 1731622

I wonder why this isn't required for dragging images across processes to work on Windows.

Summary: Support File in nsContentUtils::TransferableToIPCTransferable → Stop putting Blobs into nsITransferable when converting from DataTransfer

If we never put a Blob into the transferable we don't have to change any of the IPC conversion code.

Attachment #9242908 - Attachment is obsolete: true

:evilpie: since bug 1731622 is already fixed, presumably this ticket isn't relevant for it? I'm wondering because I'm trying to determine this tickets' severity and priority.

Flags: needinfo?(evilpies)

(In reply to Mirko Brodesser (:mbrodesser) from comment #5)

:evilpie: since bug 1731622 is already fixed, presumably this ticket isn't relevant for it? I'm wondering because I'm trying to determine this tickets' severity and priority.

No these issues are somewhat unrelated. With bug 1731622 fixed we aren't providing garbage data with the format application/x-moz-nativeimage anymore on any platform. However on Linux (unlike Windows) dragging images from other programs (or Firefox instances) still doesn't work. With this bug fixed we would provide image/png in that case on Linux.

Flags: needinfo?(evilpies)

Changing severity to S3 because this affects drag-and-drop of images for end users on Linux per comment 6.

Severity: -- → S3

Hi Nika! How can I make progress here?

Flags: needinfo?(nika)

Edgar, maybe this is something that you could look at.

Flags: needinfo?(echen)
Flags: needinfo?(nika)
Flags: needinfo?(echen)
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b9c2ea5329e3 Stop putting Blobs into nsITransferable when converting from DataTransfer. r=nika
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
See Also: → 1437126

Release Note Request (optional, but appreciated)
[Why is this notable]: I am obviously biased because this is something I am passionate about, but I think dragging images is not an uncommon operation. A large part of this change actually landed in bug 1437126, but only with this change does dragging images actually become reliable.
[Affects Firefox for Android]: Not really.
[Suggested wording]: Dragging images across Firefox tabs and instances is now more reliably and works with web apps like Google Drive and Photos.
[Links (documentation, blog post, etc)]:

relnote-firefox: --- → ?

Note added to our nightly release notes, we are keeping the relnote flag in bugzilla open so as to have it on our radar for the release, thanks!

(In reply to Tom S [:evilpie] from comment #12)

Release Note Request (optional, but appreciated)
[Why is this notable]: I am obviously biased because this is something I am passionate about, but I think dragging images is not an uncommon operation. A large part of this change actually landed in bug 1437126, but only with this change does dragging images actually become reliable.
[Affects Firefox for Android]: Not really.
[Suggested wording]: Dragging images across Firefox tabs and instances is now more reliably and works with web apps like Google Drive and Photos.
[Links (documentation, blog post, etc)]:

I guess that the release note added here is no longer valid for our final notes as we backed out bug 1812611, Tom could you confirm please? Thanks

Flags: needinfo?(evilpies)

Yes, correct.

Flags: needinfo?(evilpies)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: