This is a sort of “master bug”. There will be many steps to accomplish this.
- Move ClipboardEfl.cpp source file to dom/efl from platform/efl; even better, later eliminate it entirely.
- Move ClipboardGtk.cpp source file to dom/gtk from platform/gtk; even better, later eliminate it entirely.
- Move ClipboardMac.mm source file to dom/efl from platform/mac; even better, later eliminate it entirely.
- Qt port.
- Windows port.
- iOS port.
Then we can close this bug and go on to fixing other aspects of Clipboard/Pasteboard.
ClipboardEfl.cpp is gone now.
Here’s my idea for getting rid of the remaining platform-specific Clipboard functions:
Clipboard::declareAndWriteDragImage should move to DragController.
Clipboard::createImage should be made platform independent by using functions in FrameSnapshotting and DragImage. This can be done with careful refactoring to preserve current behavior and then later share more code.
If we do these then there is nothing to move for ClipboardGtk.cpp and ClipboardMac.mm. We’ll see later about Qt and Windows. And ClipboardIOS.mm should be going away even without those changes.
At this point, the only part left is to get ClipboardMac.mm either removed entirely or out of the platform directory. Not sure which I will do.