Implement Promise support in the ClipboardItem constructor
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox115 | --- | fixed |
People
(Reporter: evilpie, Assigned: edgar)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files, 2 obsolete files)
We currently don't support Promises in the ClipboardItem constructor like Chrome. Safari does support it and it's specified in the spec.
Before shipping we need to either implement this or change the spec, because this is apparently causing issues: bug 1619947 comment 25.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
I am pretty sure the ref-counting and CC handling is totally wrong, because it's missing for
mPromises and mResolvedEntries.
I added mResolvedEntries because I remembered some previous discussion that MozPromise can't
hold something alive? I don't actually remember the details.
It does pass all the wpt clipboard-apis tests. However those don't include anything for Promises
in the constructor.
Reporter | ||
Comment 2•4 years ago
|
||
Hey Nika, would you mind taking a look at the CC handling etc. in the patch?
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Reporter | ||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Reporter | ||
Comment 4•3 years ago
|
||
Seems like Chromium is finally working on this feature thanks to Microsoft: https://bugs.chromium.org/p/chromium/issues/detail?id=1014310.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
Assignee | ||
Comment 6•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 7•2 years ago
|
||
Assignee | ||
Comment 8•2 years ago
|
||
Assignee | ||
Comment 9•2 years ago
|
||
Assignee | ||
Comment 10•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
Assignee | ||
Comment 12•2 years ago
|
||
Assignee | ||
Comment 13•2 years ago
|
||
Updated•2 years ago
|
Assignee | ||
Comment 14•2 years ago
|
||
The Async Clipboard API now allows using arbitrary promises for passing write data,
potentially enabling websites to delay writing data to an arbitrary future, which
may surprise the user. This patch introduces a solution: a new write request will
automatically cancel any previous pending request.
To implement that, this patch introduces a new method to nsIClipboard, new XPCOM
interfaces, and new IPC to efficiently track individual write requests. Additionally,
a new helper base class, ClipboardSetDataHelper, is introduced in widget to facilitate
platform code sharing.
Depends on D158710
Assignee | ||
Comment 15•2 years ago
|
||
Depends on D174090
Comment 16•2 years ago
|
||
Comment on attachment 9325955 [details]
Bug 1712122 - Part 4: Disallow clipboard write when page is not in the active tab; r?nika
Revision D174091 was moved to bug 1830340. Setting attachment 9325955 [details] to obsolete.
Assignee | ||
Comment 17•2 years ago
|
||
Comment 18•2 years ago
|
||
Comment 20•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/079998facc02
https://hg.mozilla.org/mozilla-central/rev/cae91f0a02df
https://hg.mozilla.org/mozilla-central/rev/4d1cb082dad7
Description
•