Closed Bug 39748 Opened 24 years ago Closed 22 years ago

[feature] Fix nsITransferable to allow promises

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

RESOLVED FIXED
Future

People

(Reporter: mikepinkerton, Assigned: sfraser_bugs)

References

Details

(Keywords: perf, Whiteboard: 4 days)

We have a situation now where any time text is copied to the clipboard, the transferable must have all of the data, in every available format, up front, regardless of whether or not that flavor is asked for. This generally involves lots of xif->text or xif->html conversions, which are not cheap, and are probably wasted. The transferable api's need to be redesigned to understand the notion of a promise, where the client can be called back when the data is actually needed. This won't really help us for macOS clipboard since all the data needs to be handed to the clipboard up front, but everything else, as well as macDND, supports the notion of promises.
accepting, M18. not sure if we'll get to this or not... breakdown: - figure out how to change APIs (2 days) - implement changes in transferable (2 days) - fix native clipboard, d&d (3 days, 1 x 3platforms) - update all clients of transferable (1 day)
Blocks: 21847
Status: NEW → ASSIGNED
Keywords: perf
Whiteboard: 8 days
Target Milestone: --- → M18
Target Milestone: M18 → M21
This was on my list of remaining features sent to PDT on 5/22, but was apparently overlooked, perhaps because it had no nsbeta2 nomination. Adding it now, along with nsbeta3, since this is really performance work that we are just treating as a new feature because it will take signficant time.
Keywords: nsbeta2, nsbeta3
Summary: [feature][perf] fix nsITransferable to allow promises → [feature] Fix nsITransferable to allow promises
[nsbeta2-]
Whiteboard: 8 days → [nsbeta2-] 8 days
Moving to future (pink sighs...)
Target Milestone: M21 → Future
Whiteboard: [nsbeta2-] 8 days → [nsbeta2-][nsbeta3-] 8 days
Target Milestone: Future → mozilla0.9
for my own reference: all that's needed to implement an interface on a JS object is to declare methods on the object with the names of the methods being called. The XPConnect wrapper handles the QI/etc. This makes it very easy to have an API that is implemented in either JS or c++ that is called when the data finally arrives, or is needed.
Keywords: nsbeta2, nsbeta3
Whiteboard: [nsbeta2-][nsbeta3-] 8 days → 4 days
Target Milestone: mozilla0.9 → mozilla1.0
Target Milestone: mozilla1.0 → mozilla1.1
fffffffuture
Target Milestone: mozilla1.1alpha → Future
Taking
Assignee: pinkerton → sfraser
Status: ASSIGNED → NEW
Clients of nsITransferable can now use an nsIFlavorDataProvider to implement data promises.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.