Bug 98940 - [GTK][WPE] Add support for DataTransferItem API
Summary: [GTK][WPE] Add support for DataTransferItem API
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: Gtk, LayoutTestFailure
Depends on:
Blocks:
 
Reported: 2012-10-10 11:59 PDT by Zan Dobersek
Modified: 2019-10-17 01:17 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zan Dobersek 2012-10-10 11:59:06 PDT
This feature is guarded by the ENABLE_DATA_TRANSFER_ITEMS compilation guard.
I believe the Qt port already implements this, and that their implementation can be shared with the GTK port.
Comment 1 Carlos Alberto Lopez Perez 2019-10-16 09:41:15 PDT Comment hidden (obsolete)
Comment 2 Carlos Alberto Lopez Perez 2019-10-16 09:43:26 PDT
The spec: https://html.spec.whatwg.org/multipage/dnd.html#the-datatransferitems-interface

The Qt implementation was done in r85648

The feature is not longer enabled by a compilation guard.

But it has a run-time guard. This run-time is enabled by default on WTR but its disabled for GTK or WPE ports otherwise (like when using the browser). For Mac is enabled by default.

The name of the run-time guard is DataTransferItemsEnabled

A layout test to test the feature: editing/pasteboard/data-transfer-items.html
Comment 3 Carlos Alberto Lopez Perez 2019-10-16 11:30:08 PDT
Even when the layout test editing/pasteboard/data-transfer-items.html is not fully passing, the feature seems to mostly work if enabled.

Here is a manual test for it: https://mdn.github.io/dom-examples/drag-and-drop/copy-move-DataTransferItemList.html
Comment 4 Carlos Alberto Lopez Perez 2019-10-16 11:36:01 PDT
Here is another test https://mdn.github.io/dom-examples/drag-and-drop/copy-move-DataTransfer.html that passes (this was passing even before enabling the above run-time setting, because that run-time setting now only controls the access to the interface  DataTransferItem, but "DataTransfer" is unconditionally enabled)
Comment 5 Carlos Alberto Lopez Perez 2019-10-17 01:17:18 PDT
On r251228 I enabled the runtime setting by default.

After that the manual tests above from mdn.github pass on GTK.

This bug remains open however, as likely there is something extra to fix or implement regarding this standard because the layout test editing/pasteboard/data-transfer-items.html keeps failing.