Change nsIClipboard constant lists to be a CEnum type
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, task)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox130 | --- | fixed |
People
(Reporter: edgar, Assigned: tschuster)
References
Details
Attachments
(4 files, 1 obsolete file)
Turn https://searchfox.org/mozilla-central/rev/fb9a504ca73529fa550efe488db2a012a4bf5169/widget/nsIClipboard.idl#26-30 into something like
cenum ClipboardType : 8 {
kSelectionClipboard = 0,
kGlobalClipboard = 1,
kFindClipboard = 2,
kSelectionCache = 3,
};
| Reporter | ||
Comment 1•2 years ago
|
||
When creating a DataTransfer object, we assign a clipboard type to it, and use that to pass to nsIClipboard. Ideally DataTransfer should use the same type defined in nsIClipboard, but there are some place use -1 as clipboard type to create a DataTransfer, e.g.
- A
DataTransferthat is used for drag-and-drop. - A
DataTransferthat is used only internally, e.g. https://searchfox.org/mozilla-central/rev/aec3a901e6f6b3041b5ec457c9111a042cef1fb1/dom/events/Clipboard.cpp#701-703
We need to sort out how to deal with that first.
| Reporter | ||
Updated•1 year ago
|
| Assignee | ||
Comment 2•1 year ago
|
||
| Assignee | ||
Comment 3•1 year ago
|
||
We also use an invalid ClipboardType in EditorBase::PasteTransferableAsAction: https://searchfox.org/mozilla-central/rev/b11735b86bb4d416c918e2b2413456561beff50c/editor/libeditor/EditorBase.cpp#1977-1979
// Use an invalid value for the clipboard type as data comes from
// aTransferable and we don't currently implement a way to put that in the
// data transfer in TextEditor yet.
Updated•1 year ago
|
| Assignee | ||
Comment 4•1 year ago
|
||
| Assignee | ||
Comment 5•1 year ago
|
||
| Assignee | ||
Comment 6•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Updated•1 year ago
|
Comment 8•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Comment 9•1 year ago
|
||
Updated•1 year ago
|
| Assignee | ||
Comment 10•1 year ago
•
|
||
Even with the last patch there are still places where we could use the ClipboardType enum, e.g. in GTK's nsRetrievalContext.
| Assignee | ||
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Comment 12•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/faacd4575132
https://hg.mozilla.org/mozilla-central/rev/9fa01e6facf7
https://hg.mozilla.org/mozilla-central/rev/9cad26af81b2
Description
•